summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBioArchLinuxBot2024-02-05 18:04:00 +0000
committerBioArchLinuxBot2024-02-05 18:04:00 +0000
commitfb3a0c1fa649f12e1a692f572efd3993392c87d6 (patch)
tree47e6e0e74fc07f5c44cd486cff76d916450b82ed /PKGBUILD
parent834486e6610402de065c5b3ddc2dcd363c407ee2 (diff)
downloadaur-r-rstantools.tar.gz
[lilac] updated to 2.4.0-2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 23 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a566b322d01d..eb24ea254de7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,25 @@
-# system requirements: pandoc, C++14
-# 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=rstantools
_pkgver=2.4.0
pkgname=r-${_pkgname,,}
-pkgver=2.4.0
-pkgrel=1
+pkgver=${_pkgver//-/.}
+pkgrel=2
pkgdesc="Tools for Developing R Packages Interfacing with 'Stan'"
-arch=('any')
-url="https://cran.r-project.org/package=${_pkgname}"
-license=('GPL')
+arch=(any)
+url="https://cran.r-project.org/package=$_pkgname"
+license=('GPL-3.0-or-later')
depends=(
- r
r-desc
r-rcpp
r-rcppparallel
)
+checkdepends=(
+ r-rstan
+ r-testthat
+ r-usethis
+)
optdepends=(
r-knitr
r-pkgbuild
@@ -28,14 +32,20 @@ optdepends=(
r-usethis
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
-sha256sums=('bff72ca2f0352c6c5d2868823e286fdb73a6ead74508a4124cbcb222c83b4faa')
+md5sums=('abd80e8b316191cb4e146e09ee9c06fd')
+b2sums=('3474c564f13f0421321033f919a5e2065b407a7fb5a0d65c96c4a99a311ead29f0798041ec9e1b99ebe11053b4b6876e97a62578e65410b3eea3344e5e119c02')
build() {
- R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
+ mkdir build
+ R CMD INSTALL -l build "$_pkgname"
+}
+
+check() {
+ cd "$_pkgname/tests"
+ R_LIBS="$srcdir/build" 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: