r-herper: use metadata checks

This commit is contained in:
Pekka Ristola 2023-09-07 14:45:45 +03:00
parent 31ebe38c51
commit a12540ea8e
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 37 additions and 27 deletions

View file

@ -1,20 +1,23 @@
# 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=Herper
_pkgver=1.10.0
_pkgver=1.10.1
pkgname=r-${_pkgname,,}
pkgver=1.10.0
pkgrel=1
pkgdesc='The Herper package is a simple toolset to install and manage conda packages and environments from R'
arch=('any')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="The Herper package is a simple toolset to install and manage conda packages and environments from R"
arch=(any)
url="https://bioconductor.org/packages/${_pkgname}"
license=('GPL')
license=(GPL3)
depends=(
r
r-reticulate
r-rjson
r-withr
)
checkdepends=(
r-testthat
)
optdepends=(
r-biocstyle
r-knitr
@ -22,19 +25,21 @@ optdepends=(
r-seqcna
r-testthat
)
makedepends=(
git
)
source=("git+https://github.com/RockefellerUniversity/Herper.git")
sha256sums=('SKIP')
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('d96ed4abe7db0a65b9d5fc50b4fdc47f')
sha256sums=('f73966e96532150cfc139af4e84cc768d05389704c8afc1610e44f1760e06bdf')
build() {
tar -zcvf ${_pkgname}_${_pkgver}.tar.gz ${_pkgname}
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,12 +1,16 @@
build_prefix: extra-x86_64
maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
- github: pekkarr
email: pekkarr@protonmail.com
repo_depends:
- r-reticulate
- r-rjson
- r-withr
repo_makedepends:
- r-testthat
update_on:
- source: cmd
cmd: curl -sS https://raw.githubusercontent.com/RockefellerUniversity/Herper/master/DESCRIPTION | grep 'Version' | awk '{print $2}'
- source: rpkgs
pkgname: Herper
repo: bioc
md5: true
- alias: r