diff options
author | Pekka Ristola | 2022-02-26 16:15:18 +0200 |
---|---|---|
committer | Pekka Ristola | 2022-02-26 16:15:18 +0200 |
commit | e78b78e6eb7f27865689a9a7228257266076b693 (patch) | |
tree | 4ff909e6fa2d63dbc28f3ee96bb9352c1c9c785b | |
parent | c91f7862db80303a5862b2d18a20b2654a2294d0 (diff) | |
download | aur-e78b78e6eb7f27865689a9a7228257266076b693.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 39 |
3 files changed, 41 insertions, 11 deletions
@@ -1,12 +1,13 @@ pkgbase = r-dbi pkgdesc = R Database Interface pkgver = 1.1.2 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=DBI arch = any - license = LGPL2.1 - license = LGPL3 - depends = r>=3.0.0 + license = LGPL + checkdepends = r-rsqlite + checkdepends = r-testthat + depends = r optdepends = r-blob optdepends = r-covr optdepends = r-dbitest 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,4 +1,5 @@ -# Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> +# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Matt Frichtl <frichtlm@gmail.com> # Contributor: Alex Branham <branham@utexas.edu> @@ -6,22 +7,46 @@ _cranname=DBI _cranver=1.1.2 pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 pkgdesc="R Database Interface" arch=(any) url="https://cran.r-project.org/package=${_cranname}" -license=(LGPL2.1 LGPL3) -depends=('r>=3.0.0') -optdepends=(r-blob r-covr r-dbitest r-dbplyr r-downlit r-dplyr r-glue r-hms r-knitr r-magrittr r-rmariadb r-rmarkdown r-rprojroot r-rsqlite r-testthat r-xml2) +license=(LGPL) +depends=(r) +checkdepends=(r-rsqlite r-testthat) +optdepends=( + r-blob + r-covr + r-dbitest + r-dbplyr + r-downlit + r-dplyr + r-glue + r-hms + r-knitr + r-magrittr + r-rmariadb + r-rmarkdown + r-rprojroot + r-rsqlite + r-testthat + r-xml2 +) source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") sha256sums=('56ec377d471c76ac234ddfd313bd01a050c99fb6fa5f704f5333b34a5d714f58') 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" NOT_CRAN=true Rscript --vanilla testthat.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" } |