~dricottone/pkgbuilds

ref: 97aaccddc6394dc838e1afde31740b575cc95cde pkgbuilds/r-xml2-git/PKGBUILD -rw-r--r-- 980 bytes
97aaccddDominic Ricottone Added r-rematch 1 year, 29 days ago
                                                                                
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
# 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"
}