summaryrefslogtreecommitdiff
path: root/net-misc
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2016-06-29 04:43:39 +0200
committerJason A. Donenfeld <zx2c4@gentoo.org>2016-06-29 04:43:47 +0200
commit4c7d6484b9c99e26ff95316fbb3369cc32c82d55 (patch)
treec15d813a3982195ac2db125315150841f4669345 /net-misc
parent57c5991e03570071692d111a0f0fe36bd4946b9a (diff)
downloadgentoo-4c7d6484b9c99e26ff95316fbb3369cc32c82d55.tar.gz
gentoo-4c7d6484b9c99e26ff95316fbb3369cc32c82d55.tar.xz
net-misc/wireguard: new ebuild
Package-Manager: portage-2.3.0
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/wireguard/metadata.xml8
-rw-r--r--net-misc/wireguard/wireguard-9999.ebuild50
2 files changed, 58 insertions, 0 deletions
diff --git a/net-misc/wireguard/metadata.xml b/net-misc/wireguard/metadata.xml
new file mode 100644
index 00000000000..915f0022706
--- /dev/null
+++ b/net-misc/wireguard/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/wireguard/wireguard-9999.ebuild b/net-misc/wireguard/wireguard-9999.ebuild
new file mode 100644
index 00000000000..675c7517710
--- /dev/null
+++ b/net-misc/wireguard/wireguard-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit linux-mod linux-info
+
+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/WireGuard-${PV}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+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_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
+}