summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3f9f2ac52fcec7b8aa400cffd38947591e7b970 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Contributor: sukanka <su975853527@gmail.com>

_pkgname=RoBTT
_pkgver=1.3.1
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Robust Bayesian T-Test"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-3.0-only')
depends=(
  onetbb
  r-bayestools
  r-bridgesampling
  r-ggplot2
  r-rcpp
  r-rcppparallel
  r-rdpack
  r-rstan
  r-rstantools
)
makedepends=(
  r-bh
  r-rcppeigen
  r-stanheaders
)
checkdepends=(
  r-testthat
  r-vdiffr
)
optdepends=(
  r-covr
  r-knitr
  r-rmarkdown
  r-testthat
  r-vdiffr
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('cf5a7ebd9eabf9b2c1e754dc901991be')
b2sums=('92e684d87027aa735bbf2d150bf9acd1c6bcf9152d7cd26b23ba355c4be34cee8099a274dbe891267047a9106e7ef5fdb7e3ceabdc5aacedde5ecf7cb4b83e6b')

prepare() {
  # skip test that requires external files
  sed -i '1a skip("Requires external files")' \
      "$_pkgname/tests/testthat/test-4-diagnostics.R"
}

build() {
  mkdir build
  # compilation needs a lot of memory
  MAKEFLAGS+=" -j1"
  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"
}