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

pkgname=wireguard-tools
pkgver=0.0.20170918
pkgrel=0
pkgdesc="Next generation secure network tunnel: userspace tools"
arch='all'
url='https://www.wireguard.io'
license="GPLv2"
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/$_name

	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/$_name/
}

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

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

sha512sums="88e647e83f5d823cdfadcdc3d6a540f780401310c5f23ada5fb64446c3b2170d5ac66a8069f1f18fd3975f46d8d41d19b3ec076c4e6bfb4517476b78c3f9ccc9  WireGuard-0.0.20170918.tar.xz"