r-bootstrap: use metadata checks

This commit is contained in:
Pekka Ristola 2023-12-16 17:01:59 +02:00
parent 58878c81ce
commit ce60b11b09
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=bootstrap
_pkgver=2019.6
pkgname=r-${_pkgname,,}
pkgver=2019.6
pkgver=${_pkgver//-/.}
pkgrel=6
pkgdesc='Functions for the Book "An Introduction to the Bootstrap"'
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('BSD')
pkgdesc="Functions for the Book \"An Introduction to the Bootstrap\""
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=(BSD)
depends=(
r
)
@ -16,15 +16,18 @@ makedepends=(
gcc-fortran
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('5252fdfeb944cf1fae35016d35f9333b1bd1fc8c6d4a14e33901160e21968694')
md5sums=('d794b81b1e07ef2f214e58c7b4c0ba4f')
b2sums=('03b7b830497b0aecf42098027e283a604e1cacd0695d908eb56f84ef879ecd68086e2d8a7f0809622bc1c27600121f5ce736384a156676b459db0398f3771db7')
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 -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
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
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: bootstrap_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=bootstrap
- source: rpkgs
pkgname: bootstrap
repo: cran
md5: true
- alias: r