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
_pkgver=1.6.0
_pkgver=1.6.1
pkgname=r-${_pkgname,,}
pkgver=1.6.0
pkgrel=1
pkgdesc='biodbHmdb, a library for connecting to the HMDB Database'
arch=('x86_64')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="biodbHmdb, a library for connecting to the HMDB Database"
arch=(x86_64)
url="https://bioconductor.org/packages/${_pkgname}"
license=('AGPL')
license=(AGPL3)
depends=(
r
r-biodb
r-r6
r-rcpp
r-zip
)
makedepends=(
r-testthat
)
checkdepends=(
r-xml2
)
optdepends=(
r-biocstyle
r-covr
@ -27,14 +33,20 @@ optdepends=(
r-testthat
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('883e86fa568deb09cd835174da77c186b6b08d0e655ccfbbecd05834e7960862')
md5sums=('3e2269f5f98740e0a8caad6610ba960b')
sha256sums=('b704087955926d42c01e624b39b8504f3ca63f587c8494ad37240cdcbabd7c9c')
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() {
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

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