diff --git a/package/wireguard-tools/package b/package/wireguard-tools/package new file mode 100755 index 000000000..8a960c64b --- /dev/null +++ b/package/wireguard-tools/package @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Copyright (c) 2031 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(wireguard-tools) +pkgdesc="Fast, modern, secure VPN tunnel" +url=https://www.wireguard.com +pkgver=1.0.20210914-1 +timestamp=2021-02-23T00:00Z +section=kernel +maintainer="Salvatore Stella " +license=GPL-2.0-only +image=base:v3.1 +source=("https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${pkgver%-*}.tar.xz") + +sha256sums=(97ff31489217bb265b7ae850d3d0f335ab07d2652ba1feec88b734bc96bd05ac) + +prepare() { + # The symlink at src/wg-quick/wg needs something to point to + touch "$srcdir/src/wg" +} + +build() { + make -C "$srcdir/src" PLATFORM=linux "CC=${CROSS_COMPILE}cc" +} + +package() { + install -D -t "$pkgdir/opt/bin" "$srcdir/src/wg" + install -D "$srcdir/src/wg-quick/linux.bash" "$pkgdir/opt/bin/wg-quick" +}