# Maintainer: Pekka Ristola # Contributor: Guoyi Zhang # Contributor: Alex Branham _pkgname=magic _pkgver=1.6-1 pkgname=r-${_pkgname,,} pkgver=${_pkgver//-/.} pkgrel=4 pkgdesc="Create and Investigate Magic Squares" arch=(any) url="https://cran.r-project.org/package=$_pkgname" license=('GPL-2.0-only') depends=( r-abind ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") md5sums=('8b5ae0549795f46eba07cbc71c04b4a7') b2sums=('f7c24c4adb54cc624f40c421ee7e877158b5286ae0b024f0ebe8f8b791bb076bc73945bbdf4e88f5ab8d290969a5343d960445b08f0961e7236b230d337c6644') build() { mkdir build R CMD INSTALL -l build "$_pkgname" } check() { cd "$_pkgname/tests" R_LIBS="$srcdir/build" Rscript --vanilla aaa.R } package() { install -d "$pkgdir/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" }