# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
# Contributor: Ward Segers <w@rdsegers.be>
# Contributor: Alex Branham <branham@utexas.edu>
_cranname=xml2
_cranver=1.3.5
pkgname=r-${_cranname,,}-git
pkgver=r805.a55c225
pkgrel=1
pkgdesc="Parse XML"
arch=(i686 x86_64)
url="https://cran.r-project.org/package=${_cranname}"
license=(MIT)
depends=('r>=3.1.0' r-methods libxml2 r-cli r-rlang)
conflicts=('r-xml2')
provides=('r-xml2')
makedepends=('git')
optdepends=(r-covr r-curl r-httr r-knitr r-magrittr r-mockery r-rmarkdown r-testthat)
source=("${pkgname}::git+https://github.com/r-lib/xml2#commit=a55c225")
sha256sums=('SKIP')
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
build() {
R CMD INSTALL "$pkgname" -l "${srcdir}"
}
package() {
cd "${srcdir}"
install -dm0755 "${pkgdir}/usr/lib/R/library"
cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library"
}