summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2229f95e3429dd568dce491906b21874f78cdddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>

_pkgname=Rarr
_pkgver=1.4.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Read Zarr Files in R"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
license=('MIT')
depends=(
  blosc
  r-httr
  r-jsonlite
  r-paws.storage
  r-r.utils
  r-stringr
  zstd
)
checkdepends=(
  r-mockery
  r-tinytest
)
optdepends=(
  r-biocstyle
  r-covr
  r-knitr
  r-mockery
  r-tinytest
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('b4ccf32bada187fdbb1ce37b6c49b23f')
b2sums=('1b13a23377f723ea5d33e2b832edf10b79c92b1a6eca513859b3307b334b5a686bfc64a409a43dececda5840e093facd105b8582310a3c160f87954eccf57112')

build() {
  mkdir build
  R CMD INSTALL -l build "$_pkgname"
}

check() {
  cd "$_pkgname/tests"
  R_LIBS="$srcdir/build" Rscript --vanilla tinytest.R
}

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"
}