aboutsummaryrefslogtreecommitdiffstats
path: root/community/drone/APKBUILD
blob: 7aa5e89fb7d297d3a720ae7e1d6a72a66b1e5cc4 (plain) (blame)
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
49
50
51
52
53
54
55
56
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=drone
pkgver=2.12.1
pkgrel=3
pkgdesc="Container-Native, Continuous Delivery Platform"
url="https://drone.io/"
license="Apache-2.0"
arch="all"
pkgusers="drone"
pkggroups="drone"
makedepends="go"
subpackages="$pkgname-doc $pkgname-openrc"
install="$pkgname.pre-install"
source="https://github.com/harness/drone/archive/v$pkgver/drone-$pkgver.tar.gz
	drone.initd
	drone.confd
	drone.conf
	"
options="net chmod-clean"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	# see: https://github.com/harness/drone/blob/master/BUILDING_OSS
	go build -tags "oss nolimit" -o bin/drone-server ./cmd/drone-server
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/drone-server \
		"$pkgdir"/usr/bin/drone-server
	install -Dm 644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE

	install -Dm755 "$srcdir"/drone.initd \
		"$pkgdir"/etc/init.d/drone
	install -Dm644 "$srcdir"/drone.confd \
		"$pkgdir"/etc/conf.d/drone

	install -Dm640 -o drone -g drone "$srcdir"/drone.conf \
		"$pkgdir"/etc/drone.conf
	install -dm755 -o drone -g drone "$pkgdir"/var/lib/drone
}

sha512sums="
8671f30d973385960d71bd9f624b0ec483f43fb3eae8b083436ac7b0f274301af9fbd082d414adcba286df66fc4f35d791a99f5fec641b4dd63d7debe1ebca53  drone-2.12.1.tar.gz
6f3bf95e6b6bd978c3c2d4951676c89853bae3706098a3e609f296d36cb92c3d68a3390d1bc4b57aaf97f914d25d8d5fa88a32a0410f6d049b947c6978db773d  drone.initd
b2b0d6dbffe987d42292ee0f9c39f8a4e59a62249b62f6bc99369738c17ebe6a699264f13d0e9a4690ebcfd48c4f07637043878f801c1a47fba71f0ef62ca26d  drone.confd
a12f920b568b88a0a813cffcb8dd3dfa2c8e010e5ab0c7b53f07d8084ab68a5bc8b3b11b9fbc2d171d239f5aa775af8240f926472c1aef3c823aea010fd4ad5a  drone.conf
"