diff options
author | Pekka Ristola | 2022-02-21 13:37:54 +0200 |
---|---|---|
committer | Pekka Ristola | 2022-02-21 13:37:54 +0200 |
commit | b1b1e7ca529e3d8149329eec0fab744249bace4e (patch) | |
tree | e7d8fc9caa1f5eadb594a66f38ca7fa5adde227e | |
parent | 9b715b124f971e633ca700404b8d1e224ff125ec (diff) | |
download | aur-b1b1e7ca529e3d8149329eec0fab744249bace4e.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 |
3 files changed, 15 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = r-testit pkgdesc = A Simple Package for Testing R Packages pkgver = 0.13 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=testit arch = any license = GPL3 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,3 +1,4 @@ +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Kibouo <csonka.mihaly@hotmail.com> # Contributor: Alex Branham <branham@utexas.edu> @@ -6,7 +7,7 @@ _cranname=testit _cranver=0.13 pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 pkgdesc="A Simple Package for Testing R Packages" arch=(any) url="https://cran.r-project.org/package=${_cranname}" @@ -17,11 +18,17 @@ source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz" sha256sums=('90d47168ab6bdbd1274b600b457626ac07697ce09792c92b2043be5f5b678d80') build() { - R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}" + mkdir -p build + R CMD INSTALL "${_cranname}" -l "${srcdir}/build" +} + +check() { + cd "${_cranname}/tests" + R_LIBS="${srcdir}/build" _R_CHECK_PACKAGE_NAME_=false Rscript --vanilla test-all.R } package() { install -dm0755 "${pkgdir}/usr/lib/R/library" - cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library" + cp -a --no-preserve=ownership "build/${_cranname}" "${pkgdir}/usr/lib/R/library" } |