aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lab/APKBUILD
blob: c4bc4cf33b8ea8d4d5562619136f0f6532049ac7 (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:
pkgname="lab"
pkgver="0.16.0"
pkgrel=0
pkgdesc="A Git Wrapper for GitLab"
url="https://zaquestion.github.io/lab/"
arch="all"
license="CC0-1.0"
depends="git"
makedepends="go"
checkdepends="bash"
source="lab-$pkgver.tar.gz::https://github.com/zaquestion/lab/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/zaquestion/$pkgname"
options="net !check"

export GOPATH="$srcdir"
export CGO_ENABLED=0

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}

build() {
	GO111MODULE=on go build -ldflags "-X main.version=$pkgver" -o bin/$pkgname
}

package() {
	install -Dm755 "$builddir"/bin/$pkgname \
		"$pkgdir"/usr/bin/$pkgname
}

check() {
	# this is disabled cause it tries to clone from
	# gitlab.com ssh repo without having a host key
	make test
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="8036dd3921f2e02433274a4e3dc215e8afc604c385753105c8640f2795f4566641a30a27ce8ddb99496bab5101e573a7607ca3990c4e6587834a6ecf061e92f2  lab-0.16.0.tar.gz"