1 |
commit: 4ebe485d3e10445f795c35bb86114c441839bf94 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 28 22:26:16 2018 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 28 22:26:40 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ebe485d |
7 |
|
8 |
net-vpn/libreswan: add 3.25 |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
|
12 |
net-vpn/libreswan/Manifest | 1 + |
13 |
net-vpn/libreswan/libreswan-3.25.ebuild | 112 ++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 113 insertions(+) |
15 |
|
16 |
diff --git a/net-vpn/libreswan/Manifest b/net-vpn/libreswan/Manifest |
17 |
index 4f9ecefd119..9f52f710686 100644 |
18 |
--- a/net-vpn/libreswan/Manifest |
19 |
+++ b/net-vpn/libreswan/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST libreswan-3.22.tar.gz 6910418 BLAKE2B c06134fa2d1096231797f1ea93de8ed61121472b10ae30ee9a843250dce4ef9f21e7d3bf63f38daf53fbfd8d1e435cfdc704743d0fdcbde8ecac137d9becac48 SHA512 93868327394527750590e1297443d3eb1c9a528d680348098fd2913123dac52c9fecd73b855ee00586c2516b8aa00f7f0d158d8e9b19d7487b5fb26432b86aff |
22 |
DIST libreswan-3.23.tar.gz 3836073 BLAKE2B ffb27ed75618afcf39c36b7326bb1e4b70ea8337bb4b13951bef95dc13989613c226fe83e031eeba080f55f98262df432b776c3ac5b7b4fb740506f918172ed3 SHA512 3645af522ea9ac868c55bfadfd2cf27dc5acb247543f43290cbe677a90cd00316be6520ca2128b9aaecce2b0293710ae6a2bd710a7d93198b8cb81e32276ced8 |
23 |
+DIST libreswan-3.25.tar.gz 3988630 BLAKE2B 8479b5b0d7d49055b7dcefa6c3b2f469b0aa60005e05446d5c1c6f73a32c904835422248c6ead2a1c2dc83b63794fd50f7461fd22c4206414b5890c01b99b722 SHA512 246649cb5bef1d0690217d1080f3f6f175a0d7a5f27e5a7affdf291b2f418a11937e96b64716a33e6312530409a2c1b10b90e2fa5ec339a27c94c990d86ed517 |
24 |
|
25 |
diff --git a/net-vpn/libreswan/libreswan-3.25.ebuild b/net-vpn/libreswan/libreswan-3.25.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..b71d536ae10 |
28 |
--- /dev/null |
29 |
+++ b/net-vpn/libreswan/libreswan-3.25.ebuild |
30 |
@@ -0,0 +1,112 @@ |
31 |
+# Copyright 1999-2018 Gentoo Foundation |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+inherit systemd toolchain-funcs |
37 |
+ |
38 |
+SRC_URI="https://download.libreswan.org/${P}.tar.gz" |
39 |
+KEYWORDS="~amd64 ~ppc ~x86" |
40 |
+ |
41 |
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan" |
42 |
+HOMEPAGE="https://libreswan.org/" |
43 |
+ |
44 |
+LICENSE="GPL-2 BSD-4 RSA DES" |
45 |
+SLOT="0" |
46 |
+IUSE="caps curl dnssec ldap pam seccomp selinux systemd test" |
47 |
+ |
48 |
+COMMON_DEPEND=" |
49 |
+ dev-libs/gmp:0= |
50 |
+ dev-libs/libevent:0= |
51 |
+ dev-libs/nspr |
52 |
+ caps? ( sys-libs/libcap-ng ) |
53 |
+ curl? ( net-misc/curl ) |
54 |
+ dnssec? ( net-dns/unbound net-libs/ldns ) |
55 |
+ ldap? ( net-nds/openldap ) |
56 |
+ pam? ( sys-libs/pam ) |
57 |
+ seccomp? ( sys-libs/libseccomp ) |
58 |
+ selinux? ( sys-libs/libselinux ) |
59 |
+ systemd? ( sys-apps/systemd:0= ) |
60 |
+" |
61 |
+DEPEND="${COMMON_DEPEND} |
62 |
+ app-text/docbook-xml-dtd:4.1.2 |
63 |
+ app-text/xmlto |
64 |
+ dev-libs/nss |
65 |
+ sys-devel/bison |
66 |
+ sys-devel/flex |
67 |
+ virtual/pkgconfig |
68 |
+ test? ( dev-python/setproctitle ) |
69 |
+" |
70 |
+RDEPEND="${COMMON_DEPEND} |
71 |
+ dev-libs/nss[utils(+)] |
72 |
+ sys-apps/iproute2 |
73 |
+ !net-misc/openswan |
74 |
+ !net-vpn/strongswan |
75 |
+ selinux? ( sec-policy/selinux-ipsec ) |
76 |
+" |
77 |
+ |
78 |
+usetf() { |
79 |
+ usex "$1" true false |
80 |
+} |
81 |
+ |
82 |
+src_prepare() { |
83 |
+ sed -i -e 's:/sbin/runscript:/sbin/openrc-run:' initsystems/openrc/ipsec.init.in || die |
84 |
+ sed -i -e '/^install/ s/postcheck//' -e '/^doinstall/ s/oldinitdcheck//' initsystems/systemd/Makefile || die |
85 |
+ default |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ tc-export AR CC |
90 |
+ export INC_USRLOCAL=/usr |
91 |
+ export INC_MANDIR=share/man |
92 |
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF} |
93 |
+ export FINALDOCDIR=/usr/share/doc/${PF}/html |
94 |
+ export INITSYSTEM=openrc |
95 |
+ export INC_RCDIRS= |
96 |
+ export INC_RCDEFAULT=/etc/init.d |
97 |
+ export USERCOMPILE= |
98 |
+ export USERLINK= |
99 |
+ export USE_DNSSEC=$(usetf dnssec) |
100 |
+ export USE_LABELED_IPSEC=$(usetf selinux) |
101 |
+ export USE_LIBCAP_NG=$(usetf caps) |
102 |
+ export USE_LIBCURL=$(usetf curl) |
103 |
+ export USE_LINUX_AUDIT=$(usetf selinux) |
104 |
+ export USE_LDAP=$(usetf ldap) |
105 |
+ export USE_SECCOMP=$(usetf seccomp) |
106 |
+ export USE_SYSTEMD_WATCHDOG=$(usetf systemd) |
107 |
+ export SD_WATCHDOGSEC=$(usex systemd 200 0) |
108 |
+ export USE_XAUTHPAM=$(usetf pam) |
109 |
+ export DEBUG_CFLAGS= |
110 |
+ export OPTIMIZE_CFLAGS= |
111 |
+ export WERROR_CFLAGS= |
112 |
+} |
113 |
+ |
114 |
+src_compile() { |
115 |
+ emake all |
116 |
+ emake -C initsystems INITSYSTEM=systemd UNITDIR="$(systemd_get_systemunitdir)" all |
117 |
+} |
118 |
+ |
119 |
+src_test() { |
120 |
+ : # integration tests only that require set of kvms to be set up |
121 |
+} |
122 |
+ |
123 |
+src_install() { |
124 |
+ default |
125 |
+ emake -C initsystems INITSYSTEM=systemd UNITDIR="$(systemd_get_systemunitdir)" DESTDIR="${D}" install |
126 |
+ |
127 |
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets |
128 |
+ fperms 0600 /etc/ipsec.secrets |
129 |
+ |
130 |
+ dodoc -r docs |
131 |
+ |
132 |
+ find "${D}" -type d -empty -delete || die |
133 |
+} |
134 |
+ |
135 |
+pkg_postinst() { |
136 |
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d |
137 |
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then |
138 |
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}" |
139 |
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo) |
140 |
+ eend $? |
141 |
+ fi |
142 |
+} |