summaryrefslogblamecommitdiff
path: root/user/wireguard-tools/APKBUILD
blob: 2ae8d845b65821eb2d1de8cf21811cf1ca978390 (plain) (tree)
1
2
3
4
5



                                            
                   







































                                                                                                      
                                                                                                                                                                            
# Contributor: Luis Ressel <aranea@aixah.de>
# Maintainer: Luis Ressel <aranea@aixah.de>
pkgname=wireguard-tools
_pkgreal=WireGuard
pkgver=0.0.20190601
pkgrel=0
pkgdesc="Userland tools for the WireGuard VPN"
url="https://www.wireguard.com/"
arch="all"
options="!check" # no test suite
license="GPL-2.0-only"
depends="bash iproute2"
makedepends="libmnl-dev"
subpackages="$pkgname-bash-completion:bashcomp:noarch $pkgname-doc wireguard-patch:_patch:noarch"
source="https://git.zx2c4.com/WireGuard/snapshot/$_pkgreal-$pkgver.tar.xz"
builddir="$srcdir/$_pkgreal-$pkgver"

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

package() {
	cd "$builddir"
	make WITH_BASHCOMPLETION=yes WITH_WGQUICK=yes DESTDIR="$pkgdir" -C src/tools install
}

bashcomp() {
	depends="$pkgname"
	pkgdesc="$pkgdesc (Bash completion)"

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

_patch() {
	depends=""
	pkgdesc="Kernel patch for the WireGuard VPN"

	cd "$builddir"
	mkdir -p "$subpkgdir/usr/share/wireguard"
	contrib/kernel-tree/create-patch.sh > "$subpkgdir/usr/share/wireguard/wireguard-$pkgver.patch"

}

sha512sums="d667e42b90fbda85b005ae2966689dadc9975c1a53ca5ddfff44214ed55ad7d55d451008c225a4619c834bd7af598af1f127d76a8a3a86cf2e6d886ea0638cf3  WireGuard-0.0.20190601.tar.xz"