67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
|
# 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.20190601
|
||
|
pkgrel=0
|
||
|
pkgdesc="Next generation secure network tunnel: userspace tools"
|
||
|
arch='all'
|
||
|
url='https://www.wireguard.com'
|
||
|
license="GPL-2.0"
|
||
|
makedepends="libmnl-dev"
|
||
|
depends="$pkgname-wg $pkgname-wg-quick"
|
||
|
subpackages="
|
||
|
$pkgname-doc
|
||
|
$pkgname-bash-completion:bashcomp:noarch
|
||
|
$pkgname-wg:_split
|
||
|
$pkgname-wg-quick:_split:noarch
|
||
|
"
|
||
|
options="!check"
|
||
|
source="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$pkgver.tar.xz
|
||
|
alpine-compat.patch
|
||
|
"
|
||
|
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/"
|
||
|
}
|
||
|
|
||
|
_split() {
|
||
|
local cmd=${subpkgname/$pkgname-}
|
||
|
pkgdesc="$pkgdesc ($cmd)"
|
||
|
case $cmd in
|
||
|
wg-quick) depends="$pkgname-wg iproute2 bash openresolv" ;;
|
||
|
*) depends= ;;
|
||
|
esac
|
||
|
mkdir -p "$subpkgdir"/usr/bin
|
||
|
mv "$pkgdir"/usr/bin/$cmd "$subpkgdir"/usr/bin/
|
||
|
}
|
||
|
|
||
|
bashcomp() {
|
||
|
depends="bash"
|
||
|
pkgdesc="WireGuard bash completions"
|
||
|
|
||
|
mkdir -p "$subpkgdir"/usr
|
||
|
mv "$pkgdir"/usr/share "$subpkgdir"/usr
|
||
|
}
|
||
|
|
||
|
sha512sums="d667e42b90fbda85b005ae2966689dadc9975c1a53ca5ddfff44214ed55ad7d55d451008c225a4619c834bd7af598af1f127d76a8a3a86cf2e6d886ea0638cf3 WireGuard-0.0.20190601.tar.xz
|
||
|
4577574333f023217ae6e0945807e1ccd2dec7caa87e329b1d5b44569f6b5969663ad74f8154b85d3dc7063dd762649e3fa87c7667e238ffb77c0e5df9245a5e alpine-compat.patch"
|