aboutsummaryrefslogtreecommitdiffstats
path: root/testing/drone/APKBUILD
blob: 4d8823d7ebf822a6a31e8355334f253d7c454fc1 (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
47
48
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=drone
pkgver=1.6.5
pkgrel=0
pkgdesc="Container-Native, Continuous Delivery Platform"
url="https://drone.io/"
arch="all"
license="custom"
makedepends="go"
options="!check"
_commands="
	$pkgname-agent:_pkg
	$pkgname-controller:_pkg
	$pkgname-server:_pkg
	"
subpackages="
	$_commands
	$pkgname-doc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/drone/drone/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir"

build() {
	for pkg in $_commands; do
		GO111MODULE=on go build -o bin/${pkg%%:*} ./cmd/${pkg%%:*}
	done
}

package() {
	install -Dm 644 "$builddir"/LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

_pkg() {
	pkgdesc="$pkgdesc ($subpkgname)"
	install_if="$pkgname"
	install -Dm775 "$builddir"/bin/$subpkgname \
		"$subpkgdir"/usr/bin/$subpkgname
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="d1675ea336be0e5c80381bb5b265cb1fe81d877217e7c0f6e6d647663ce1048e00d787fe58b8cbd85adf42d4f8f4eaea42a7c8725caa052b3098ce7cb53a76c9  drone-1.6.5.tar.gz"