summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Drobot2020-01-31 18:39:00 +0300
committerViktor Drobot2020-01-31 18:39:00 +0300
commit9c1d993da747edcee37442063eea7d8eacb9137e (patch)
tree99b357e69c0344325b184a8f9fcea262f433df88
parent2f32457ed5c1f734bf1817d6b3407d5bcdc4aaae (diff)
downloadaur-9c1d993da747edcee37442063eea7d8eacb9137e.tar.gz
Fixed PKGBUILD
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD32
3 files changed, 33 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09ea96f09df1..0bf74b878300 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,11 +2,19 @@ pkgbase = r-withr
pkgdesc = Run Code 'With' Temporarily Modified Global State
pkgver = 2.1.2
pkgrel = 1
- url = http://cran.r-project.org/web/packages/withr/index.html
- arch = x86_64
+ url = https://cran.r-project.org/package=withr
+ arch = any
+ license = GPL2
license = GPL3
- depends = r
- source = http://cran.r-project.org/src/contrib/withr_2.1.2.tar.gz
+ depends = r>=3.0.2
+ optdepends = r-testthat
+ optdepends = r-covr
+ optdepends = r-lattice
+ optdepends = r-dbi
+ optdepends = r-rsqlite
+ optdepends = r-knitr
+ optdepends = r-rmarkdown
+ source = https://cran.r-project.org/src/contrib/withr_2.1.2.tar.gz
md5sums = 85e8574fb0a6832c4f275531be6371d6
pkgname = r-withr
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6ae0b18a1f6c..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/pkg
-/src
-*.tar.gz
-*.tar.xz
diff --git a/PKGBUILD b/PKGBUILD
index 07bc590ec514..75458d00fecb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,29 @@
+# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
# Contributor: Grey Christoforo <first name at last name dot net>
-pkgname=r-withr
-_cran_name=withr
-pkgver=2.1.2
+
+_cranname=withr
+_cranver=2.1.2
+pkgname=r-${_cranname,,}
+pkgver=${_cranver//[:-]/.}
pkgrel=1
pkgdesc="Run Code 'With' Temporarily Modified Global State"
-arch=('x86_64')
-url="http://cran.r-project.org/web/packages/${_cran_name}/index.html"
-license=('GPL3')
-depends=('r')
-source=("http://cran.r-project.org/src/contrib/${_cran_name}_${pkgver}.tar.gz")
+arch=(any)
+url="https://cran.r-project.org/package=${_cranname}"
+license=(GPL2 GPL3)
+depends=('r>=3.0.2')
+optdepends=(r-testthat r-covr r-lattice r-dbi r-rsqlite r-knitr r-rmarkdown)
+source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz")
md5sums=('85e8574fb0a6832c4f275531be6371d6')
+build() {
+ cd "${srcdir}"
+
+ R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l ${srcdir}
+}
+
package() {
- mkdir -p $pkgdir/usr/lib/R/library
- cd $srcdir
+ cd "${srcdir}"
- R CMD INSTALL -l $pkgdir/usr/lib/R/library ./${_cran_name}
+ install -dm0755 "${pkgdir}/usr/lib/R/library"
+ cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library"
}