summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b85ed06cee02cb2b9d724636ce5dfef8618190cf (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
# Maintainer: Axel Lehmann <lehmann at cs dot uni-freiburg do de>
pkgname=gantry-git
pkgver=v0.5.0.r0.g06c0e5c
pkgrel=1
pkgdesc='Pipeline management tool using containers as its building blocks'
arch=('x86_64')
url="https://github.com/ad-freiburg/gantry"
license=('APACHE')
depends=('docker')
makedepends=('go-pie' 'git')
optdepends=('wharfer: wrapper around docker')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname}::git+${url}")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$pkgname"
  go build \
    -gcflags "all=-trimpath=$PWD" \
    -asmflags "all=-trimpath=$PWD" \
    -ldflags "-X github.com/ad-freiburg/gantry.Version=$(git describe --always --long --dirty) -extldflags $LDFLAGS" \
    -o $pkgname cmd/gantry/gantry.go
}

package() {
  cd "$pkgname"
  install -Dm755 $pkgname "$pkgdir"/usr/bin/${pkgname%-git}
}