diff options
author | Pekka Ristola | 2022-03-10 10:38:46 +0200 |
---|---|---|
committer | Pekka Ristola | 2022-03-10 10:38:46 +0200 |
commit | 5fee21d9352c475c823660e94416ce7409dc5ab9 (patch) | |
tree | b1e51c72948c92c6532f905edcd0226730a53d92 | |
parent | 507dab65bd7a7f94ef3c61828caa51bc9a54cf18 (diff) | |
download | aur-5fee21d9352c475c823660e94416ce7409dc5ab9.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 39 |
3 files changed, 32 insertions, 20 deletions
@@ -1,16 +1,17 @@ pkgbase = r-rcpproll pkgdesc = Efficient Rolling / Windowed Operations pkgver = 0.3.0 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=RcppRoll + arch = i686 arch = x86_64 license = GPL - depends = r + checkdepends = r-testthat + checkdepends = r-zoo depends = r-rcpp optdepends = r-zoo optdepends = r-testthat source = https://cran.r-project.org/src/contrib/RcppRoll_0.3.0.tar.gz - md5sums = 20b1dca034a1d18f63c07201736943c7 + sha256sums = cbff2096443a8a38a6f1dabf8c90b9e14a43d2196b412b5bfe5390393f743f6b pkgname = r-rcpproll - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,26 +1,33 @@ -# Maintainer: Alex Branham <branham@utexas.edu> +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> +# Contributor: Alex Branham <branham@utexas.edu> + _cranname=RcppRoll _cranver=0.3.0 -_pkgtar=${_cranname}_${_cranver}.tar.gz -pkgname=r-rcpproll +pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 pkgdesc="Efficient Rolling / Windowed Operations" -arch=('x86_64') +arch=(i686 x86_64) url="https://cran.r-project.org/package=${_cranname}" -license=('GPL') -depends=('r' 'r-rcpp') - -optdepends=('r-zoo' 'r-testthat') +license=(GPL) +depends=(r-rcpp) +checkdepends=(r-testthat r-zoo) +optdepends=(r-zoo r-testthat) +source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") +sha256sums=('cbff2096443a8a38a6f1dabf8c90b9e14a43d2196b412b5bfe5390393f743f6b') -source=("https://cran.r-project.org/src/contrib/${_pkgtar}") -md5sums=('20b1dca034a1d18f63c07201736943c7') +build() { + mkdir -p build + R CMD INSTALL "${_cranname}" -l "${srcdir}/build" +} -build(){ - R CMD INSTALL ${_pkgtar} -l $srcdir +check() { + cd "${_cranname}/tests" + R_LIBS="${srcdir}/build" NOT_CRAN=true Rscript --vanilla testthat.R } + package() { - install -d "$pkgdir/usr/lib/R/library" - cp -r "$srcdir/$_cranname" "$pkgdir/usr/lib/R/library" -} + install -dm0755 "${pkgdir}/usr/lib/R/library" + cp -a --no-preserve=ownership "build/${_cranname}" "${pkgdir}/usr/lib/R/library" +} |