diff options
author | Pekka Ristola | 2022-03-10 17:44:36 +0200 |
---|---|---|
committer | Pekka Ristola | 2022-03-10 17:44:36 +0200 |
commit | 51aaf1fe8c0f94ab0723d430be4c7ee9ca866e04 (patch) | |
tree | 11a7bbef59fc520374e124ac06aca853c99a6f67 | |
parent | b719f1e8f2959373dd88a7cf773333dffb6d33d8 (diff) | |
download | aur-51aaf1fe8c0f94ab0723d430be4c7ee9ca866e04.tar.gz |
Update to 1.0.10 and add check() function
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 37 |
3 files changed, 28 insertions, 20 deletions
@@ -1,13 +1,12 @@ pkgbase = r-deoptimr pkgdesc = Differential Evolution Optimization in Pure R - pkgver = 1.0.8 + pkgver = 1.0.10 pkgrel = 1 url = https://cran.r-project.org/package=DEoptimR arch = any license = GPL depends = r - source = https://cran.r-project.org/src/contrib/DEoptimR_1.0-8.tar.gz - md5sums = c85836a504fbe4166e3c8eba0efe705d + source = https://cran.r-project.org/src/contrib/DEoptimR_1.0-10.tar.gz + sha256sums = 774f7ba0ac9c73aaab4567024b98afdb58098905726e72bceeeb9e380e782ad5 pkgname = r-deoptimr - 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,31 @@ -# Maintainer: Alex Branham <branham@utexas.edu> +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> +# Contributor: Alex Branham <branham@utexas.edu> + _cranname=DEoptimR -_cranver=1.0-8 -_pkgtar=${_cranname}_${_cranver}.tar.gz -pkgname=r-deoptimr +_cranver=1.0-10 +pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} pkgrel=1 pkgdesc="Differential Evolution Optimization in Pure R" -arch=('any') +arch=(any) url="https://cran.r-project.org/package=${_cranname}" -license=('GPL') -depends=('r' ) - +license=(GPL) +depends=(r) +source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") +sha256sums=('774f7ba0ac9c73aaab4567024b98afdb58098905726e72bceeeb9e380e782ad5') +build() { + mkdir -p build + R CMD INSTALL "${_cranname}" -l "${srcdir}/build" +} -source=("https://cran.r-project.org/src/contrib/${_pkgtar}") -md5sums=('c85836a504fbe4166e3c8eba0efe705d') - -build(){ - R CMD INSTALL ${_pkgtar} -l $srcdir +check() { + cd "${_cranname}/tests" + R_LIBS="${srcdir}/build" R_PKG_CHECKING_doExtras=true Rscript --vanilla JDEoptim-tst.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" +} |