1 |
commit: 4c7d6484b9c99e26ff95316fbb3369cc32c82d55 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 29 02:43:39 2016 +0000 |
4 |
Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 29 02:43:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c7d6484 |
7 |
|
8 |
net-misc/wireguard: new ebuild |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
net-misc/wireguard/metadata.xml | 8 +++++ |
13 |
net-misc/wireguard/wireguard-9999.ebuild | 50 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 58 insertions(+) |
15 |
|
16 |
diff --git a/net-misc/wireguard/metadata.xml b/net-misc/wireguard/metadata.xml |
17 |
new file mode 100644 |
18 |
index 0000000..915f002 |
19 |
--- /dev/null |
20 |
+++ b/net-misc/wireguard/metadata.xml |
21 |
@@ -0,0 +1,8 @@ |
22 |
+<?xml version="1.0" encoding="UTF-8"?> |
23 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
24 |
+<pkgmetadata> |
25 |
+ <maintainer type="person"> |
26 |
+ <email>zx2c4@g.o</email> |
27 |
+ <name>Jason A. Donenfeld</name> |
28 |
+ </maintainer> |
29 |
+</pkgmetadata> |
30 |
|
31 |
diff --git a/net-misc/wireguard/wireguard-9999.ebuild b/net-misc/wireguard/wireguard-9999.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..675c751 |
34 |
--- /dev/null |
35 |
+++ b/net-misc/wireguard/wireguard-9999.ebuild |
36 |
@@ -0,0 +1,50 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+inherit linux-mod linux-info |
44 |
+ |
45 |
+DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." |
46 |
+HOMEPAGE="https://www.wireguard.io/" |
47 |
+ |
48 |
+if [[ ${PV} == 9999 ]]; then |
49 |
+ inherit git-r3 |
50 |
+ EGIT_REPO_URI="https://git.zx2c4.com/WireGuard" |
51 |
+ KEYWORDS="" |
52 |
+else |
53 |
+ SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz" |
54 |
+ KEYWORDS="~amd64 ~x86" |
55 |
+fi |
56 |
+ |
57 |
+LICENSE="GPL-2" |
58 |
+SLOT="0" |
59 |
+IUSE="" |
60 |
+ |
61 |
+DEPEND="net-libs/libmnl" |
62 |
+RDEPEND="${DEPEND}" |
63 |
+ |
64 |
+MODULE_NAMES="wireguard(net:src)" |
65 |
+BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1" |
66 |
+CONFIG_CHECK="NET_UDP_TUNNEL IPV6 NETFILTER_XT_MATCH_HASHLIMIT ~PADATA" |
67 |
+ERROR_NET_UDP_TUNNEL="WireGuard requires NET_UDP_TUNNEL." |
68 |
+ERROR_IPV6="WireGuard requires IPV6 support in the kernel." |
69 |
+ERROR_NETFILTER_XT_MATCH_HASHLIMIT="WireGuard requires NETFILTER_XT_MATCH_HASHLIMIT." |
70 |
+ERROR_PADATA="If you're running a multicore system you likely should enable CONFIG_PADATA for improved performance and parallel crypto." |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ linux-mod_pkg_setup |
74 |
+ kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1" |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ linux-mod_src_compile |
79 |
+ emake -C src/tools |
80 |
+} |
81 |
+ |
82 |
+src_install() { |
83 |
+ dodoc README.md |
84 |
+ linux-mod_src_install |
85 |
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src/tools install |
86 |
+} |