summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d81ec05eb7d86689ab384c73104d1af3ec7c7a3 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>

_pkgname=cubble
_pkgver=1.0.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="A Vector Spatio-Temporal Data Structure for Data Analysis"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('MIT')
depends=(
  r-cli
  r-dplyr
  r-ggplot2
  r-glue
  r-lubridate
  r-ncdf4
  r-rlang
  r-sf
  r-stringr
  r-tibble
  r-tidyr
  r-tidyselect
  r-tsibble
  r-vctrs
)
checkdepends=(
  r-ggally
  r-testthat
  r-vdiffr
)
optdepends=(
  r-colorspace
  r-concaveman
  r-crosstalk
  r-ggally
  r-ggforce
  r-ggrepel
  r-knitr
  r-leaflet
  r-ozmaps
  r-patchwork
  r-plotly
  r-purrr
  r-rmarkdown
  r-sftime
  r-spelling
  r-stars
  r-testthat
  r-units
  r-vdiffr
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
        "fix-tests.patch")
md5sums=('b6b1f3439d3570f98bfc120ed4ca22bf'
         '17ad8728b51d3c54b73045a92dfeed49')
b2sums=('f4556bd131201df60b182483d603b9d9151d4237e3478b72dc3742eb5a7f4ae4fc7d1ec834b06c0636ed85811ca00b0a9f608928455b3f4c2b809da0307efa6d'
        '9a0b54584f836fcaf883e071dddbca63c0bc17eb85ce9f9b62d4ce2c8db42fe3aac3549ed9f87627f5fd1a2daa3ade2408e79cee258a3066b86500787af26f14')

prepare() {
  # skip tests depending on r-stars
  patch -Np1 -i fix-tests.patch
}

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"

  install -d "$pkgdir/usr/share/licenses/$pkgname"
  ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}