r-biodb: fix depends, use metadata checks

This commit is contained in:
Pekka Ristola 2023-09-22 14:44:02 +03:00
parent 5a0053b016
commit 93d57a8324
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 42 additions and 26 deletions

View file

@ -1,18 +1,19 @@
# 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=biodb
_pkgver=1.8.0
_pkgver=1.8.1
pkgname=r-${_pkgname,,}
pkgver=1.8.0
pkgrel=1
pkgdesc='biodb, a library and a development framework for connecting to chemical and biological databases'
arch=('x86_64')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="biodb, a library and a development framework for connecting to chemical and biological databases"
arch=(x86_64)
url="https://bioconductor.org/packages/${_pkgname}"
license=('AGPL')
license=(AGPL3)
depends=(
r
r-biocfilecache
r-chk
r-git2r
r-jsonlite
r-lgr
r-lifecycle
@ -25,16 +26,20 @@ depends=(
r-rcurl
r-rsqlite
r-stringr
r-testthat
r-withr
r-xml
r-yaml
)
makedepends=(
r-testthat
)
checkdepends=(
r-xml2
)
optdepends=(
r-biocstyle
r-covr
r-devtools
r-git2r
r-knitr
r-rmarkdown
r-roxygen2
@ -42,14 +47,20 @@ optdepends=(
r-xml2
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('b394a2bea684f3c406cbdb5564893dc289ad995716cf8cf13d0c66e57ec092d1')
md5sums=('f69fe1c97541bcf6b7a21503029dca6e')
sha256sums=('93fd88720be908517d594ab00b24d98a994edee00efd7f311664e182540547a2')
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,10 +1,11 @@
build_prefix: extra-x86_64
maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
- github: pekkarr
email: pekkarr@protonmail.com
repo_depends:
- r-biocfilecache
- r-chk
- r-git2r
- r-jsonlite
- r-lgr
- r-lifecycle
@ -17,12 +18,15 @@ repo_depends:
- r-rcurl
- r-rsqlite
- r-stringr
- r-testthat
- r-withr
- r-xml
- r-yaml
repo_makedepends:
- r-testthat
- r-xml2
update_on:
- regex: biodb_([\d._-]+).tar.gz
source: regex
url: https://bioconductor.org/packages/biodb
- source: rpkgs
pkgname: biodb
repo: bioc
md5: true
- alias: r