summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3000de225cef2da748ec3b27237295b08835684b (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
# Maintainer: peippo <christoph+aur@christophfink.com>

_cranname=gettz
_cranver=0.0.5
pkgname=r-${_cranname,,}
pkgdesc="Get the Timezone Information"
url="https://cran.r-project.org/package=${_cranname}"
license=("GPL2" "GPL3")
pkgver=${_cranver//[:-]/.}
pkgrel=2

arch=("i686" "x86_64")
depends=(
    "r"
)

source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz")
b2sums=("3ce9f447a174a47c251ed1f1cee314721b75dd9a32f3fcee96b5c84d5ec40dcf6456636509c73b815a201a79353d664490a343b6eef221bdcdcdb6ca45b45a39")

build() {
    mkdir -p "${srcdir}/build/"
    R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}/build/"
}

package() {
    install -dm0755 "${pkgdir}/usr/lib/R/library"
    cp -a --no-preserve=ownership "${srcdir}/build/${_cranname}" "${pkgdir}/usr/lib/R/library"
    if [[ -f "${_cranname}/LICENSE" ]]; then
        install -Dm0644 "${_cranname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    fi
}