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