diff options
author | Pekka Ristola | 2022-02-25 18:07:24 +0200 |
---|---|---|
committer | Pekka Ristola | 2022-02-25 18:07:24 +0200 |
commit | 903fba1ce47dac34f63209c908a7075d72a8f8d4 (patch) | |
tree | 22872e136e4f847e9d561ecd74615d9c9bd948d0 | |
parent | 613974f98c0b2214fe19102119f1afd72b0153c1 (diff) | |
download | aur-903fba1ce47dac34f63209c908a7075d72a8f8d4.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 72 |
3 files changed, 84 insertions, 16 deletions
@@ -1,19 +1,27 @@ pkgbase = r-ggplot2 pkgdesc = Create Elegant Data Visualisations Using the Grammar of Graphics pkgver = 3.3.5 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=ggplot2 arch = any license = MIT - depends = r>=3.3 + checkdepends = r-hexbin + checkdepends = r-mapproj + checkdepends = r-quantreg + checkdepends = r-sf + checkdepends = r-sp + checkdepends = r-svglite + checkdepends = r-testthat + checkdepends = r-vdiffr + checkdepends = ttf-font depends = r-digest depends = r-glue - depends = r-gtable>=0.1.1 + depends = r-gtable depends = r-isoband - depends = r-rlang>=0.4.10 - depends = r-scales>=0.5.0 + depends = r-rlang + depends = r-scales depends = r-tibble - depends = r-withr>=2.0.0 + depends = r-withr optdepends = r-covr optdepends = r-ragg optdepends = r-dplyr @@ -22,7 +30,6 @@ pkgbase = r-ggplot2 optdepends = r-hmisc optdepends = r-interp optdepends = r-knitr - optdepends = r-lattice optdepends = r-mapproj optdepends = r-maps optdepends = r-maptools @@ -33,13 +40,14 @@ pkgbase = r-ggplot2 optdepends = r-rcolorbrewer optdepends = r-rgeos optdepends = r-rmarkdown - optdepends = r-rpart optdepends = r-sf optdepends = r-svglite optdepends = r-testthat optdepends = r-vdiffr optdepends = r-xml2 source = https://cran.r-project.org/src/contrib/ggplot2_3.3.5.tar.gz + source = CRAN-MIT-TEMPLATE::https://cran.r-project.org/web/licenses/MIT sha256sums = b075294faf3af31b18e415f260c62d6000b218770e430484fe38819bdc3224ea + sha256sums = e76e4aad5d3d9d606db6f8c460311b6424ebadfce13f5322e9bae9d49cc6090b pkgname = r-ggplot2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,4 +1,5 @@ -# Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> +# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: frichtlm <frichtlm@gmail.com> # Contributor: wagnerflo <florian@wagner-flo.net> @@ -6,22 +7,77 @@ _cranname=ggplot2 _cranver=3.3.5 pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 pkgdesc="Create Elegant Data Visualisations Using the Grammar of Graphics" arch=(any) url="https://cran.r-project.org/package=${_cranname}" license=(MIT) -depends=('r>=3.3' r-digest r-glue 'r-gtable>=0.1.1' r-isoband 'r-rlang>=0.4.10' 'r-scales>=0.5.0' r-tibble 'r-withr>=2.0.0') -optdepends=(r-covr r-ragg r-dplyr r-ggplot2movies r-hexbin r-hmisc r-interp r-knitr r-lattice r-mapproj r-maps r-maptools r-multcomp r-munsell r-profvis r-quantreg r-rcolorbrewer r-rgeos r-rmarkdown r-rpart r-sf r-svglite r-testthat r-vdiffr r-xml2) -source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") -sha256sums=('b075294faf3af31b18e415f260c62d6000b218770e430484fe38819bdc3224ea') +depends=( + r-digest + r-glue + r-gtable + r-isoband + r-rlang + r-scales + r-tibble + r-withr +) +checkdepends=( + r-hexbin + r-mapproj + r-quantreg + r-sf + r-sp + r-svglite + r-testthat + r-vdiffr + ttf-font +) +optdepends=( + r-covr + r-ragg + r-dplyr + r-ggplot2movies + r-hexbin + r-hmisc + r-interp + r-knitr + r-mapproj + r-maps + r-maptools + r-multcomp + r-munsell + r-profvis + r-quantreg + r-rcolorbrewer + r-rgeos + r-rmarkdown + r-sf + r-svglite + r-testthat + r-vdiffr + r-xml2 +) +source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz" + "CRAN-MIT-TEMPLATE::https://cran.r-project.org/web/licenses/MIT") +sha256sums=('b075294faf3af31b18e415f260c62d6000b218770e430484fe38819bdc3224ea' + 'e76e4aad5d3d9d606db6f8c460311b6424ebadfce13f5322e9bae9d49cc6090b') build() { - R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}" + mkdir -p build + R CMD INSTALL "${_cranname}" -l "${srcdir}/build" +} + +check() { + cd "${_cranname}/tests" + R_LIBS="${srcdir}/build" NOT_CRAN=true Rscript --vanilla testthat.R } package() { install -dm0755 "${pkgdir}/usr/lib/R/library" - cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library" + cp -a --no-preserve=ownership "build/${_cranname}" "${pkgdir}/usr/lib/R/library" + + install -Dm644 CRAN-MIT-TEMPLATE "${pkgdir}/usr/share/licenses/${pkgname}/MIT" + install -Dm644 "${_cranname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } |