r-backports: use metadata checks

This commit is contained in:
Pekka Ristola 2023-12-24 13:51:45 +02:00
parent 3c65ee98b5
commit 368d0503c0
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=backports
_pkgver=1.4.1
pkgname=r-${_pkgname,,}
pkgver=1.4.1
pkgver=${_pkgver//-/.}
pkgrel=9
pkgdesc='Reimplementations of Functions Introduced Since R-3.0.0'
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
pkgdesc="Reimplementations of Functions Introduced Since R-3.0.0"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=(GPL)
depends=(
r
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('845c3c59fbb05e5a892c4231b955a0afdd331d82b7cc815bcff0672023242474')
md5sums=('1cc19c4a800a38f30b4d48eccd2478c4')
b2sums=('7073469ce4c1af82c763e55ac1cf7498e52c229ec67a3fd0914036bf6f70a992c0811e65b4093466b1f21ba0f39489f16f46c7e44bbf9ff741b7e475e905a9db')
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: backports_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=backports
- source: rpkgs
pkgname: backports
repo: cran
md5: true
- alias: r