diff --git a/BioArchLinux/r-common/PKGBUILD b/BioArchLinux/r-common/PKGBUILD new file mode 100644 index 0000000000..0e6e02e6b8 --- /dev/null +++ b/BioArchLinux/r-common/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Pekka Ristola + +_pkgname=common +_pkgver=1.0.5 +pkgname=r-${_pkgname,,} +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="Solutions for Common Problems in Base R" +arch=(any) +url="https://cran.r-project.org/package=${_pkgname}" +license=(custom:CC0) +depends=( + r-this.path +) +checkdepends=( + r-testthat +) +optdepends=( + r-glue + r-knitr + r-rmarkdown + r-testthat +) +source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz" + "$pkgname-CC0.txt::https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt") +md5sums=('93fd171bfdba50b123433227761d7fd1' + '65d3616852dbf7b1a6d4b53b00626032') +sha256sums=('8fc7025c15b5f26d0509e7c9f444030ea717318a0d7d913b8777fe7af3bab21b' + 'a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499') + +build() { + 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 -d "$pkgdir/usr/lib/R/library" + cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" + + install -Dm644 "$pkgname-CC0.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/BioArchLinux/r-common/lilac.py b/BioArchLinux/r-common/lilac.py new file mode 100644 index 0000000000..b5cdb057c5 --- /dev/null +++ b/BioArchLinux/r-common/lilac.py @@ -0,0 +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(): + r_pre_build(_G) + +def post_build(): + git_pkgbuild_commit() + update_aur_repo() diff --git a/BioArchLinux/r-common/lilac.yaml b/BioArchLinux/r-common/lilac.yaml new file mode 100644 index 0000000000..1870831b5a --- /dev/null +++ b/BioArchLinux/r-common/lilac.yaml @@ -0,0 +1,14 @@ +build_prefix: extra-x86_64 +maintainers: +- github: pekkarr + email: pekkarr@protonmail.com +repo_depends: +- r-this.path +repo_makedepends: +- r-testthat +update_on: +- source: rpkgs + pkgname: common + repo: cran + md5: true +- alias: r diff --git a/lilac-extensions/lilac_r_utils.py b/lilac-extensions/lilac_r_utils.py index 626ca15176..594d6a3f20 100644 --- a/lilac-extensions/lilac_r_utils.py +++ b/lilac-extensions/lilac_r_utils.py @@ -189,6 +189,7 @@ license_map = { "BSD_2_clause + file LICENSE": "BSD", "BSD_3_clause + file LICENSE": "BSD", "BSL-1.0": "Boost", + "CC0": "custom:CC0", "EPL": "EPL", "GPL": "GPL", "GPL (>= 2)": "GPL",