diff options
author | Christoph Fink | 2023-03-26 20:49:22 +0300 |
---|---|---|
committer | Christoph Fink | 2023-03-26 20:49:22 +0300 |
commit | 77c037ab6e352adfeebef8506443e41383ef419c (patch) | |
tree | c5ad4d6008c9e6ee0c42bd368d89662c5affd702 /PKGBUILD | |
parent | ac4c54c67187e32557b0f1b976dc5355b9abb993 (diff) | |
download | aur-r-gtfstools.tar.gz |
upgpkg: r-gtfstools 1.2.0-2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 36 |
1 files changed, 25 insertions, 11 deletions
@@ -8,7 +8,7 @@ Transit Feed Specification (GTFS) data format" url="https://cran.r-project.org/package=${_cranname}" license=("MIT") pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 arch=("i686" "x86_64") depends=( @@ -31,28 +31,42 @@ optdepends=( "r-knitr" "r-rmarkdown" ) -checkdepends=( - "${optdepends[@]}" - "r-testthat" -) + +# The unittests for `r-gtfstools` 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-gtfstools`. 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") -b2sums=('daacc3945c0127277f42fd1bd48ad7914447b2a78871af0e1d22f8a4c6bd68d577bd4c6dd3767a28553f53ed3b4c72a7c025f9abf2d8dda45403404f64e79050') +b2sums=("daacc3945c0127277f42fd1bd48ad7914447b2a78871af0e1d22f8a4c6bd68d577bd4c6dd3767a28553f53ed3b4c72a7c025f9abf2d8dda45403404f64e79050") build() { mkdir -p "${srcdir}/build/" R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}/build/" } -check() { - cd "${srcdir}/${_cranname}/tests" - R_LIBS="${srcdir}/build/" Rscript --vanilla testthat.R -} +# check() { +# export R_LIBS="build/" +# R CMD check --no-manual "${_cranname}" +# } 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 |