summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD36
2 files changed, 30 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5dbe8dce6e10..409222bc4403 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,13 @@
pkgbase = r-rstantools
pkgdesc = Tools for Developing R Packages Interfacing with 'Stan'
pkgver = 2.4.0
- pkgrel = 1
+ pkgrel = 2
url = https://cran.r-project.org/package=rstantools
arch = any
- license = GPL
- depends = r
+ license = GPL-3.0-or-later
+ checkdepends = r-rstan
+ checkdepends = r-testthat
+ checkdepends = r-usethis
depends = r-desc
depends = r-rcpp
depends = r-rcppparallel
@@ -19,6 +21,7 @@ pkgbase = r-rstantools
optdepends = r-testthat
optdepends = r-usethis
source = https://cran.r-project.org/src/contrib/rstantools_2.4.0.tar.gz
- sha256sums = bff72ca2f0352c6c5d2868823e286fdb73a6ead74508a4124cbcb222c83b4faa
+ md5sums = abd80e8b316191cb4e146e09ee9c06fd
+ b2sums = 3474c564f13f0421321033f919a5e2065b407a7fb5a0d65c96c4a99a311ead29f0798041ec9e1b99ebe11053b4b6876e97a62578e65410b3eea3344e5e119c02
pkgname = r-rstantools
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: