r-lme4: use metadata checks

This commit is contained in:
Pekka Ristola 2024-03-03 13:48:02 +02:00
parent 5b1c26f8d5
commit 0fb7229987
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 23 additions and 19 deletions

View file

@ -6,16 +6,17 @@
_pkgname=lme4
_pkgver=1.1-35.1
pkgname=r-${_pkgname,,}
pkgver=1.1.35.1
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Linear Mixed-Effects Models using 'Eigen' and S4"
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-2.0-or-later')
depends=(
r
r-minqa
r-nloptr
)
makedepends=(
r-rcpp
r-rcppeigen
)
@ -28,7 +29,6 @@ optdepends=(
r-knitr
r-memss
r-merderiv
r-mgcv
r-mlmrev
r-numderiv
r-optimx
@ -41,14 +41,15 @@ optdepends=(
r-tibble
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('e4a411396f68bf93751dfd01c8cd431e2d4658340186c47d164ebb2b840afb5b')
md5sums=('b452706beaa895b70d874a8a0154f87d')
b2sums=('f24c9d48813ef6ecb23777831055089924868de54febe1f7d9114b502e052002f5a7da7cf739df18d34a0d0c54cbe3577eed02a1042cca2eab3a125252ab93aa')
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

@ -5,10 +5,12 @@ maintainers:
repo_depends:
- r-minqa
- r-nloptr
repo_makedepends:
- r-rcpp
- r-rcppeigen
update_on:
- regex: lme4_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=lme4
- source: rpkgs
pkgname: lme4
repo: cran
md5: true
- alias: r