1 |
commit: 2119e6cd984bbb640b6a1d0234701bbafb7040de |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 2 01:51:56 2020 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 2 01:51:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=2119e6cd |
7 |
|
8 |
net-vpn/openconnect: drop very old and unsupported version |
9 |
|
10 |
Use openconnect from gentoo.git with USE=gnutls instead. |
11 |
|
12 |
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> |
13 |
|
14 |
net-vpn/openconnect/Manifest | 3 - |
15 |
.../files/openconnect-7.08-libressl251.patch | 14 -- |
16 |
net-vpn/openconnect/files/openconnect.conf.in | 26 ---- |
17 |
net-vpn/openconnect/files/openconnect.init.in-r4 | 88 ----------- |
18 |
net-vpn/openconnect/files/openconnect.logrotate | 8 - |
19 |
net-vpn/openconnect/metadata.xml | 11 -- |
20 |
net-vpn/openconnect/openconnect-7.08-r1.ebuild | 166 --------------------- |
21 |
net-vpn/openconnect/openconnect-7.08.ebuild | 166 --------------------- |
22 |
8 files changed, 482 deletions(-) |
23 |
|
24 |
diff --git a/net-vpn/openconnect/Manifest b/net-vpn/openconnect/Manifest |
25 |
deleted file mode 100644 |
26 |
index 9e20256..0000000 |
27 |
--- a/net-vpn/openconnect/Manifest |
28 |
+++ /dev/null |
29 |
@@ -1,3 +0,0 @@ |
30 |
-DIST openconnect-7.08.tar.gz 1686133 SHA256 1c44ec1f37a6a025d1ca726b9555649417f1d31a46f747922b84099ace628a03 SHA512 22f9b0bd4bd17e2ab91ff42b2464c89abba035fe705c037ba4d1042ace460c8738e20481783a1edc3b7dd6503fe9fcc7fdd188552811fb1525310e25a4c2f400 WHIRLPOOL 0f3e9f2435be11915de1e73075454f6be45dc4752df7d27b69a186dc7d8c9a6ce49d0a55510b3e836b26bced78eaa792f78ce9be5c51cff4212cd5c799e3ad70 |
31 |
-DIST vpnc-scripts-20160829.tar.gz 20297 SHA256 b737cbfbd2a0c9339ad108f8f2f02269981f0236ff350ce675b0391a08f861bc SHA512 0edd0e5184ac4a705f213a87fa8afa2e2cd54c9bd1aa01955a3a5107c42da8eae7b639896daceecc556a63b0663ee47e25fc21e77f0f74774330d546584fd2c1 WHIRLPOOL 0afe6e9ec1fb952bdad319d65f2353e7a8812e3301bc94ad3c472081ec9673506c9a52d8c4bd4f1035cfacca9f30494b9822034a6d468ce4357277ede2330d1e |
32 |
-DIST vpnc-scripts-20180227.tar.gz 21241 BLAKE2B 2ba4c76121ba9c5d307233d6f8c91db03c8da4882b8f6dfeed335f7fcc30438df8fe0657a1177e7e551566b597e195cf41bb6e27e13b757a0c931e8574de9a5e SHA512 9a508426e9307213078ce57b59d25168647fa5d2e823b1085e93401259b0a52269e948c8292e4055babf3e8b3c087a23475b5caa2a43c11feb2df8b0d8843972 |
33 |
|
34 |
diff --git a/net-vpn/openconnect/files/openconnect-7.08-libressl251.patch b/net-vpn/openconnect/files/openconnect-7.08-libressl251.patch |
35 |
deleted file mode 100644 |
36 |
index ba0b894..0000000 |
37 |
--- a/net-vpn/openconnect/files/openconnect-7.08-libressl251.patch |
38 |
+++ /dev/null |
39 |
@@ -1,14 +0,0 @@ |
40 |
-diff -Naur openconnect-7.08.orig/openssl-dtls.c openconnect-7.08/openssl-dtls.c |
41 |
---- openconnect-7.08.orig/openssl-dtls.c 2016-12-06 05:03:51.000000000 -0800 |
42 |
-+++ openconnect-7.08/openssl-dtls.c 2017-02-01 13:35:52.315398332 -0800 |
43 |
-@@ -100,8 +100,8 @@ |
44 |
- } |
45 |
- #else |
46 |
- /* OpenSSL <= 1.0.2 only supports CBC ciphers with PSK */ |
47 |
-- ivlen = EVP_CIPHER_iv_length(EVP_CIPHER_CTX_cipher(vpninfo->dtls_ssl->enc_write_ctx)); |
48 |
-- maclen = EVP_MD_CTX_size(vpninfo->dtls_ssl->write_hash); |
49 |
-+ ivlen = EVP_CIPHER_iv_length(EVP_CIPHER_CTX_cipher(vpninfo->dtls_ssl->enc_read_ctx)); |
50 |
-+ maclen = EVP_MD_CTX_size(vpninfo->dtls_ssl->read_hash); |
51 |
- blocksize = ivlen; |
52 |
- pad = 1; |
53 |
- #endif |
54 |
|
55 |
diff --git a/net-vpn/openconnect/files/openconnect.conf.in b/net-vpn/openconnect/files/openconnect.conf.in |
56 |
deleted file mode 100644 |
57 |
index 53b14e6..0000000 |
58 |
--- a/net-vpn/openconnect/files/openconnect.conf.in |
59 |
+++ /dev/null |
60 |
@@ -1,26 +0,0 @@ |
61 |
-# Variables to configure vpn tunnels where "vpnname" is the name of your vpn tunnel: |
62 |
-# |
63 |
-# server_vpnname |
64 |
-# password_vpnname |
65 |
-# vpnopts_vpnname |
66 |
-# |
67 |
-# The tunnel will need to be started with a symbolic link to openconnect: |
68 |
-# |
69 |
-# ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpnname |
70 |
-# |
71 |
-# If you'd like to execute a script on preup, postup, predown and postdown of the vpn tunnel, you |
72 |
-# need to create executable scripts in a directory with the same name as |
73 |
-# the vpn tunnel (vpn0 can be replaced with the vpn name): |
74 |
-# |
75 |
-# mkdir /etc/openconnect/vpn0 |
76 |
-# cd /etc/openconnect/vpn0" |
77 |
-# echo '#!/bin/sh' > preup.sh" |
78 |
-# cp preup.sh predown.sh" |
79 |
-# cp preup.sh postup.sh" |
80 |
-# cp preup.sh postdown.sh" |
81 |
-# chmod 755 /etc/openconnect/vpn0/*" |
82 |
- |
83 |
-server_vpn0="vpn.server.tld" |
84 |
-password_vpn0="YOUR_PASSWORD" |
85 |
-# Any OPENCONNECT options my go here (see openconnect --help) |
86 |
-vpnopts_vpn0="-l --passwd-on-stdin --user=YOUR_USERNAME --script=/etc/openconnect/openconnect.sh" |
87 |
|
88 |
diff --git a/net-vpn/openconnect/files/openconnect.init.in-r4 b/net-vpn/openconnect/files/openconnect.init.in-r4 |
89 |
deleted file mode 100644 |
90 |
index 040edc7..0000000 |
91 |
--- a/net-vpn/openconnect/files/openconnect.init.in-r4 |
92 |
+++ /dev/null |
93 |
@@ -1,88 +0,0 @@ |
94 |
-#!/sbin/openrc-run |
95 |
-# Copyright 1999-2015 Gentoo Foundation |
96 |
-# Distributed under the terms of the GNU General Public License v2 |
97 |
- |
98 |
-VPN="${RC_SVCNAME#*.}" |
99 |
-VPNDIR="/etc/openconnect/${VPN}" |
100 |
-VPNLOG="/var/log/openconnect/${VPN}" |
101 |
-VPNLOGFILE="${VPNLOG}/openconnect.log" |
102 |
-VPNERRFILE="${VPNLOG}/openconnect.err" |
103 |
- |
104 |
-command="/usr/sbin/openconnect" |
105 |
-name="OpenConnect: ${VPN}" |
106 |
-pidfile="/run/openconnect/${VPN}.pid" |
107 |
-stopsig="SIGINT" |
108 |
- |
109 |
-depend() { |
110 |
- before netmount |
111 |
-} |
112 |
- |
113 |
-checkconfig() { |
114 |
- if [ $VPN = "openconnect" ]; then |
115 |
- eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:" |
116 |
- eerror |
117 |
- eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0" |
118 |
- eerror |
119 |
- eerror "And then call it instead:" |
120 |
- eerror |
121 |
- eerror "/etc/init.d/openconnect.vpn0 start" |
122 |
- return 1 |
123 |
- fi |
124 |
-} |
125 |
- |
126 |
-checktuntap() { |
127 |
- if [ "$RC_UNAME" = "Linux" -a ! -e /dev/net/tun ] ; then |
128 |
- if ! modprobe tun ; then |
129 |
- eerror "TUN/TAP support is not available in this kernel" |
130 |
- return 1 |
131 |
- fi |
132 |
- fi |
133 |
-} |
134 |
- |
135 |
-run_hook() { |
136 |
- if [ -x "$1" ]; then |
137 |
- "$@" |
138 |
- fi |
139 |
-} |
140 |
- |
141 |
-start_pre() { |
142 |
- checkconfig || return |
143 |
- checktuntap || return |
144 |
- checkpath -d "${VPNLOG}" || return |
145 |
- checkpath -d /run/openconnect || return |
146 |
- run_hook "${VPNDIR}/preup.sh" |
147 |
-} |
148 |
- |
149 |
-start() { |
150 |
- local server vpnopts password |
151 |
- eval server=\$server_${VPN} |
152 |
- eval vpnopts=\$vpnopts_${VPN} |
153 |
- eval password=\$password_${VPN} |
154 |
- |
155 |
- ebegin "Starting ${name}" |
156 |
- start-stop-daemon --start --exec "${command}" -- \ |
157 |
- --background \ |
158 |
- --interface="${VPN}" \ |
159 |
- --pid-file="${pidfile}" \ |
160 |
- ${vpnopts} \ |
161 |
- "${server}" \ |
162 |
- >> "${VPNLOGFILE}" \ |
163 |
- 2>> "${VPNERRFILE}" \ |
164 |
- <<EOF |
165 |
-${password} |
166 |
-EOF |
167 |
- eend $? |
168 |
-} |
169 |
- |
170 |
-start_post() { |
171 |
- run_hook "${VPNDIR}/postup.sh" |
172 |
-} |
173 |
- |
174 |
-stop_pre() { |
175 |
- checkconfig || return |
176 |
- run_hook "${VPNDIR}/predown.sh" |
177 |
-} |
178 |
- |
179 |
-stop_post() { |
180 |
- run_hook "${VPNDIR}/postdown.sh" |
181 |
-} |
182 |
|
183 |
diff --git a/net-vpn/openconnect/files/openconnect.logrotate b/net-vpn/openconnect/files/openconnect.logrotate |
184 |
deleted file mode 100644 |
185 |
index 0455e68..0000000 |
186 |
--- a/net-vpn/openconnect/files/openconnect.logrotate |
187 |
+++ /dev/null |
188 |
@@ -1,8 +0,0 @@ |
189 |
-# openconnect logrotate snipet for Gentoo Linux |
190 |
-# |
191 |
-/var/log/openconnect/*/* { |
192 |
- missingok |
193 |
- size 5M |
194 |
- notifempty |
195 |
-} |
196 |
- |
197 |
|
198 |
diff --git a/net-vpn/openconnect/metadata.xml b/net-vpn/openconnect/metadata.xml |
199 |
deleted file mode 100644 |
200 |
index d12e6f6..0000000 |
201 |
--- a/net-vpn/openconnect/metadata.xml |
202 |
+++ /dev/null |
203 |
@@ -1,11 +0,0 @@ |
204 |
-<?xml version="1.0" encoding="UTF-8"?> |
205 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
206 |
-<pkgmetadata> |
207 |
- <use> |
208 |
- <flag name="gssapi">Build GSSAPI support</flag> |
209 |
- <flag name="java">Build JNI bindings using jni.h</flag> |
210 |
- <flag name="libproxy">Enable proxy support</flag> |
211 |
- <flag name="lz4">Enable support for lz4 compression</flag> |
212 |
- <flag name="stoken">Enable stoken support</flag> |
213 |
- </use> |
214 |
-</pkgmetadata> |
215 |
|
216 |
diff --git a/net-vpn/openconnect/openconnect-7.08-r1.ebuild b/net-vpn/openconnect/openconnect-7.08-r1.ebuild |
217 |
deleted file mode 100644 |
218 |
index 00e2c49..0000000 |
219 |
--- a/net-vpn/openconnect/openconnect-7.08-r1.ebuild |
220 |
+++ /dev/null |
221 |
@@ -1,166 +0,0 @@ |
222 |
-# Copyright 1999-2018 Gentoo Foundation |
223 |
-# Distributed under the terms of the GNU General Public License v2 |
224 |
- |
225 |
-EAPI=6 |
226 |
- |
227 |
-PYTHON_COMPAT=( python2_7 ) |
228 |
-PYTHON_REQ_USE="xml" |
229 |
- |
230 |
-inherit eutils java-pkg-opt-2 linux-info python-any-r1 readme.gentoo-r1 |
231 |
- |
232 |
-if [[ ${PV} == 9999 ]]; then |
233 |
- EGIT_REPO_URI="git://git.infradead.org/users/dwmw2/${PN}.git" |
234 |
- inherit git-r3 autotools |
235 |
-else |
236 |
- ARCHIVE_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz" |
237 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
238 |
-fi |
239 |
-VPNC_VER=20180227 |
240 |
-SRC_URI="${ARCHIVE_URI} |
241 |
- ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz" |
242 |
- |
243 |
-DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software" |
244 |
-HOMEPAGE="http://www.infradead.org/openconnect.html" |
245 |
- |
246 |
-LICENSE="LGPL-2.1 GPL-2" |
247 |
-SLOT="0/5" |
248 |
-IUSE="doc +gnutls gssapi java libproxy libressl lz4 nls smartcard static-libs stoken" |
249 |
- |
250 |
-DEPEND=" |
251 |
- dev-libs/libxml2 |
252 |
- sys-libs/zlib |
253 |
- !gnutls? ( |
254 |
- !libressl? ( >=dev-libs/openssl-1.0.1h:0=[static-libs?] ) |
255 |
- libressl? ( dev-libs/libressl:0=[static-libs?] ) |
256 |
- ) |
257 |
- gnutls? ( |
258 |
- app-misc/ca-certificates |
259 |
- dev-libs/nettle |
260 |
- >=net-libs/gnutls-3:0=[static-libs?] |
261 |
- ) |
262 |
- gssapi? ( virtual/krb5 ) |
263 |
- libproxy? ( net-libs/libproxy ) |
264 |
- lz4? ( app-arch/lz4:= ) |
265 |
- nls? ( virtual/libintl ) |
266 |
- smartcard? ( sys-apps/pcsc-lite:0= ) |
267 |
- stoken? ( app-crypt/stoken )" |
268 |
-RDEPEND="${DEPEND} |
269 |
- sys-apps/iproute2 |
270 |
- !<sys-apps/openrc-0.13" |
271 |
-DEPEND="${DEPEND} |
272 |
- virtual/pkgconfig |
273 |
- doc? ( ${PYTHON_DEPS} sys-apps/groff ) |
274 |
- java? ( >=virtual/jdk-1.6 ) |
275 |
- nls? ( sys-devel/gettext )" |
276 |
- |
277 |
-CONFIG_CHECK="~TUN" |
278 |
- |
279 |
-PATCHES=( |
280 |
- "${FILESDIR}"/${P}-libressl251.patch |
281 |
-) |
282 |
- |
283 |
-pkg_pretend() { |
284 |
- check_extra_config |
285 |
-} |
286 |
- |
287 |
-pkg_setup() { |
288 |
- java-pkg-opt-2_pkg_setup |
289 |
-} |
290 |
- |
291 |
-src_unpack() { |
292 |
- if [[ ${PV} == 9999 ]]; then |
293 |
- git-r3_src_unpack |
294 |
- fi |
295 |
- default |
296 |
-} |
297 |
- |
298 |
-src_prepare() { |
299 |
- default |
300 |
- if [[ ${PV} == 9999 ]]; then |
301 |
- eautoreconf |
302 |
- fi |
303 |
-} |
304 |
- |
305 |
-src_configure() { |
306 |
- if [[ ${LINGUAS+set} == set ]]; then |
307 |
- strip-linguas -u po |
308 |
- echo "${LINGUAS}" > po/LINGUAS || die |
309 |
- fi |
310 |
- |
311 |
- if use doc; then |
312 |
- python_setup |
313 |
- else |
314 |
- export PYTHON=/bin/false |
315 |
- fi |
316 |
- |
317 |
- local myconf=( |
318 |
- --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" |
319 |
- --without-openssl-version-check |
320 |
- $(use_enable static-libs static) |
321 |
- $(use_enable nls) |
322 |
- $(use_with !gnutls openssl) |
323 |
- $(use_with gnutls) |
324 |
- $(use_with libproxy) |
325 |
- $(use_with lz4) |
326 |
- $(use_with gssapi) |
327 |
- $(use_with smartcard libpcsclite) |
328 |
- $(use_with stoken) |
329 |
- $(use_with java) |
330 |
- ) |
331 |
- |
332 |
- econf "${myconf[@]}" |
333 |
-} |
334 |
- |
335 |
-DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels. |
336 |
- |
337 |
-You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d |
338 |
-instead of calling it directly: |
339 |
- |
340 |
-ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0 |
341 |
- |
342 |
-You can then start the vpn tunnel like this: |
343 |
- |
344 |
-/etc/init.d/openconnect.vpn0 start |
345 |
- |
346 |
-If you would like to run preup, postup, predown, and/or postdown scripts, |
347 |
-You need to create a directory in /etc/openconnect with the name of the vpn: |
348 |
- |
349 |
-mkdir /etc/openconnect/vpn0 |
350 |
- |
351 |
-Then add executable shell files: |
352 |
- |
353 |
-mkdir /etc/openconnect/vpn0 |
354 |
-cd /etc/openconnect/vpn0 |
355 |
-echo '#!/bin/sh' > preup.sh |
356 |
-cp preup.sh predown.sh |
357 |
-cp preup.sh postup.sh |
358 |
-cp preup.sh postdown.sh |
359 |
-chmod 755 /etc/openconnect/vpn0/* |
360 |
-" |
361 |
- |
362 |
-src_install() { |
363 |
- default |
364 |
- |
365 |
- newinitd "${FILESDIR}"/openconnect.init.in-r4 openconnect |
366 |
- dodir /etc/openconnect |
367 |
- insinto /etc/openconnect |
368 |
- newconfd "${FILESDIR}"/openconnect.conf.in openconnect |
369 |
- exeinto /etc/openconnect |
370 |
- newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh |
371 |
- insinto /etc/logrotate.d |
372 |
- newins "${FILESDIR}"/openconnect.logrotate openconnect |
373 |
- keepdir /var/log/openconnect |
374 |
- |
375 |
- prune_libtool_files |
376 |
- |
377 |
- readme.gentoo_create_doc |
378 |
-} |
379 |
- |
380 |
-pkg_postinst() { |
381 |
- readme.gentoo_print_elog |
382 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
383 |
- elog |
384 |
- elog "You may want to consider installing the following optional packages." |
385 |
- optfeature "resolvconf support" net-dns/openresolv |
386 |
- fi |
387 |
-} |
388 |
|
389 |
diff --git a/net-vpn/openconnect/openconnect-7.08.ebuild b/net-vpn/openconnect/openconnect-7.08.ebuild |
390 |
deleted file mode 100644 |
391 |
index 80f9a1a..0000000 |
392 |
--- a/net-vpn/openconnect/openconnect-7.08.ebuild |
393 |
+++ /dev/null |
394 |
@@ -1,166 +0,0 @@ |
395 |
-# Copyright 1999-2017 Gentoo Foundation |
396 |
-# Distributed under the terms of the GNU General Public License v2 |
397 |
- |
398 |
-EAPI=6 |
399 |
- |
400 |
-PYTHON_COMPAT=( python2_7 ) |
401 |
-PYTHON_REQ_USE="xml" |
402 |
- |
403 |
-inherit eutils java-pkg-opt-2 linux-info python-any-r1 readme.gentoo-r1 |
404 |
- |
405 |
-if [[ ${PV} == 9999 ]]; then |
406 |
- EGIT_REPO_URI="git://git.infradead.org/users/dwmw2/${PN}.git" |
407 |
- inherit git-r3 autotools |
408 |
-else |
409 |
- ARCHIVE_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz" |
410 |
- KEYWORDS="amd64 arm ~arm64 ppc64 x86" |
411 |
-fi |
412 |
-VPNC_VER=20160829 |
413 |
-SRC_URI="${ARCHIVE_URI} |
414 |
- ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz" |
415 |
- |
416 |
-DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software" |
417 |
-HOMEPAGE="http://www.infradead.org/openconnect.html" |
418 |
- |
419 |
-LICENSE="LGPL-2.1 GPL-2" |
420 |
-SLOT="0/5" |
421 |
-IUSE="doc +gnutls gssapi java libproxy libressl lz4 nls smartcard static-libs stoken" |
422 |
- |
423 |
-DEPEND=" |
424 |
- dev-libs/libxml2 |
425 |
- sys-libs/zlib |
426 |
- !gnutls? ( |
427 |
- !libressl? ( >=dev-libs/openssl-1.0.1h:0=[static-libs?] ) |
428 |
- libressl? ( dev-libs/libressl:0=[static-libs?] ) |
429 |
- ) |
430 |
- gnutls? ( |
431 |
- app-misc/ca-certificates |
432 |
- dev-libs/nettle |
433 |
- >=net-libs/gnutls-3:0=[static-libs?] |
434 |
- ) |
435 |
- gssapi? ( virtual/krb5 ) |
436 |
- libproxy? ( net-libs/libproxy ) |
437 |
- lz4? ( app-arch/lz4:= ) |
438 |
- nls? ( virtual/libintl ) |
439 |
- smartcard? ( sys-apps/pcsc-lite:0= ) |
440 |
- stoken? ( app-crypt/stoken )" |
441 |
-RDEPEND="${DEPEND} |
442 |
- sys-apps/iproute2 |
443 |
- !<sys-apps/openrc-0.13" |
444 |
-DEPEND="${DEPEND} |
445 |
- virtual/pkgconfig |
446 |
- doc? ( ${PYTHON_DEPS} sys-apps/groff ) |
447 |
- java? ( >=virtual/jdk-1.6 ) |
448 |
- nls? ( sys-devel/gettext )" |
449 |
- |
450 |
-CONFIG_CHECK="~TUN" |
451 |
- |
452 |
-PATCHES=( |
453 |
- "${FILESDIR}"/${P}-libressl251.patch |
454 |
-) |
455 |
- |
456 |
-pkg_pretend() { |
457 |
- check_extra_config |
458 |
-} |
459 |
- |
460 |
-pkg_setup() { |
461 |
- java-pkg-opt-2_pkg_setup |
462 |
-} |
463 |
- |
464 |
-src_unpack() { |
465 |
- if [[ ${PV} == 9999 ]]; then |
466 |
- git-r3_src_unpack |
467 |
- fi |
468 |
- default |
469 |
-} |
470 |
- |
471 |
-src_prepare() { |
472 |
- default |
473 |
- if [[ ${PV} == 9999 ]]; then |
474 |
- eautoreconf |
475 |
- fi |
476 |
-} |
477 |
- |
478 |
-src_configure() { |
479 |
- if [[ ${LINGUAS+set} == set ]]; then |
480 |
- strip-linguas -u po |
481 |
- echo "${LINGUAS}" > po/LINGUAS || die |
482 |
- fi |
483 |
- |
484 |
- if use doc; then |
485 |
- python_setup |
486 |
- else |
487 |
- export PYTHON=/bin/false |
488 |
- fi |
489 |
- |
490 |
- local myconf=( |
491 |
- --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" |
492 |
- --without-openssl-version-check |
493 |
- $(use_enable static-libs static) |
494 |
- $(use_enable nls) |
495 |
- $(use_with !gnutls openssl) |
496 |
- $(use_with gnutls) |
497 |
- $(use_with libproxy) |
498 |
- $(use_with lz4) |
499 |
- $(use_with gssapi) |
500 |
- $(use_with smartcard libpcsclite) |
501 |
- $(use_with stoken) |
502 |
- $(use_with java) |
503 |
- ) |
504 |
- |
505 |
- econf "${myconf[@]}" |
506 |
-} |
507 |
- |
508 |
-DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels. |
509 |
- |
510 |
-You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d |
511 |
-instead of calling it directly: |
512 |
- |
513 |
-ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0 |
514 |
- |
515 |
-You can then start the vpn tunnel like this: |
516 |
- |
517 |
-/etc/init.d/openconnect.vpn0 start |
518 |
- |
519 |
-If you would like to run preup, postup, predown, and/or postdown scripts, |
520 |
-You need to create a directory in /etc/openconnect with the name of the vpn: |
521 |
- |
522 |
-mkdir /etc/openconnect/vpn0 |
523 |
- |
524 |
-Then add executable shell files: |
525 |
- |
526 |
-mkdir /etc/openconnect/vpn0 |
527 |
-cd /etc/openconnect/vpn0 |
528 |
-echo '#!/bin/sh' > preup.sh |
529 |
-cp preup.sh predown.sh |
530 |
-cp preup.sh postup.sh |
531 |
-cp preup.sh postdown.sh |
532 |
-chmod 755 /etc/openconnect/vpn0/* |
533 |
-" |
534 |
- |
535 |
-src_install() { |
536 |
- default |
537 |
- |
538 |
- newinitd "${FILESDIR}"/openconnect.init.in-r4 openconnect |
539 |
- dodir /etc/openconnect |
540 |
- insinto /etc/openconnect |
541 |
- newconfd "${FILESDIR}"/openconnect.conf.in openconnect |
542 |
- exeinto /etc/openconnect |
543 |
- newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh |
544 |
- insinto /etc/logrotate.d |
545 |
- newins "${FILESDIR}"/openconnect.logrotate openconnect |
546 |
- keepdir /var/log/openconnect |
547 |
- |
548 |
- prune_libtool_files |
549 |
- |
550 |
- readme.gentoo_create_doc |
551 |
-} |
552 |
- |
553 |
-pkg_postinst() { |
554 |
- readme.gentoo_print_elog |
555 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
556 |
- elog |
557 |
- elog "You may want to consider installing the following optional packages." |
558 |
- optfeature "resolvconf support" net-dns/openresolv |
559 |
- fi |
560 |
-} |