r-biodbhmdb: fix depends, use metadata checks

This commit is contained in:
Pekka Ristola 2023-09-22 22:13:53 +03:00
parent 8e05be99c5
commit 16efce03d4
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 40 additions and 23 deletions

View file

@ -1,21 +1,27 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net> # Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=biodbHmdb _pkgname=biodbHmdb
_pkgver=1.6.0 _pkgver=1.6.1
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=1.6.0 pkgver=${_pkgver//-/.}
pkgrel=1 pkgrel=0
pkgdesc='biodbHmdb, a library for connecting to the HMDB Database' pkgdesc="biodbHmdb, a library for connecting to the HMDB Database"
arch=('x86_64') arch=(x86_64)
url="https://bioconductor.org/packages/${_pkgname}" url="https://bioconductor.org/packages/${_pkgname}"
license=('AGPL') license=(AGPL3)
depends=( depends=(
r
r-biodb r-biodb
r-r6 r-r6
r-rcpp r-rcpp
r-zip
)
makedepends=(
r-testthat r-testthat
) )
checkdepends=(
r-xml2
)
optdepends=( optdepends=(
r-biocstyle r-biocstyle
r-covr r-covr
@ -27,14 +33,20 @@ optdepends=(
r-testthat r-testthat
) )
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz") source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('883e86fa568deb09cd835174da77c186b6b08d0e655ccfbbecd05834e7960862') md5sums=('3e2269f5f98740e0a8caad6610ba960b')
sha256sums=('b704087955926d42c01e624b39b8504f3ca63f587c8494ad37240cdcbabd7c9c')
build() { build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}" mkdir -p build
R CMD INSTALL "$_pkgname" -l build
}
check() {
cd "$_pkgname/tests"
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
} }
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

@ -1,14 +1,18 @@
build_prefix: extra-x86_64 build_prefix: extra-x86_64
maintainers: maintainers:
- github: starsareintherose - github: pekkarr
email: kuoi@bioarchlinux.org email: pekkarr@protonmail.com
repo_depends: repo_depends:
- r-biodb - r-biodb
- r-r6 - r-r6
- r-rcpp - r-rcpp
- r-zip
repo_makedepends:
- r-testthat - r-testthat
- r-xml2
update_on: update_on:
- regex: biodbHmdb_([\d._-]+).tar.gz - source: rpkgs
source: regex pkgname: biodbHmdb
url: https://bioconductor.org/packages/biodbHmdb repo: bioc
md5: true
- alias: r - alias: r