Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.2.0-r1.ebuild
Date: Sun, 01 May 2011 10:40:30
Message-Id: 20110501104019.7F36220054@flycatcher.gentoo.org
1 djc 11/05/01 10:40:19
2
3 Modified: ChangeLog
4 Added: openvpn-2.2.0-r1.ebuild
5 Log:
6 Fix issues with docdir and remaining eurephia mentions (bug 365487).
7
8 (Portage version: 2.1.9.46/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.216 net-misc/openvpn/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.216&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?rev=1.216&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/ChangeLog?r1=1.215&r2=1.216
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v
20 retrieving revision 1.215
21 retrieving revision 1.216
22 diff -u -r1.215 -r1.216
23 --- ChangeLog 30 Apr 2011 21:13:19 -0000 1.215
24 +++ ChangeLog 1 May 2011 10:40:19 -0000 1.216
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-misc/openvpn
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.215 2011/04/30 21:13:19 djc Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.216 2011/05/01 10:40:19 djc Exp $
30 +
31 +*openvpn-2.2.0-r1 (01 May 2011)
32 +
33 + 01 May 2011; Dirkjan Ochtman <djc@g.o> +openvpn-2.2.0-r1.ebuild:
34 + Fix issues with docdir and remaining eurephia mentions (bug 365487).
35
36 30 Apr 2011; Dirkjan Ochtman <djc@g.o> openvpn-2.2.0.ebuild:
37 Upgrade to EAPI=4 for 2.2.0, get rid of prepalldocs.
38
39
40
41 1.1 net-misc/openvpn/openvpn-2.2.0-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/openvpn-2.2.0-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openvpn/openvpn-2.2.0-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openvpn-2.2.0-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/openvpn-2.2.0-r1.ebuild,v 1.1 2011/05/01 10:40:19 djc Exp $
51
52 EAPI=4
53
54 inherit eutils multilib toolchain-funcs autotools flag-o-matic
55
56 IPV6_VERSION="2.2RC2-ipv6-20110424-2"
57 DESCRIPTION="OpenVPN is a robust and highly flexible tunneling application compatible with many OSes."
58 SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz
59 ipv6? (
60 http://www.greenie.net/ipv6/openvpn-${IPV6_VERSION}.patch.gz
61 )"
62 HOMEPAGE="http://openvpn.net/"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
67 IUSE="examples iproute2 ipv6 minimal pam passwordsave selinux ssl static pkcs11 userland_BSD"
68
69 DEPEND=">=dev-libs/lzo-1.07
70 kernel_linux? (
71 iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
72 )
73 !minimal? ( pam? ( virtual/pam ) )
74 selinux? ( sec-policy/selinux-openvpn )
75 ssl? ( >=dev-libs/openssl-0.9.6 )
76 pkcs11? ( >=dev-libs/pkcs11-helper-1.05 )"
77 RDEPEND="${DEPEND}"
78
79 src_prepare() {
80 epatch "${FILESDIR}/${PN}-2.1_rc20-pkcs11.patch"
81 use ipv6 && epatch "${WORKDIR}/${PN}-${IPV6_VERSION}.patch"
82 sed -i \
83 -e "s/gcc \${CC_FLAGS}/\${CC} \${CFLAGS} -Wall/" \
84 -e "s/-shared/-shared \${LDFLAGS}/" \
85 plugin/*/Makefile || die "sed failed"
86 if use ipv6; then
87 eautoreconf
88 fi
89 }
90
91 src_configure() {
92 # basic.h defines a type 'bool' that conflicts with the altivec
93 # keyword bool which has to be fixed upstream, see bugs #293840
94 # and #297854.
95 # For now, filter out -maltivec on ppc and append -mno-altivec, as
96 # -maltivec is enabled implicitly by -mcpu and similar flags.
97 (use ppc || use ppc64) && filter-flags -maltivec && append-flags -mno-altivec
98
99 local myconf=""
100
101 if use minimal ; then
102 myconf="${myconf} --disable-plugins"
103 myconf="${myconf} --disable-pkcs11"
104 else
105 myconf="$(use_enable pkcs11)"
106 fi
107
108 econf ${myconf} \
109 $(use_enable passwordsave password-save) \
110 $(use_enable ssl) \
111 $(use_enable ssl crypto) \
112 $(use_enable iproute2) \
113 --docdir="${DESTDIR}/usr/share/doc/${PF}"
114 }
115
116 src_compile() {
117
118 if use static ; then
119 sed -i -e '/^LIBS/s/LIBS = /LIBS = -static /' Makefile || die "sed failed"
120 fi
121
122 emake || die "make failed"
123
124 if ! use minimal ; then
125 cd plugin
126 for i in *; do
127 [[ ${i} == "README" || ${i} == "examples" || ${i} == "defer" ]] && continue
128 [[ ${i} == "auth-pam" ]] && ! use pam && continue
129 einfo "Building ${i} plugin"
130 emake -C "${i}" CC=$(tc-getCC) || die "make failed"
131 done
132 cd ..
133 fi
134 }
135
136 src_install() {
137 emake DESTDIR="${D}" install || die "make install failed"
138
139 # install documentation
140 dodoc AUTHORS ChangeLog PORTS README
141
142 # Install some helper scripts
143 keepdir /etc/openvpn
144 exeinto /etc/openvpn
145 doexe "${FILESDIR}/up.sh" || die "doexe failed"
146 doexe "${FILESDIR}/down.sh" || die "doexe failed"
147
148 # Install the init script and config file
149 newinitd "${FILESDIR}/${PN}-2.1.init" openvpn || die "newinitd failed"
150 newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn || die "newconfd failed"
151
152 # install examples, controlled by the respective useflag
153 if use examples ; then
154 # dodoc does not supportly support directory traversal, #15193
155 insinto /usr/share/doc/${PF}/examples
156 doins -r sample-{config-files,keys,scripts} contrib
157 fi
158
159 # Install plugins and easy-rsa
160 doenvd "${FILESDIR}/65openvpn" # config-protect easy-rsa
161 if ! use minimal ; then
162 cd easy-rsa/2.0
163 make install "DESTDIR=${D}/usr/share/${PN}/easy-rsa"
164 cd ../..
165
166 exeinto "/usr/$(get_libdir)/${PN}"
167 doexe plugin/*/*.so
168 fi
169 }
170
171 pkg_postinst() {
172 # Add openvpn user so openvpn servers can drop privs
173 # Clients should run as root so they can change ip addresses,
174 # dns information and other such things.
175 enewgroup openvpn
176 enewuser openvpn "" "" "" openvpn
177
178 if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
179 ewarn "WARNING: The openvpn init script has changed"
180 ewarn ""
181 fi
182
183 elog "The openvpn init script expects to find the configuration file"
184 elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
185 elog ""
186 elog "To create more VPNs, simply create a new .conf file for it and"
187 elog "then create a symlink to the openvpn init script from a link called"
188 elog "openvpn.newconfname - like so"
189 elog " cd /etc/openvpn"
190 elog " ${EDITOR##*/} foo.conf"
191 elog " cd /etc/init.d"
192 elog " ln -s openvpn openvpn.foo"
193 elog ""
194 elog "You can then treat openvpn.foo as any other service, so you can"
195 elog "stop one vpn and start another if you need to."
196
197 if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
198 ewarn ""
199 ewarn "WARNING: If you use the remote keyword then you are deemed to be"
200 ewarn "a client by our init script and as such we force up,down scripts."
201 ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
202 ewarn "can move your scripts to."
203 fi
204
205 if ! use minimal ; then
206 einfo ""
207 einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
208 fi
209
210 if use ipv6 ; then
211 einfo ""
212 einfo "This build contains a community-maintained IPv6 patch."
213 einfo "For more information please visit:"
214 einfo "http://www.greenie.net/ipv6/openvpn.html"
215 fi
216 }