r-r6: use metadata checks

This commit is contained in:
Pekka Ristola 2023-12-17 18:41:00 +02:00
parent 2fb5bb5aa4
commit e8c1ebe357
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 24 additions and 19 deletions

View file

@ -3,12 +3,12 @@
_pkgname=R6 _pkgname=R6
_pkgver=2.5.1 _pkgver=2.5.1
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=2.5.1 pkgver=${_pkgver//-/.}
pkgrel=10 pkgrel=10
pkgdesc='Encapsulated Classes with Reference Semantics' pkgdesc="Encapsulated Classes with Reference Semantics"
arch=('any') arch=(any)
url="https://cran.r-project.org/package=${_pkgname}" url="https://cran.r-project.org/package=$_pkgname"
license=('MIT') license=(MIT)
depends=( depends=(
r r
) )
@ -17,15 +17,18 @@ optdepends=(
r-testthat r-testthat
) )
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('8d92bd29c2ed7bf15f2778618ffe4a95556193d21d8431a7f75e7e5fc102bf48') md5sums=('e84fd376e246738402e5529b6d52e101')
b2sums=('0045d7c37dfb7a773cd24e85e695575eaf6aa5c9392fb6888c10aa9fb3e35b13a230ed0aabcf84d52e656ef506ab58371044c4179b3380f5324b217fae6daeb4')
build() { build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}" mkdir build
R CMD INSTALL -l build "$_pkgname"
} }
package() { package() {
install -dm0755 "${pkgdir}/usr/lib/R/library" install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
install -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
} }
# vim:set ts=2 sw=2 et:

View file

@ -1,12 +1,13 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from lilaclib import * 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(): def pre_build():
for line in edit_file('PKGBUILD'): r_pre_build(_G)
if line.startswith('_pkgver='):
line = f'_pkgver={_G.newver}'
print(line)
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
def post_build(): def post_build():
git_pkgbuild_commit() git_pkgbuild_commit()

View file

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