summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e3dbb54b11948ba5c4dc6fefa1259097b7b8199 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Konstantin Gizdov < arch at kge dot pw >

pkgname=simpletools
pkgver=2.0v.e574cc8
_commit=e574cc8
pkgrel=4
pkgdesc="Handy command line tools for ntuple manipulation and analysis."
arch=('i686' 'x86_64')
url="https://github.com/cofitzpa/simpletools"
license=('GPL2')
provides=('simpletools')
depends=('root')
source=("${pkgname}::git+https://github.com/cofitzpa/simpletools#commit=${_commit}"
        'settings.cmake')
sha256sums=('SKIP'
            '540b86cd9997926026a5d277c819ae9c348bde7921158a78f3c676c855b6ab5e')
options=('!emptydirs')


prepare() {
    mkdir -p "${srcdir}/${pkgname}/build"
    cd "${srcdir}/${pkgname}/build"
    cmake -C "${srcdir}/settings.cmake" "${srcdir}/${pkgname}"
}

build() {
    cd "${srcdir}/${pkgname}/build"
    make
}

package() {
    cd "${srcdir}/${pkgname}/build"
    make DESTDIR="${pkgdir}" install

    # install tutorials
    install -d "${pkgdir}/usr/share/simpletools/tutorial/"
    declare -a tutorials
    tutorials=("${srcdir}/${pkgname}"/simpletools_tutorial/*)
    for tutorial in "${tutorials[@]}"; do
        install -Dm644 "${tutorial}" "${pkgdir}/usr/share/simpletools/tutorial/"
    done

    # install docs & license
    install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/simpletools/LICENSE"
    install -Dm644 "${srcdir}/${pkgname}/README.md" "${pkgdir}/usr/share/doc/simpletools/README.md"
}