Gentoo Archives: gentoo-commits

From: "Cedric Krier (cedk)" <cedk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1_rc9.ebuild openvpn-2.1_rc7-r2.ebuild
Date: Fri, 01 Aug 2008 09:03:47
Message-Id: E1KOqY3-0008P8-Ir@stork.gentoo.org
1 cedk 08/08/01 09:03:43
2
3 Modified: ChangeLog
4 Added: openvpn-2.1_rc9.ebuild
5 Removed: openvpn-2.1_rc7-r2.ebuild
6 Log:
7 Version bump
8 (Portage version: 2.1.4.4)
9
10 Revision Changes Path
11 1.136 net-misc/openvpn/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.136&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.136&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/ChangeLog?r1=1.135&r2=1.136
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v
20 retrieving revision 1.135
21 retrieving revision 1.136
22 diff -u -r1.135 -r1.136
23 --- ChangeLog 14 May 2008 17:02:24 -0000 1.135
24 +++ ChangeLog 1 Aug 2008 09:03:43 -0000 1.136
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-misc/openvpn
27 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.135 2008/05/14 17:02:24 cedk Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.136 2008/08/01 09:03:43 cedk Exp $
30 +
31 +*openvpn-2.1_rc9 (01 Aug 2008)
32 +
33 + 01 Aug 2008; Cédric Krier <cedk@g.o>
34 + -files/openvpn-2.1_rc7-tap.patch, -openvpn-2.1_rc7-r2.ebuild,
35 + +openvpn-2.1_rc9.ebuild:
36 + Version bump
37
38 *openvpn-2.0.9 (14 May 2008)
39
40
41
42
43 1.1 net-misc/openvpn/openvpn-2.1_rc9.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc9.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc9.ebuild?rev=1.1&content-type=text/plain
47
48 Index: openvpn-2.1_rc9.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-2.1_rc9.ebuild,v 1.1 2008/08/01 09:03:43 cedk Exp $
53
54 inherit eutils multilib
55
56 DESCRIPTION="OpenVPN is a robust and highly flexible tunneling application compatible with many OSes."
57 SRC_URI="http://openvpn.net/release/${P}.tar.gz"
58 HOMEPAGE="http://openvpn.net/"
59
60 LICENSE="GPL-2"
61 SLOT="0"
62 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
63 IUSE="examples iproute2 minimal pam passwordsave selinux ssl static pkcs11 threads userland_BSD"
64
65 DEPEND=">=dev-libs/lzo-1.07
66 kernel_linux? (
67 iproute2? ( sys-apps/iproute2 ) !iproute2? ( sys-apps/net-tools )
68 )
69 !minimal? ( pam? ( virtual/pam ) )
70 selinux? ( sec-policy/selinux-openvpn )
71 ssl? ( >=dev-libs/openssl-0.9.6 )
72 pkcs11? ( >=dev-libs/pkcs11-helper-1.05 )"
73
74 pkg_setup() {
75 if use iproute2 ; then
76 if built_with_use sys-apps/iproute2 minimal ; then
77 eerror "iproute2 support requires that sys-apps/iproute2 was not"
78 eerror "built with the minimal USE flag"
79 die "iproute2 support not available"
80 fi
81 fi
82 }
83
84 src_compile() {
85 local myconf=""
86
87 if use minimal ; then
88 myconf="${myconf} --disable-plugins"
89 myconf="${myconf} --disable-pkcs11"
90 else
91 myconf="$(use_enable pkcs11)"
92 fi
93
94 econf ${myconf} \
95 $(use_enable passwordsave password-save) \
96 $(use_enable ssl) \
97 $(use_enable ssl crypto) \
98 $(use_enable threads pthread) \
99 $(use_enable iproute2) \
100 || die "configure failed"
101
102 use static && sed -i -e '/^LIBS/s/LIBS = /LIBS = -static /' Makefile
103
104 emake || die "make failed"
105
106 if ! use minimal ; then
107 cd plugin
108 for i in $( ls 2>/dev/null ); do
109 [[ ${i} == "README" || ${i} == "examples" || ${i} == "defer" ]] && continue
110 [[ ${i} == "auth-pam" ]] && ! use pam && continue
111 einfo "Building ${i} plugin"
112 cd "${i}"
113 emake || die "make failed"
114 cd ..
115 done
116 cd ..
117 fi
118 }
119
120 src_install() {
121 make DESTDIR="${D}" install || die "make install failed"
122
123 # install documentation
124 dodoc AUTHORS ChangeLog PORTS README
125
126 # Empty dir
127 dodir /etc/openvpn
128 keepdir /etc/openvpn
129
130 # Install some helper scripts
131 exeinto /etc/openvpn
132 doexe "${FILESDIR}/up.sh"
133 doexe "${FILESDIR}/down.sh"
134
135 # Install the init script and config file
136 newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
137 newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
138
139 # install examples, controlled by the respective useflag
140 if use examples ; then
141 # dodoc does not supportly support directory traversal, #15193
142 insinto /usr/share/doc/${PF}/examples
143 doins -r sample-{config-files,keys,scripts} contrib
144 prepalldocs
145 fi
146
147 # Install plugins and easy-rsa
148 if ! use minimal ; then
149 cd easy-rsa/2.0
150 make install "DESTDIR=${D}/usr/share/${PN}/easy-rsa"
151 cd ../..
152
153 exeinto "/usr/$(get_libdir)/${PN}"
154 doexe plugin/*/*.so
155 fi
156 }
157
158 pkg_postinst() {
159 # Add openvpn user so openvpn servers can drop privs
160 # Clients should run as root so they can change ip addresses,
161 # dns information and other such things.
162 enewgroup openvpn
163 enewuser openvpn "" "" "" openvpn
164
165 if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ; then
166 ewarn "WARNING: The openvpn init script has changed"
167 ewarn ""
168 fi
169
170 einfo "The openvpn init script expects to find the configuration file"
171 einfo "openvpn.conf in /etc/openvpn along with any extra files it may need."
172 einfo ""
173 einfo "To create more VPNs, simply create a new .conf file for it and"
174 einfo "then create a symlink to the openvpn init script from a link called"
175 einfo "openvpn.newconfname - like so"
176 einfo " cd /etc/openvpn"
177 einfo " ${EDITOR##*/} foo.conf"
178 einfo " cd /etc/init.d"
179 einfo " ln -s openvpn openvpn.foo"
180 einfo ""
181 einfo "You can then treat openvpn.foo as any other service, so you can"
182 einfo "stop one vpn and start another if you need to."
183
184 if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
185 ewarn ""
186 ewarn "WARNING: If you use the remote keyword then you are deemed to be"
187 ewarn "a client by our init script and as such we force up,down scripts."
188 ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
189 ewarn "can move your scripts to."
190 fi
191
192 if ! use minimal ; then
193 einfo ""
194 einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
195 fi
196 }