Gentoo Archives: gentoo-commits

From: Dirkjan Ochtman <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openvpn/
Date: Sun, 06 Dec 2015 20:07:51
Message-Id: 1449432421.fa0d3432a3b9f2d6127766e28c318efa1bb76c0f.djc@gentoo
1 commit: fa0d3432a3b9f2d6127766e28c318efa1bb76c0f
2 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 6 19:40:15 2015 +0000
4 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 6 20:07:01 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa0d3432
7
8 net-misc/openvpn: remove old versions
9
10 Package-Manager: portage-2.2.20.1
11
12 net-misc/openvpn/Manifest | 2 -
13 net-misc/openvpn/openvpn-2.3.6-r1.ebuild | 133 ------------------------------
14 net-misc/openvpn/openvpn-2.3.6-r2.ebuild | 134 -------------------------------
15 net-misc/openvpn/openvpn-2.3.6.ebuild | 132 ------------------------------
16 net-misc/openvpn/openvpn-2.3.7.ebuild | 129 -----------------------------
17 5 files changed, 530 deletions(-)
18
19 diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
20 index 64a2bbb..a1620d2 100644
21 --- a/net-misc/openvpn/Manifest
22 +++ b/net-misc/openvpn/Manifest
23 @@ -1,3 +1 @@
24 -DIST openvpn-2.3.6.tar.gz 1213272 SHA256 7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26 SHA512 70e0045ea41f6588769ab8b98d8f550b69148adbf7fedcdc36900e25950df43379950492652e243ec6e7965bf9c7dcc86a56ba5dfdc44523aaa81cfc508b1c6e WHIRLPOOL 737f2d1d69ee1c7700d5cd5a4e7d5d1b2f55d8b2229f7c2565fcb8c731ebb719ec8d6bad3b76f763f36e5c70c6e40a666db3508f3024f8e4637c0659061dba48
25 -DIST openvpn-2.3.7.tar.gz 1199706 SHA256 1f02a4cd6aeb6250ca9311560875b10ce8957a3c9101a8005bd1e17e5b03146e SHA512 35030eb432568e954d7d9543565c3c7d1268ff323e1a2da81047c497f3eeb6f4061d9cfc360aa98fe7c413282ee6d0eb70957d6d4a38d928348c706f20cb66df WHIRLPOOL 31b1cbdde3db8060f81b4b3fdc604dd357ad413ad18fcb7dae07c6bb4939f92d02271e6ecb677b5f3d80e305676c769232e9d114c667b85fab45125be10f49a4
26 DIST openvpn-2.3.8.tar.gz 1214843 SHA256 532435eff61c14b44a583f27b72f93e7864e96c95fe51134ec0ad4b1b1107c51 SHA512 b619283d87eea2e47a2f0dfdbf0ffd1d10388fbdaadb33b43c7a2743748a4814f869fad6215d32fab156664d554ae94af456e7bf496890c68e6729b153d76db9 WHIRLPOOL 4868c735ca5e65b34f477457ea38eb6db45fae80563490d1e39ece9bf29b13976dd82d50d054da70c4ee146cb2e88e847bafc3f7ff47112d4494fa0f408d65d0
27
28 diff --git a/net-misc/openvpn/openvpn-2.3.6-r1.ebuild b/net-misc/openvpn/openvpn-2.3.6-r1.ebuild
29 deleted file mode 100644
30 index 8ad5a7b..0000000
31 --- a/net-misc/openvpn/openvpn-2.3.6-r1.ebuild
32 +++ /dev/null
33 @@ -1,133 +0,0 @@
34 -# Copyright 1999-2015 Gentoo Foundation
35 -# Distributed under the terms of the GNU General Public License v2
36 -# $Id$
37 -
38 -EAPI=4
39 -
40 -inherit multilib autotools flag-o-matic user systemd
41 -
42 -DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
43 -SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
44 -HOMEPAGE="http://openvpn.net/"
45 -
46 -LICENSE="GPL-2"
47 -SLOT="0"
48 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
49 -IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
50 -
51 -REQUIRED_USE="static? ( !plugins !pkcs11 )
52 - polarssl? ( ssl )
53 - pkcs11? ( ssl )
54 - !plugins? ( !pam !down-root )"
55 -
56 -DEPEND="
57 - kernel_linux? (
58 - iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
59 - )
60 - pam? ( virtual/pam )
61 - ssl? (
62 - !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
63 - )
64 - lzo? ( >=dev-libs/lzo-1.07 )
65 - pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
66 -RDEPEND="${DEPEND}
67 - selinux? ( sec-policy/selinux-openvpn )
68 -"
69 -
70 -src_prepare() {
71 - # Set correct pass to systemd-ask-password binary
72 - sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
73 - epatch "${FILESDIR}/2.3.6-null-cipher.patch" || die
74 - eautoreconf
75 -}
76 -
77 -src_configure() {
78 - use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
79 - local myconf
80 - use polarssl && myconf="--with-crypto-library=polarssl"
81 - econf \
82 - ${myconf} \
83 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
84 - --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
85 - $(use_enable passwordsave password-save) \
86 - $(use_enable ssl) \
87 - $(use_enable ssl crypto) \
88 - $(use_enable lzo) \
89 - $(use_enable pkcs11) \
90 - $(use_enable plugins) \
91 - $(use_enable iproute2) \
92 - $(use_enable pam plugin-auth-pam) \
93 - $(use_enable down-root plugin-down-root) \
94 - $(use_enable systemd)
95 -}
96 -
97 -src_install() {
98 - default
99 - find "${ED}/usr" -name '*.la' -delete
100 - # install documentation
101 - dodoc AUTHORS ChangeLog PORTS README README.IPv6
102 -
103 - # Install some helper scripts
104 - keepdir /etc/openvpn
105 - exeinto /etc/openvpn
106 - doexe "${FILESDIR}/up.sh"
107 - doexe "${FILESDIR}/down.sh"
108 -
109 - # Install the init script and config file
110 - newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
111 - newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
112 -
113 - # install examples, controlled by the respective useflag
114 - if use examples ; then
115 - # dodoc does not supportly support directory traversal, #15193
116 - insinto /usr/share/doc/${PF}/examples
117 - doins -r sample contrib
118 - fi
119 -
120 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
121 - systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
122 -}
123 -
124 -pkg_postinst() {
125 - # Add openvpn user so openvpn servers can drop privs
126 - # Clients should run as root so they can change ip addresses,
127 - # dns information and other such things.
128 - enewgroup openvpn
129 - enewuser openvpn "" "" "" openvpn
130 -
131 - if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
132 - ewarn "WARNING: The openvpn init script has changed"
133 - ewarn ""
134 - fi
135 -
136 - elog "The openvpn init script expects to find the configuration file"
137 - elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
138 - elog ""
139 - elog "To create more VPNs, simply create a new .conf file for it and"
140 - elog "then create a symlink to the openvpn init script from a link called"
141 - elog "openvpn.newconfname - like so"
142 - elog " cd /etc/openvpn"
143 - elog " ${EDITOR##*/} foo.conf"
144 - elog " cd /etc/init.d"
145 - elog " ln -s openvpn openvpn.foo"
146 - elog ""
147 - elog "You can then treat openvpn.foo as any other service, so you can"
148 - elog "stop one vpn and start another if you need to."
149 -
150 - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
151 - ewarn ""
152 - ewarn "WARNING: If you use the remote keyword then you are deemed to be"
153 - ewarn "a client by our init script and as such we force up,down scripts."
154 - ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
155 - ewarn "can move your scripts to."
156 - fi
157 -
158 - if use plugins ; then
159 - einfo ""
160 - einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
161 - fi
162 -
163 - einfo ""
164 - einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
165 - einfo "They can now be emerged via app-crypt/easy-rsa."
166 -}
167
168 diff --git a/net-misc/openvpn/openvpn-2.3.6-r2.ebuild b/net-misc/openvpn/openvpn-2.3.6-r2.ebuild
169 deleted file mode 100644
170 index f72f095..0000000
171 --- a/net-misc/openvpn/openvpn-2.3.6-r2.ebuild
172 +++ /dev/null
173 @@ -1,134 +0,0 @@
174 -# Copyright 1999-2015 Gentoo Foundation
175 -# Distributed under the terms of the GNU General Public License v2
176 -# $Id$
177 -
178 -EAPI=4
179 -
180 -inherit multilib autotools flag-o-matic user systemd
181 -
182 -DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
183 -SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
184 -HOMEPAGE="http://openvpn.net/"
185 -
186 -LICENSE="GPL-2"
187 -SLOT="0"
188 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
189 -IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
190 -
191 -REQUIRED_USE="static? ( !plugins !pkcs11 )
192 - polarssl? ( ssl )
193 - pkcs11? ( ssl )
194 - !plugins? ( !pam !down-root )"
195 -
196 -DEPEND="
197 - kernel_linux? (
198 - iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
199 - )
200 - pam? ( virtual/pam )
201 - ssl? (
202 - !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
203 - )
204 - lzo? ( >=dev-libs/lzo-1.07 )
205 - pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
206 -RDEPEND="${DEPEND}
207 - selinux? ( sec-policy/selinux-openvpn )
208 -"
209 -
210 -src_prepare() {
211 - # Set correct pass to systemd-ask-password binary
212 - sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
213 - epatch "${FILESDIR}/2.3.6-null-cipher.patch" || die
214 - epatch "${FILESDIR}/2.3.6-disable-compression.patch" || die
215 - eautoreconf
216 -}
217 -
218 -src_configure() {
219 - use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
220 - local myconf
221 - use polarssl && myconf="--with-crypto-library=polarssl"
222 - econf \
223 - ${myconf} \
224 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
225 - --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
226 - $(use_enable passwordsave password-save) \
227 - $(use_enable ssl) \
228 - $(use_enable ssl crypto) \
229 - $(use_enable lzo) \
230 - $(use_enable pkcs11) \
231 - $(use_enable plugins) \
232 - $(use_enable iproute2) \
233 - $(use_enable pam plugin-auth-pam) \
234 - $(use_enable down-root plugin-down-root) \
235 - $(use_enable systemd)
236 -}
237 -
238 -src_install() {
239 - default
240 - find "${ED}/usr" -name '*.la' -delete
241 - # install documentation
242 - dodoc AUTHORS ChangeLog PORTS README README.IPv6
243 -
244 - # Install some helper scripts
245 - keepdir /etc/openvpn
246 - exeinto /etc/openvpn
247 - doexe "${FILESDIR}/up.sh"
248 - doexe "${FILESDIR}/down.sh"
249 -
250 - # Install the init script and config file
251 - newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
252 - newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
253 -
254 - # install examples, controlled by the respective useflag
255 - if use examples ; then
256 - # dodoc does not supportly support directory traversal, #15193
257 - insinto /usr/share/doc/${PF}/examples
258 - doins -r sample contrib
259 - fi
260 -
261 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
262 - systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
263 -}
264 -
265 -pkg_postinst() {
266 - # Add openvpn user so openvpn servers can drop privs
267 - # Clients should run as root so they can change ip addresses,
268 - # dns information and other such things.
269 - enewgroup openvpn
270 - enewuser openvpn "" "" "" openvpn
271 -
272 - if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
273 - ewarn "WARNING: The openvpn init script has changed"
274 - ewarn ""
275 - fi
276 -
277 - elog "The openvpn init script expects to find the configuration file"
278 - elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
279 - elog ""
280 - elog "To create more VPNs, simply create a new .conf file for it and"
281 - elog "then create a symlink to the openvpn init script from a link called"
282 - elog "openvpn.newconfname - like so"
283 - elog " cd /etc/openvpn"
284 - elog " ${EDITOR##*/} foo.conf"
285 - elog " cd /etc/init.d"
286 - elog " ln -s openvpn openvpn.foo"
287 - elog ""
288 - elog "You can then treat openvpn.foo as any other service, so you can"
289 - elog "stop one vpn and start another if you need to."
290 -
291 - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
292 - ewarn ""
293 - ewarn "WARNING: If you use the remote keyword then you are deemed to be"
294 - ewarn "a client by our init script and as such we force up,down scripts."
295 - ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
296 - ewarn "can move your scripts to."
297 - fi
298 -
299 - if use plugins ; then
300 - einfo ""
301 - einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
302 - fi
303 -
304 - einfo ""
305 - einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
306 - einfo "They can now be emerged via app-crypt/easy-rsa."
307 -}
308
309 diff --git a/net-misc/openvpn/openvpn-2.3.6.ebuild b/net-misc/openvpn/openvpn-2.3.6.ebuild
310 deleted file mode 100644
311 index a18d0fd..0000000
312 --- a/net-misc/openvpn/openvpn-2.3.6.ebuild
313 +++ /dev/null
314 @@ -1,132 +0,0 @@
315 -# Copyright 1999-2015 Gentoo Foundation
316 -# Distributed under the terms of the GNU General Public License v2
317 -# $Id$
318 -
319 -EAPI=4
320 -
321 -inherit multilib autotools flag-o-matic user systemd
322 -
323 -DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
324 -SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
325 -HOMEPAGE="http://openvpn.net/"
326 -
327 -LICENSE="GPL-2"
328 -SLOT="0"
329 -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
330 -IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
331 -
332 -REQUIRED_USE="static? ( !plugins !pkcs11 )
333 - polarssl? ( ssl )
334 - pkcs11? ( ssl )
335 - !plugins? ( !pam !down-root )"
336 -
337 -DEPEND="
338 - kernel_linux? (
339 - iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
340 - )
341 - pam? ( virtual/pam )
342 - ssl? (
343 - !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
344 - )
345 - lzo? ( >=dev-libs/lzo-1.07 )
346 - pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
347 -RDEPEND="${DEPEND}
348 - selinux? ( sec-policy/selinux-openvpn )
349 -"
350 -
351 -src_prepare() {
352 - # Set correct pass to systemd-ask-password binary
353 - sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
354 - eautoreconf
355 -}
356 -
357 -src_configure() {
358 - use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
359 - local myconf
360 - use polarssl && myconf="--with-crypto-library=polarssl"
361 - econf \
362 - ${myconf} \
363 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
364 - --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
365 - $(use_enable passwordsave password-save) \
366 - $(use_enable ssl) \
367 - $(use_enable ssl crypto) \
368 - $(use_enable lzo) \
369 - $(use_enable pkcs11) \
370 - $(use_enable plugins) \
371 - $(use_enable iproute2) \
372 - $(use_enable pam plugin-auth-pam) \
373 - $(use_enable down-root plugin-down-root) \
374 - $(use_enable systemd)
375 -}
376 -
377 -src_install() {
378 - default
379 - find "${ED}/usr" -name '*.la' -delete
380 - # install documentation
381 - dodoc AUTHORS ChangeLog PORTS README README.IPv6
382 -
383 - # Install some helper scripts
384 - keepdir /etc/openvpn
385 - exeinto /etc/openvpn
386 - doexe "${FILESDIR}/up.sh"
387 - doexe "${FILESDIR}/down.sh"
388 -
389 - # Install the init script and config file
390 - newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
391 - newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
392 -
393 - # install examples, controlled by the respective useflag
394 - if use examples ; then
395 - # dodoc does not supportly support directory traversal, #15193
396 - insinto /usr/share/doc/${PF}/examples
397 - doins -r sample contrib
398 - fi
399 -
400 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
401 - systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
402 -}
403 -
404 -pkg_postinst() {
405 - # Add openvpn user so openvpn servers can drop privs
406 - # Clients should run as root so they can change ip addresses,
407 - # dns information and other such things.
408 - enewgroup openvpn
409 - enewuser openvpn "" "" "" openvpn
410 -
411 - if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
412 - ewarn "WARNING: The openvpn init script has changed"
413 - ewarn ""
414 - fi
415 -
416 - elog "The openvpn init script expects to find the configuration file"
417 - elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
418 - elog ""
419 - elog "To create more VPNs, simply create a new .conf file for it and"
420 - elog "then create a symlink to the openvpn init script from a link called"
421 - elog "openvpn.newconfname - like so"
422 - elog " cd /etc/openvpn"
423 - elog " ${EDITOR##*/} foo.conf"
424 - elog " cd /etc/init.d"
425 - elog " ln -s openvpn openvpn.foo"
426 - elog ""
427 - elog "You can then treat openvpn.foo as any other service, so you can"
428 - elog "stop one vpn and start another if you need to."
429 -
430 - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
431 - ewarn ""
432 - ewarn "WARNING: If you use the remote keyword then you are deemed to be"
433 - ewarn "a client by our init script and as such we force up,down scripts."
434 - ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
435 - ewarn "can move your scripts to."
436 - fi
437 -
438 - if use plugins ; then
439 - einfo ""
440 - einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
441 - fi
442 -
443 - einfo ""
444 - einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
445 - einfo "They can now be emerged via app-crypt/easy-rsa."
446 -}
447
448 diff --git a/net-misc/openvpn/openvpn-2.3.7.ebuild b/net-misc/openvpn/openvpn-2.3.7.ebuild
449 deleted file mode 100644
450 index 7df6370..0000000
451 --- a/net-misc/openvpn/openvpn-2.3.7.ebuild
452 +++ /dev/null
453 @@ -1,129 +0,0 @@
454 -# Copyright 1999-2015 Gentoo Foundation
455 -# Distributed under the terms of the GNU General Public License v2
456 -# $Id$
457 -
458 -EAPI=4
459 -
460 -inherit multilib flag-o-matic user systemd
461 -
462 -DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
463 -SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
464 -HOMEPAGE="http://openvpn.net/"
465 -
466 -LICENSE="GPL-2"
467 -SLOT="0"
468 -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
469 -IUSE="examples down-root iproute2 +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
470 -
471 -REQUIRED_USE="static? ( !plugins !pkcs11 )
472 - polarssl? ( ssl )
473 - pkcs11? ( ssl )
474 - !plugins? ( !pam !down-root )"
475 -
476 -DEPEND="
477 - kernel_linux? (
478 - iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
479 - )
480 - pam? ( virtual/pam )
481 - ssl? (
482 - !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
483 - )
484 - lzo? ( >=dev-libs/lzo-1.07 )
485 - pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
486 - systemd? ( sys-apps/systemd )"
487 -RDEPEND="${DEPEND}
488 - selinux? ( sec-policy/selinux-openvpn )
489 -"
490 -
491 -src_configure() {
492 - use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
493 - local myconf
494 - use polarssl && myconf="--with-crypto-library=polarssl"
495 - econf \
496 - ${myconf} \
497 - --docdir="${EPREFIX}/usr/share/doc/${PF}" \
498 - --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
499 - $(use_enable passwordsave password-save) \
500 - $(use_enable ssl) \
501 - $(use_enable ssl crypto) \
502 - $(use_enable lzo) \
503 - $(use_enable pkcs11) \
504 - $(use_enable plugins) \
505 - $(use_enable iproute2) \
506 - $(use_enable socks) \
507 - $(use_enable pam plugin-auth-pam) \
508 - $(use_enable down-root plugin-down-root) \
509 - $(use_enable systemd)
510 -}
511 -
512 -src_install() {
513 - default
514 - find "${ED}/usr" -name '*.la' -delete
515 - # install documentation
516 - dodoc AUTHORS ChangeLog PORTS README README.IPv6
517 -
518 - # Install some helper scripts
519 - keepdir /etc/openvpn
520 - exeinto /etc/openvpn
521 - doexe "${FILESDIR}/up.sh"
522 - doexe "${FILESDIR}/down.sh"
523 -
524 - # Install the init script and config file
525 - newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
526 - newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
527 -
528 - # install examples, controlled by the respective useflag
529 - if use examples ; then
530 - # dodoc does not supportly support directory traversal, #15193
531 - insinto /usr/share/doc/${PF}/examples
532 - doins -r sample contrib
533 - fi
534 -
535 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
536 - systemd_newunit distro/systemd/openvpn-client@.service openvpn-client@.service
537 - systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
538 -}
539 -
540 -pkg_postinst() {
541 - # Add openvpn user so openvpn servers can drop privs
542 - # Clients should run as root so they can change ip addresses,
543 - # dns information and other such things.
544 - enewgroup openvpn
545 - enewuser openvpn "" "" "" openvpn
546 -
547 - if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
548 - ewarn "WARNING: The openvpn init script has changed"
549 - ewarn ""
550 - fi
551 -
552 - elog "The openvpn init script expects to find the configuration file"
553 - elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
554 - elog ""
555 - elog "To create more VPNs, simply create a new .conf file for it and"
556 - elog "then create a symlink to the openvpn init script from a link called"
557 - elog "openvpn.newconfname - like so"
558 - elog " cd /etc/openvpn"
559 - elog " ${EDITOR##*/} foo.conf"
560 - elog " cd /etc/init.d"
561 - elog " ln -s openvpn openvpn.foo"
562 - elog ""
563 - elog "You can then treat openvpn.foo as any other service, so you can"
564 - elog "stop one vpn and start another if you need to."
565 -
566 - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
567 - ewarn ""
568 - ewarn "WARNING: If you use the remote keyword then you are deemed to be"
569 - ewarn "a client by our init script and as such we force up,down scripts."
570 - ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
571 - ewarn "can move your scripts to."
572 - fi
573 -
574 - if use plugins ; then
575 - einfo ""
576 - einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
577 - fi
578 -
579 - einfo ""
580 - einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
581 - einfo "They can now be emerged via app-crypt/easy-rsa."
582 -}