diff options
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | PKGBUILD | 63 |
2 files changed, 55 insertions, 17 deletions
@@ -1,6 +1,6 @@ pkgbase = r-rprojroot - pkgdesc = Finding Files in Project Subdirectories - pkgver = 2.0.2 + pkgdesc = Find Files in Project Subdirectories + pkgver = 2.0.4 pkgrel = 1 url = https://cran.r-project.org/package=rprojroot arch = any @@ -11,9 +11,8 @@ pkgbase = r-rprojroot optdepends = r-lifecycle optdepends = r-mockr optdepends = r-rmarkdown - optdepends = r-testthat optdepends = r-withr - source = https://cran.r-project.org/src/contrib/rprojroot_2.0.2.tar.gz - sha256sums = 5fa161f0d4ac3b7a99dc6aa2d832251001dc92e93c828593a51fe90afd019e1f + source = https://cran.r-project.org/src/contrib/rprojroot_2.0.4.tar.gz + b2sums = 44b81761a084c49834288ff903e5bbddd76d0dad436f80c5515bcb98520c0d02a874e961554d73bd04170e8a96404ac4879439c6e524c82ce8cced5c38e5197d pkgname = r-rprojroot @@ -1,25 +1,64 @@ +# Maintainer: peippo <christoph+aur@christophfink.com> # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com _cranname=rprojroot -_cranver=2.0.2 +_cranver=2.0.4 pkgname=r-${_cranname,,} +pkgdesc="Find Files in Project Subdirectories" +url="https://cran.r-project.org/package=${_cranname}" +license=("MIT") pkgver=${_cranver//[:-]/.} pkgrel=1 -pkgdesc="Finding Files in Project Subdirectories" -arch=(any) -url="https://cran.r-project.org/package=${_cranname}" -license=(MIT) -depends=('r>=3.0.0') -optdepends=(r-covr r-knitr r-lifecycle r-mockr r-rmarkdown r-testthat r-withr) + +arch=("any") +depends=( + "r>=3.0.0" +) +optdepends=( + "r-covr" + "r-knitr" + "r-lifecycle" + "r-mockr" + "r-rmarkdown" + "r-withr" +) + +# The unittests for `r-rprojroot` have multiple circular +# dependency chains. + +# As such, the tests can not be run on first build. +# While R packages from CRAN, generally, are well-tested +# before they are released, in some situations, you want to +# have thorough testing on your own end. + +# To run the tests, first build this package without `check()` +# (i.e., as-is) to bootstrap `r-rprojroot`. Then, on subsequent builds, +# (assumining you have a local repository that is accessible from +# the build chroot), uncomment the lines defining `checkdepends`, below, +# as well as the `check()` function further down + +# checkdepends=( +# "${optdepends[@]}" +# "r-testthat" +# ) + source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") -sha256sums=('5fa161f0d4ac3b7a99dc6aa2d832251001dc92e93c828593a51fe90afd019e1f') +b2sums=("44b81761a084c49834288ff903e5bbddd76d0dad436f80c5515bcb98520c0d02a874e961554d73bd04170e8a96404ac4879439c6e524c82ce8cced5c38e5197d") build() { - R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}" + mkdir -p "${srcdir}/build/" + R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}/build/" } -package() { - install -dm0755 "${pkgdir}/usr/lib/R/library" +# check() { +# export R_LIBS="build/" +# R CMD check --no-manual "${_cranname}" +# } - cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library" +package() { + install -dm0755 "${pkgdir}/usr/lib/R/library" + cp -a --no-preserve=ownership "${srcdir}/build/${_cranname}" "${pkgdir}/usr/lib/R/library" + if [[ -f "${_cranname}/LICENSE" ]]; then + install -Dm0644 "${_cranname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + fi } |