summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66896333d55160618defbdc4884d5e3633330ff3 (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
pkgname=cernvm-webapi
pkgver=r206.44badf3
pkgrel=1
pkgdesc="CernVM WebAPI Based on URI-Handlers"
arch=('i686' 'x86_64')
url="https://test4theory.cern.ch/challenge/"
license=('GPL3')
depends=('gcc' 'cmake' 'gksu' 'virtualbox')
makedepends=('')
source=("git+https://github.com/wavesoft/cernvm-webapi.git"
        "git+https://github.com/wavesoft/libcernvm.git"
        "cernvm-webapi.service")
md5sums=('SKIP'
         'SKIP'
         '61d5a2e39d22a46447b2655ed428f7bf')

pkgver() {
    cd "$pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$pkgname"

    if [[ $CARCH == "i686" ]]; then
        chmod +x prepare-linux32.sh
        ./prepare-linux32.sh
        cd build_linux_i386-Release
    elif [[ $CARCH == "x86_64" ]]; then
        chmod +x prepare-linux64.sh
        ./prepare-linux64.sh
        cd build_linux_amd64-Release
    fi

    make
    export _BUILDIR=$(pwd)
}

package() {
    cd "$_BUILDIR"

    make DESTDIR="$pkgdir/" install
    install -D "../../cernvm-webapi.service" "$pkgdir/usr/lib/systemd/system/cernvm-webapi.service"
}