summaryrefslogtreecommitdiff
path: root/community/lab/APKBUILD
blob: 3f093dd14e2cae0acc95f57a4ce59c4763b96e64 (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=lab
pkgver=0.20.0
pkgrel=1
pkgdesc="Git Wrapper for GitLab"
url="https://zaquestion.github.io/lab/"
arch="all !mips64" # limited by go
license="CC0-1.0"
depends="git"
makedepends="go"
checkdepends="bash"
subpackages="
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="lab-$pkgver.tar.gz::https://github.com/zaquestion/lab/archive/v$pkgver.tar.gz
	use-syscall-dup3.patch
	"
#builddir="$srcdir/src/github.com/zaquestion/$pkgname"
options="net !check chmod-clean" # Tests require configured GitLab account with SSH keys

export GOPATH="$srcdir"
export CGO_ENABLED=0

build() {
	GO111MODULE=on go build -ldflags "-X main.version=$pkgver" -o bin/$pkgname
	./bin/lab completion bash > lab.bash
	./bin/lab completion zsh > _lab.zsh
	./bin/lab completion fish > lab.fish
}

package() {
	install -Dm755 "$builddir"/bin/$pkgname \
		"$pkgdir"/usr/bin/$pkgname
	install -Dm644 "$builddir"/lab.bash \
		"$pkgdir"/usr/share/bash-completion/completions/$pkgname
	install -Dm644 "$builddir"/_lab.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_$pkgname
	install -Dm644 "$builddir"/lab.fish \
		"$pkgdir"/usr/share/fish/completions/$pkgname.fish
}

sha512sums="741dd9d869fc78abc217cc70adf3fa0ac0060940ac66912279fd657007ffdeea6d2873a659ec1e5d814afff2ca78e82efe272bc6b38b7dc2bb07dfe73cd86beb  lab-0.20.0.tar.gz
54729465d81ccffcc2ea01211c8c4ab26931c3980516b50e795997910b9beb2e89c025db178656ad4ccc0eac35a26d8a288a9fa3bdf9b38beba1074caf5181ab  use-syscall-dup3.patch"