# Maintainer: Pekka Ristola # Contributor: sukanka _pkgname=lwgeom _pkgver=0.2-14 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=1 pkgdesc="Bindings to Selected 'liblwgeom' Functions for Simple Features" arch=(x86_64) url="https://cran.r-project.org/package=$_pkgname" license=('GPL-2.0-only') depends=( geos proj r-rcpp r-sf r-units ) checkdepends=( r-testthat ) optdepends=( r-covr r-geosphere r-sp r-testthat ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('bc5ae945234a1296750b5466360a8e03') b2sums=('02708ba4c688aab3433be9228aace870cf37e91be79d3aafe8b426e78a8aaff0f6040ec82cbf69f280a6b964fa6eab42fc442dd69c12234e8781577f3b0d459f') build() { mkdir build R CMD INSTALL -l build "$_pkgname" } check() { cd "$_pkgname/tests" R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R } package() { install -d "$pkgdir/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" }