r-softimpute: use metadata checks

This commit is contained in:
Pekka Ristola 2024-03-03 19:01:24 +02:00
parent 8ee7196930
commit 742c160210
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 24 additions and 21 deletions

View file

@ -3,31 +3,32 @@
_pkgname=softImpute _pkgname=softImpute
_pkgver=1.4-1 _pkgver=1.4-1
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=1.4.1 pkgver=${_pkgver//-/.}
pkgrel=8 pkgrel=8
pkgdesc='Matrix Completion via Iterative Soft-Thresholded SVD' pkgdesc="Matrix Completion via Iterative Soft-Thresholded SVD"
arch=('x86_64') arch=(x86_64)
url="https://cran.r-project.org/package=${_pkgname}" url="https://cran.r-project.org/package=$_pkgname"
license=('GPL') license=('GPL-2.0-only')
depends=( depends=(
r r
) )
makedepends=(
gcc-fortran
)
optdepends=( optdepends=(
r-knitr r-knitr
r-rmarkdown r-rmarkdown
) )
makedepends=(
gcc-fortran
)
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=('ea4c39831dee834204f6d6594aad6b937540ba4f2adf3f37fb4546844c234aec') md5sums=('a17b4aafe9961e6af8f7808829459e90')
b2sums=('7284a66db4c96348a18b23603a56619fb5d8ad0bbf647446763b2d1910f22e1cd90d2b9f963472189c7d78fa0518b65ab58409359d68fe169b1b820099e5122b')
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"
} }
# 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: softImpute_([\d._-]+).tar.gz - source: rpkgs
source: regex pkgname: softImpute
url: https://cran.r-project.org/package=softImpute repo: cran
md5: true
- alias: r - alias: r