net-misc/wireguard: snapshot
authorJason A. Donenfeld <zx2c4@gentoo.org>
Thu, 30 Jun 2016 18:41:09 +0000 (20:41 +0200)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Thu, 30 Jun 2016 18:41:36 +0000 (20:41 +0200)
Package-Manager: portage-2.3.0

net-misc/wireguard/Manifest [new file with mode: 0644]
net-misc/wireguard/wireguard-0.0.20160630.ebuild [new file with mode: 0644]
net-misc/wireguard/wireguard-9999.ebuild

diff --git a/net-misc/wireguard/Manifest b/net-misc/wireguard/Manifest
new file mode 100644 (file)
index 0000000..f84ac3e
--- /dev/null
@@ -0,0 +1 @@
+DIST wireguard-0.0.20160630.tar.xz 104612 SHA256 701c9be1d4bb905d10be5dc14b71f7e84e8dcf6e8a8aa77cd7be97b4c3b13218 SHA512 3916b902fa36ea2b00ceaf15d9520d42258fc67ffbb44a7f1f1ebe4ae4f3fcca55cc1f90f8c59f0c640df6ec8618114c71b49785bf70ba52458dfa7c1d2e5055 WHIRLPOOL 03b90ad83e71a915c736b68c1e8acda8d11509042e488a148a1f4540b9f45ffc99a32db43f5360ee7da6d79d11df48c49c5260acc67b2b1c3d169475edcd656c
diff --git a/net-misc/wireguard/wireguard-0.0.20160630.ebuild b/net-misc/wireguard/wireguard-0.0.20160630.ebuild
new file mode 100644 (file)
index 0000000..637d226
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit linux-mod
+
+DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography."
+HOMEPAGE="https://www.wireguard.io/"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://git.zx2c4.com/WireGuard"
+       KEYWORDS=""
+else
+       SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/experimental/${PV}.tar.xz -> ${P}.tar.xz"
+       S="${WORKDIR}/experimental/${PV}"
+       KEYWORDS="~amd64 ~x86 ~mips ~arm ~arm64"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="net-libs/libmnl"
+RDEPEND="${DEPEND}"
+
+MODULE_NAMES="wireguard(net:src)"
+BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1"
+CONFIG_CHECK="NET_UDP_TUNNEL IPV6 NETFILTER_XT_MATCH_HASHLIMIT ~PADATA"
+ERROR_NET_UDP_TUNNEL="WireGuard requires NET_UDP_TUNNEL."
+ERROR_IPV6="WireGuard requires IPV6 support in the kernel."
+ERROR_NETFILTER_XT_MATCH_HASHLIMIT="WireGuard requires NETFILTER_XT_MATCH_HASHLIMIT."
+ERROR_PADATA="If you're running a multicore system you likely should enable CONFIG_PADATA for improved performance and parallel crypto."
+
+pkg_setup() {
+       linux-mod_pkg_setup
+       kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1"
+}
+
+src_prepare() {
+       default
+       sed -i 's/install -s/install/' src/tools/Makefile
+}
+
+src_compile() {
+       linux-mod_src_compile
+       emake -C src/tools
+}
+
+src_install() {
+       dodoc README.md
+       linux-mod_src_install
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src/tools install
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       ewarn
+       ewarn "This software is experimental and has not yet been released."
+       ewarn "As such, it may contain significant issues. Please do not file"
+       ewarn "bug reports with Gentoo, but rather direct them upstream to:"
+       ewarn
+       ewarn "    team@wireguard.io    security@wireguard.io"
+       ewarn
+}
index 4a27f4c10f87b97250347e2cb3a9bffac7f861c8..637d226ded3b3f484293add9be7cbb43fae05bce 100644 (file)
@@ -14,8 +14,9 @@ if [[ ${PV} == 9999 ]]; then
        EGIT_REPO_URI="https://git.zx2c4.com/WireGuard"
        KEYWORDS=""
 else
-       SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz"
-       KEYWORDS="~amd64 ~x86"
+       SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/experimental/${PV}.tar.xz -> ${P}.tar.xz"
+       S="${WORKDIR}/experimental/${PV}"
+       KEYWORDS="~amd64 ~x86 ~mips ~arm ~arm64"
 fi
 
 LICENSE="GPL-2"
@@ -53,3 +54,14 @@ src_install() {
        linux-mod_src_install
        emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src/tools install
 }
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+       ewarn
+       ewarn "This software is experimental and has not yet been released."
+       ewarn "As such, it may contain significant issues. Please do not file"
+       ewarn "bug reports with Gentoo, but rather direct them upstream to:"
+       ewarn
+       ewarn "    team@wireguard.io    security@wireguard.io"
+       ewarn
+}