r-lava: fix depends, use metadata checks

This commit is contained in:
Pekka Ristola 2024-03-05 20:51:01 +02:00
parent 68cb7f9bdc
commit 6a4f8426e4
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 25 additions and 27 deletions

View file

@ -3,57 +3,52 @@
# Contributor: Alex Branham <branham@utexas.edu>
_pkgname=lava
_pkgver=1.7.3
_pkgver=1.8.0
pkgname=r-${_pkgname,,}
pkgver=1.7.3
pkgrel=1
pkgdesc='Latent Variable Models'
arch=('any')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="Latent Variable Models"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-3.0-only')
depends=(
r
r-cli
r-future.apply
r-numderiv
r-progressr
r-squarem
)
optdepends=(
r-bookdown
r-data.table
r-ellipse
r-fields
r-geepack
r-graph
r-igraph
r-kernsmooth
r-knitr
r-lavasearch2
r-lme4
r-matrix
r-mets
r-nlme
r-optimx
r-polycor
r-quantreg
r-r.rsp
r-rgl
r-rgraphviz
r-rmarkdown
r-targeted
r-testthat
r-visnetwork
r-zoo
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('4e087df1350b05c3d0403597a1ad97f4b0e183047d5d8636a62143f26bd86a08')
md5sums=('3e67327f96b08caeac828871968a4f8b')
b2sums=('3378f30b830846d7979cee57553746ad3735d318ffafe769fbf362df00ed8984e0164df30e06744292666c01bd15e6695638080ef491f4e1c6ced3a2c60918e8')
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,12 +3,14 @@ maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
repo_depends:
- r-cli
- r-future.apply
- r-numderiv
- r-progressr
- r-squarem
update_on:
- regex: lava_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=lava
- source: rpkgs
pkgname: lava
repo: cran
md5: true
- alias: r