summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 996cabd5e66510f26dc72ddd2d360466b540949c (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
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Contributor: sukanka <su975853527@gmail.com>

_pkgname=mgm
_pkgver=1.2-14
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=3
pkgdesc="Estimating Time-Varying k-Order Mixed Graphical Models"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-2.0-or-later')
depends=(
  r-glmnet
  r-gtools
  r-hmisc
  r-qgraph
  r-stringr
)
checkdepends=(
  r-testthat
)
optdepends=(
  r-testthat
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('153028b85da8ceafb4bfaaf3c7fa410f')
b2sums=('12ceb3f68807475b174fade5ef6b58cefe8c43c7a25b196a820cb5def7809cf450014bee15acc390178434e7babad11b20757c816e88c24348ca51c87dcb2417')

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