Packages/BioArchLinux/r-cachem/PKGBUILD
Pekka Ristola 66ece95d69
r-*: add apostrophes around "MIT" in license fields
Other SPDX license identifiers already use apostrophes.
2024-01-18 22:04:26 +02:00

44 lines
1.2 KiB
Bash

# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
_pkgname=cachem
_pkgver=1.0.8
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=2
pkgdesc="Cache R Objects with Automatic Pruning"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('MIT')
depends=(
r-fastmap
r-rlang
)
checkdepends=(
r-testthat
)
optdepends=(
r-testthat
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('f7b8c1dae009101e6785febca66bb659')
b2sums=('0d575f66233a207c464842807d7a34a05c1e458c09588eb900ab9b28e68652229be55924f71f581100aefff9ae3e36ccefe0d5cfa37045dc89b035e555475e3c')
build() {
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
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 -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}