summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14f9f25eb574b750748c26fa058b34f23f9911eb (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
pkgdesc='App Container Server Push Command'
pkgname=acpush
pkgver=0.0.0 # TODO pending release
pkgrel=5
url="https://github.com/appc/$pkgname"
source=("git+${url}.git")
makedepends=('git' 'go')
options=('!strip')
arch=('i686' 'x86_64')
md5sums=('SKIP')
license=('Apache')

# 1.
prepare() { # TODO pending release
    local base=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
    local repo="$srcdir/$pkgname" # working repo location
    local target=$([[ $pkgver == "0.0.0" ]] && printf "master" || printf "v$pkgver")
    git -C "$repo" checkout --quiet "$target" # checkout proper version
    git -C "$repo" status # verify working repo change
}

# 2.
build() {
    cd $pkgname
    ./build
}

# 3.
check() {
    true
}

# 4.
package() {
    cd "$pkgname"
    install -D -m755 bin/$pkgname "$pkgdir/usr/bin/$pkgname"
}