# Maintainer: Pekka Ristola # Contributor: Guoyi Zhang # Contributor: Alex Branham _pkgname=RcppRoll _pkgver=0.3.0 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=7 pkgdesc="Efficient Rolling / Windowed Operations" arch=(x86_64) url="https://cran.r-project.org/package=${_pkgname}" license=(GPL) depends=( r-rcpp ) checkdepends=( r-testthat r-zoo ) optdepends=( r-testthat r-zoo ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('20b1dca034a1d18f63c07201736943c7') sha256sums=('cbff2096443a8a38a6f1dabf8c90b9e14a43d2196b412b5bfe5390393f743f6b') 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" }