summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD59
1 files changed, 41 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3c805744bbe6..8593c2653264 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,42 @@
- pkgname=r-optparse
- pkgver=1.7.3
- pkgrel=1
- pkgdesc="R command line parser inspired by Python's 'optparse'"
- arch=('any')
- url="https://cran.r-project.org/package=optparse"
- license=('GPL')
- depends=('r-getopt>=1.20.2')
- optdepends=('r-knitr>=2.15.19' 'r-stringr' 'r-testthat')
- source=("https://cran.r-project.org/src/contrib/optparse_$pkgver.tar.gz")
-md5sums=('48866cfb596f7dafc503c09954ab9f46')
+# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
+# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
- build(){
- R CMD INSTALL optparse_"$pkgver".tar.gz -l "$srcdir"
- }
- package() {
- install -dm0755 "$pkgdir"/usr/lib/R/library
- cp -a --no-preserve=ownership optparse "$pkgdir"/usr/lib/R/library
- }
+_pkgname=optparse
+_pkgver=1.7.5
+pkgname=r-${_pkgname,,}
+pkgver=${_pkgver//-/.}
+pkgrel=3
+pkgdesc="Command Line Option Parser"
+arch=(any)
+url="https://cran.r-project.org/package=$_pkgname"
+license=('GPL-2.0-or-later')
+depends=(
+ r-getopt
+)
+checkdepends=(
+ r-stringr
+ r-testthat
+)
+optdepends=(
+ r-knitr
+ r-stringr
+ r-testthat
+)
+source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
+md5sums=('8c943a4299157ea22967309e8c7158c2')
+b2sums=('4379ce2a3947934ca2e6c83a34fddd77ca49313ea77d91908a13b8ef583259af0c31f1d6c9f1cf15405fb5068165aed56395edcce52c3d2843b8691ed2bb000a')
+
+build() {
+ mkdir build
+ R CMD INSTALL -l build "$_pkgname"
+}
+
+check() {
+ cd "$_pkgname/tests"
+ R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla run-all.R
+}
+
+package() {
+ install -d "$pkgdir/usr/lib/R/library"
+ cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
+}