aboutsummaryrefslogtreecommitdiffstats
path: root/community/nebula/APKBUILD
blob: 244da972efc1227ed1454815bd0ab29b36c8501e (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: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=nebula
pkgver=1.6.0
pkgrel=3
pkgdesc="Scalable overlay networking tool with a focus on performance, simplicity and security"
url="https://github.com/slackhq/nebula"
license="MIT"
# armv7 blocked by test failure https://github.com/slackhq/nebula/issues/212
arch="all"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
makedepends="go libcap"
subpackages="$pkgname-openrc"
source="https://github.com/slackhq/nebula/archive/v$pkgver/nebula-$pkgver.tar.gz
	$pkgname.initd
	"

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

build() {
	make BUILD_NUMBER="$pkgver" bin
}

check() {
	make test
}

package() {
	install -Dm750 -o nebula -g nebula nebula -t "$pkgdir"/usr/sbin/
	setcap cap_net_admin+ep "$pkgdir"/usr/sbin/nebula

	install -Dm755 nebula-cert -t "$pkgdir"/usr/bin/

	install -Dm644 examples/config.yml -t "$pkgdir"/etc/$pkgname

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

sha512sums="
766f2eaa3fb3b4eb24b9036e0ceb5bf0bd342205bc8c38416e51a694ab146de02c25122a4bad7b0d27726426b5ca81699967b70cbe65f9612dd2322744a22c74  nebula-1.6.0.tar.gz
9124a728ccbf554cbafd9bdf7ed3ab72837ec12bb3d6cf65286c30dd67f6b4de41f3bbe3392a7607977c2d59af3403309643a9ab889fd96516e4bc0692a98f1d  nebula.initd
"