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