# Maintainer: peippo # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Grey Christoforo _cranname=munsell _cranver=0.5.1 pkgname=r-${_cranname,,} pkgdesc="Utilities for Using Munsell Colours" url="https://cran.r-project.org/package=${_cranname}" license=("MIT") pkgver=${_cranver//[:-]/.} pkgrel=1 arch=("any") depends=( "r" "r-colorspace" ) optdepends=( "r-ggplot2" ) # The unittests for `r-munsell` 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-munsell`. 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=("e1b00e414f5868e43f2f81ac81042aca0fc0e972e4fa56a7fd34857bf1f97a6ebc5beabe2ea95c0642652d9006023a65962fe75c728d3508908e6d32d4b8e8ff") build() { mkdir -p "${srcdir}/build/" R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}/build/" } # 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 }