add r-vdiffr

This commit is contained in:
Sukanka 2022-06-04 09:51:52 +08:00
parent 1476a1cd2d
commit 237b60f3da
3 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# system requirements: C++11, libpng
# Maintainer: sukanka <su975853527@gmail.com>
_pkgname=vdiffr
_pkgver=1.0.4
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//[:-]/.}
pkgrel=1
pkgdesc='Visual Regression Testing and Graphical Diffing'
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('MIT')
depends=(
r
r-cpp11
r-diffobj
r-glue
r-htmltools
r-lifecycle
r-rlang
r-testthat
r-xml2
libpng
)
optdepends=(
r-covr
r-ggplot2
r-roxygen2
r-withr
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('9e37f7eb8717e321c6ad709a8a29cb148c1b207fb1527f725adf49033db216fd')
build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
}
package() {
install -dm0755 "${pkgdir}/usr/lib/R/library"
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
install -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python3
from lilaclib import *
def pre_build():
for line in edit_file('PKGBUILD'):
if line.startswith('_pkgver='):
line = f'_pkgver={_G.newver}'
print(line)
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
def post_build():
git_pkgbuild_commit()

View file

@ -0,0 +1,16 @@
build_prefix: extra-x86_64
maintainers:
- github: sukanka
repo_depends:
- r-cpp11
- r-diffobj
- r-glue
- r-htmltools
- r-lifecycle
- r-rlang
- r-testthat
- r-xml2
update_on:
- regex: vdiffr_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=vdiffr