aboutsummaryrefslogtreecommitdiffstats
path: root/testing/fastd/APKBUILD
blob: 6954161c7521d280eb3efd4d197b22bb40d1838c (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
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr>
pkgname=fastd
pkgver=21
pkgrel=0
pkgdesc="Fast and Secure Tunneling Daemon"
url="https://github.com/NeoRaider/fastd/"
arch="all"
license="BSD-2-Clause AND BSD-3-Clause"
makedepends="meson libcap-dev json-c-dev libsodium-dev openssl-dev libuecc-dev
	bison"
checkdepends="cmocka-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://github.com/NeoRaider/fastd/releases/download/v$pkgver/fastd-$pkgver.tar.xz
	fastd.conf
	fastd.initd"

# secfixes:
#   21-r0:
#     - CVE-2020-27638

build() {
	abuild-meson \
		-Dsystemd=disabled \
		-Dbuild_tests=$(options_has !check && echo false || echo true) \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm0644 doc/fastd.1 -t "$pkgdir"/usr/share/man/man1

	install -dm700 "$pkgdir"/etc/fastd/peers/
	install -Dm600 "$srcdir"/fastd.conf \
		"$pkgdir"/etc/fastd/fastd.conf
	install -Dm755 "$srcdir"/fastd.initd \
		"$pkgdir"/etc/init.d/fastd
}

sha512sums="e6293559cabd186b5e784fd97dd4f33159980699532c7713264404d105d7a0923e417c43e639ef845d80088abec534a7417b2e5eaf39a65be431d1985c2e5ca4  fastd-21.tar.xz
3e6c3a77f93a1e670e8f018833c499e8ec57b8240a6f472da03254ad9a7e6fed2c3459fa47b06c97e42afcfe6f0adfaaec39bce6b6a286a1ce7ef3585853b118  fastd.conf
e64b0c548cf063624ac0b632bac672c5f204586aa03aa9b06afc46f48645f1458e2400e98ee993c74aa5da3a9e86c4151e2e29c634ee59941cd81a216cea308a  fastd.initd"