# Maintainer: Pekka Ristola # Contributor: Guoyi Zhang # Contributor: peippo # Contributor: Grey Christoforo # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Alex Branham _pkgname=withr _pkgver=3.0.2 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=2 pkgdesc="Run Code 'With' Temporarily Modified Global State" arch=(any) url="https://cran.r-project.org/package=$_pkgname" license=('MIT') depends=( r ) optdepends=( r-callr r-dbi r-knitr r-rlang r-rmarkdown r-rsqlite r-testthat ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('f2e3780a71f6258d6f9055f138d474f2') b2sums=('8830717b487f02b46ef25979ca7e11621d7d745d4fead5577c886a590ac6e4b9ecb34ca6fa17bb0f377ea1b4025b28ced9ef11f49f29e4493eac6de3b8132499') build() { mkdir build R CMD INSTALL -l build "$_pkgname" } package() { install -d "$pkgdir/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" install -d "$pkgdir/usr/share/licenses/$pkgname" ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" }