aboutsummaryrefslogtreecommitdiffstats
path: root/testing/wireguard-tools/APKBUILD
blob: dfb5c83750657a186353e7e1adf8dd58f2f7f451 (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
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>

# NOTE: pkgrel must match _toolsrel in wireguard-vanilla
pkgname=wireguard-tools
pkgver=0.0.20181119
pkgrel=0
pkgdesc="Next generation secure network tunnel: userspace tools"
arch='all'
url='https://www.wireguard.com'
license="GPL-2.0"
makedepends="libmnl-dev"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
options="!check"
source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar.xz"
builddir="$srcdir"/WireGuard-$pkgver

build() {
	cd "$builddir"
	make -C src/tools
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir/usr/share/doc/$pkgname"

	make -C src/tools \
		DESTDIR="$pkgdir" \
		WITH_BASHCOMPLETION=yes \
		WITH_WGQUICK=yes \
		WITH_SYSTEMDUNITS=no \
		install

	find "$builddir"/contrib/examples -name '.gitignore' -delete
	cp -rf "$builddir"/contrib/examples "$pkgdir/usr/share/doc/$pkgname/"
}

bashcomp() {
	depends="bash"
	pkgdesc="WireGuard bash completions"

	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/share "$subpkgdir"/usr
}

sha512sums="dc9286e536bb3f4a6545261b98b5bb056a085f2e95b1b571350168af23cda5231a90b915b03dd29d195412fc61efc781b7d57b2a15a42a34b97e989a5105198e  WireGuard-0.0.20181119.tar.xz"