r-invgamma: use metadata checks

This commit is contained in:
Pekka Ristola 2023-12-20 20:41:57 +02:00
parent d5b0e3a85a
commit dca0db2bb9
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 21 additions and 18 deletions

View file

@ -3,24 +3,25 @@
_pkgname=invgamma
_pkgver=1.1
pkgname=r-${_pkgname,,}
pkgver=1.1
pkgver=${_pkgver//-/.}
pkgrel=8
pkgdesc='The Inverse Gamma Distribution'
arch=('any')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
pkgdesc="The Inverse Gamma Distribution"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=(GPL2)
depends=(
r
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('aaa8de7c2a852fa6df30d8262086f6a3eb2b1fefbbc66dfe2f6c25c68917ea89')
md5sums=('d47d0e0a48879a43e135e8e98f10ecee')
b2sums=('0c20e9976c5d7aad339d6fd8162345e4f598421e6d991f728f80eedbcd1fc43d4a985d52e4a89ac6391694418959eeff9f16154b47ec1267ecbf7ebd139ff469')
build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
package() {
install -dm0755 "${pkgdir}/usr/lib/R/library"
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
}
# vim:set ts=2 sw=2 et:

View file

@ -1,12 +1,13 @@
#!/usr/bin/env python3
from lilaclib import *
import os
import sys
sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
from lilac_r_utils import r_pre_build
def pre_build():
for line in edit_file('PKGBUILD'):
if line.startswith('_pkgver='):
line = f'_pkgver={_G.newver}'
print(line)
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
r_pre_build(_G)
def post_build():
git_pkgbuild_commit()

View file

@ -3,7 +3,8 @@ maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
update_on:
- regex: invgamma_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=invgamma
- source: rpkgs
pkgname: invgamma
repo: cran
md5: true
- alias: r