mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-chemminer: use metadata checks
This commit is contained in:
parent
6df3d43893
commit
96bda329a6
4 changed files with 52 additions and 28 deletions
|
@ -1,19 +1,17 @@
|
|||
# system requirements: GNU make
|
||||
# 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=ChemmineR
|
||||
_pkgver=3.52.0
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=3.52.0
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc='Cheminformatics Toolkit for R'
|
||||
arch=('x86_64')
|
||||
pkgdesc="Cheminformatics Toolkit for R"
|
||||
arch=(x86_64)
|
||||
url="https://bioconductor.org/packages/${_pkgname}"
|
||||
license=('Artistic2.0')
|
||||
license=(Artistic2.0)
|
||||
depends=(
|
||||
r
|
||||
r-base64enc
|
||||
r-bh
|
||||
r-biocgenerics
|
||||
r-dbi
|
||||
r-digest
|
||||
|
@ -27,20 +25,26 @@ depends=(
|
|||
r-rjson
|
||||
r-rsvg
|
||||
r-stringi
|
||||
make
|
||||
)
|
||||
makedepends=(
|
||||
r-bh
|
||||
swig
|
||||
)
|
||||
checkdepends=(
|
||||
r-rsqlite
|
||||
r-runit
|
||||
r-snow
|
||||
)
|
||||
optdepends=(
|
||||
r-bibtex
|
||||
r-biocmanager
|
||||
r-biocstyle
|
||||
r-chemminedrugs
|
||||
r-chemmineob
|
||||
r-fmcsr
|
||||
r-gplots
|
||||
r-knitcitations
|
||||
r-knitr
|
||||
r-knitrbootstrap
|
||||
r-png
|
||||
r-rmarkdown
|
||||
r-rpostgresql
|
||||
r-rsqlite
|
||||
|
@ -48,14 +52,25 @@ optdepends=(
|
|||
r-snow
|
||||
)
|
||||
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
md5sums=('54601905e8a4a48d85b3c7a80f935eb5')
|
||||
sha256sums=('3d24d7b81d8d5315c53b5c04002b39d0f2b5354b992b66d73cca4ff0077e9bd4')
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
# generate R bindings
|
||||
cd "$_pkgname"
|
||||
./runSwig.sh
|
||||
cd ..
|
||||
|
||||
mkdir -p build
|
||||
R CMD INSTALL "$_pkgname" -l build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_pkgname/tests"
|
||||
R_LIBS="$srcdir/build" Rscript --vanilla runTests.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:
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
#!/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,
|
||||
expect_systemrequirements = "GNU make",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: starsareintherose
|
||||
email: kuoi@bioarchlinux.org
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-base64enc
|
||||
- r-bh
|
||||
- r-biocgenerics
|
||||
- r-dbi
|
||||
- r-digest
|
||||
|
@ -18,8 +17,14 @@ repo_depends:
|
|||
- r-rjson
|
||||
- r-rsvg
|
||||
- r-stringi
|
||||
repo_makedepends:
|
||||
- r-bh
|
||||
- r-rsqlite
|
||||
- r-runit
|
||||
- r-snow
|
||||
update_on:
|
||||
- regex: ChemmineR_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://bioconductor.org/packages/ChemmineR
|
||||
- source: rpkgs
|
||||
pkgname: ChemmineR
|
||||
repo: bioc
|
||||
md5: true
|
||||
- alias: r
|
||||
|
|
|
@ -8,7 +8,7 @@ def r_update_pkgver_and_pkgrel(newver: str):
|
|||
"""
|
||||
Update _pkgver and pkgrel used in R packages.
|
||||
|
||||
The pkgver variable (without underscore) should be defined as `${_pkgver//[:-]/.}`.
|
||||
The pkgver variable (without underscore) should be defined as `${_pkgver//-/.}`.
|
||||
"""
|
||||
ver_prefix = "_pkgver="
|
||||
rel_prefix = "pkgrel="
|
||||
|
@ -285,7 +285,7 @@ def check_optdepends(pkg: Pkgbuild, desc: Description, cfg: CheckConfig):
|
|||
errors.append(f"Unnecessary optional dependency: {dep}")
|
||||
|
||||
for dep in desc.suggests:
|
||||
if (dep not in cfg.default_r_pkgs) and (dep not in pkg.optdepends):
|
||||
if (dep not in cfg.default_r_pkgs) and (dep not in pkg.optdepends) and (dep not in pkg.depends):
|
||||
errors.append(f"Missing optional dependency: {dep}")
|
||||
|
||||
if len(errors) > 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue