blob: 9e6e6fdce53163bbaae3c43960f54ab9ae36e591 (
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
|
# Maintainer: Axel Lehmann <lehmann at cs dot uni-freiburg do de>
pkgname=wharfer-git
pkgver=v0.5.3.r0.ge30c81f
pkgrel=1
pkgdesc='wrapper around docker'
arch=('x86_64')
url="https://github.com/ad-freiburg/wharfer"
license=('APACHE')
depends=('docker')
makedepends=('go-pie' 'git')
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 main.version=$(git describe --always --long --dirty) -extldflags $LDFLAGS" \
-o $pkgname .
}
package() {
cd "$pkgname"
install -Dm755 $pkgname "$pkgdir"/usr/bin/${pkgname%-git}
chown root:docker "$pkgdir"/usr/bin/${pkgname%-git}
chmod g+s "$pkgdir"/usr/bin/${pkgname%-git}
}
|