diff --git a/BioArchLinux/r-iterators/PKGBUILD b/BioArchLinux/r-iterators/PKGBUILD index 5c79c96963..4025131561 100644 --- a/BioArchLinux/r-iterators/PKGBUILD +++ b/BioArchLinux/r-iterators/PKGBUILD @@ -1,30 +1,42 @@ -# Maintainer: Guoyi Zhang +# Maintainer: Pekka Ristola +# Contributor: Guoyi Zhang +# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com +# Contributor: Alex Branham _pkgname=iterators _pkgver=1.0.14 pkgname=r-${_pkgname,,} -pkgver=1.0.14 +pkgver=${_pkgver//[:-]/.} pkgrel=10 -pkgdesc='Provides Iterator Construct' -arch=('any') +pkgdesc="Provides Iterator Construct" +arch=(any) url="https://cran.r-project.org/package=${_pkgname}" -license=('Apache') +license=(Apache) depends=( r ) +checkdepends=( + r-runit +) optdepends=( r-foreach r-runit ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") +md5sums=('e1d875f0ddec6834dd33e56c4f04a706') sha256sums=('cef3075a0930e1408c764e4da56bbadd4f7d14315809df8f38dd51f80ccc677b') 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" Rscript --vanilla doRUnit.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: diff --git a/BioArchLinux/r-iterators/lilac.py b/BioArchLinux/r-iterators/lilac.py index 620556bc87..b5cdb057c5 100644 --- a/BioArchLinux/r-iterators/lilac.py +++ b/BioArchLinux/r-iterators/lilac.py @@ -1,12 +1,14 @@ #!/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() + update_aur_repo() diff --git a/BioArchLinux/r-iterators/lilac.yaml b/BioArchLinux/r-iterators/lilac.yaml index 0132590c36..f67945738c 100644 --- a/BioArchLinux/r-iterators/lilac.yaml +++ b/BioArchLinux/r-iterators/lilac.yaml @@ -1,9 +1,12 @@ build_prefix: extra-x86_64 maintainers: -- github: starsareintherose - email: kuoi@bioarchlinux.org +- github: pekkarr + email: pekkarr@protonmail.com +repo_makedepends: +- r-runit update_on: -- regex: iterators_([\d._-]+).tar.gz - source: regex - url: https://cran.r-project.org/package=iterators +- source: rpkgs + pkgname: iterators + repo: cran + md5: true - alias: r diff --git a/lilac-extensions/lilac_r_utils.py b/lilac-extensions/lilac_r_utils.py index d6d6026a4c..644c00e97c 100644 --- a/lilac-extensions/lilac_r_utils.py +++ b/lilac-extensions/lilac_r_utils.py @@ -183,6 +183,7 @@ class Pkgbuild: # maps the license field in the DESCRIPTION file to a PKGBUILD license value license_map = { + "Apache License (== 2.0)": "Apache", "Apache License 2.0": "Apache", "BSD_2_clause + file LICENSE": "BSD", "BSD_3_clause + file LICENSE": "BSD",