summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2bcf0c083fed06b04ec6d4095bc9e80a918a8e0f (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
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>

_pkgname=readODS
_pkgver=2.3.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Read and Write ODS Files"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-3.0-only')
depends=(
  r-cellranger
  r-minty
  r-stringi
  r-tibble
  r-vctrs
  r-zip
)
checkdepends=(
  r-readr
  r-testthat
)
optdepends=(
  r-covr
  r-knitr
  r-readr
  r-rmarkdown
  r-spelling
  r-testthat
  r-withr
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('f826780e384d9e21b200880d4296023a')
b2sums=('8a25a216557533d0266fb0afd4dac536e64eb4870df2502765f0019284ebf9ed61e1f711cb3b74e95f47f56235b0ea68597c6081efc3a5cbdfaa175ed9a06c1f')

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