# Maintainer: generated by script at https://github.com/zasdfgbnm/aurcran _pkgname=jsonlite _pkgnamelower=jsonlite _repo='http://cran.stat.ucla.edu/' _cran="https://cran.r-project.org/web/packages/$_pkgname/index.html" pkgname=r-$_pkgnamelower pkgver=1.0 pkgrel=1 pkgdesc='a robust, high performance json parser and generator for r' arch=(any) url="http://arxiv.org/abs/1403.2805, https://www.opencpu.org/posts/jsonlite-a-smarter-json-encoder" license=('MIT') depends=('r') makedepends=('curl' 'grep' 'python-html2text') pkgver() { curl "$_cran" 2>/dev/null|html2text|grep -oP '(?<=Version:).*'|grep -o '[0-9\.]*' } build() { Rscript -e "install.packages(\"$_pkgname\", lib=\"$srcdir\", repos=\"$_repo\")" } package() { install -d "$pkgdir/usr/lib/R/library" cp -r "$srcdir/$_pkgname" "$pkgdir/usr/lib/R/library" }