1 |
commit: 130dc998a483dad52f3bb6de991cb900de1c40db |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 5 03:15:05 2016 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 5 03:21:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=130dc998 |
7 |
|
8 |
net-im/bitlbee: revision bump for various updates |
9 |
|
10 |
* update to EAPI 6 |
11 |
* fix systemd unit to use bitlbee user (bug #472406) |
12 |
* update SSL handling, make it non-optional (bug #582658 by Alex Xu) |
13 |
* drop skype support, use libpurple and x11-plugins/pidgin-skypeweb |
14 |
instead (https://wiki.bitlbee.org/HowtoSkypeWeb) |
15 |
|
16 |
net-im/bitlbee/bitlbee-3.4.2-r1.ebuild | 158 +++++++++++++++++++++ |
17 |
net-im/bitlbee/bitlbee-9999.ebuild | 121 ++++++---------- |
18 |
.../bitlbee/files/bitlbee-3.4.2-systemd-user.patch | 10 ++ |
19 |
3 files changed, 213 insertions(+), 76 deletions(-) |
20 |
|
21 |
diff --git a/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild b/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000..8e5f4f7 |
24 |
--- /dev/null |
25 |
+++ b/net-im/bitlbee/bitlbee-3.4.2-r1.ebuild |
26 |
@@ -0,0 +1,158 @@ |
27 |
+# Copyright 1999-2016 Gentoo Foundation |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+# $Id$ |
30 |
+ |
31 |
+EAPI=6 |
32 |
+ |
33 |
+inherit user systemd |
34 |
+ |
35 |
+if [[ ${PV} == "9999" ]]; then |
36 |
+ EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git" |
37 |
+ inherit git-r3 |
38 |
+else |
39 |
+ SRC_URI="http://get.bitlbee.org/src/${P}.tar.gz" |
40 |
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
41 |
+fi |
42 |
+ |
43 |
+DESCRIPTION="irc to IM gateway that support multiple IM protocols" |
44 |
+HOMEPAGE="http://www.bitlbee.org/" |
45 |
+ |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+IUSE_PROTOCOLS="msn oscar purple twitter +xmpp yahoo" |
49 |
+IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd |
50 |
+ ${IUSE_PROTOCOLS}" |
51 |
+ |
52 |
+REQUIRED_USE=" |
53 |
+ || ( purple xmpp msn oscar yahoo ) |
54 |
+ xmpp? ( !nss ) |
55 |
+" |
56 |
+ |
57 |
+COMMON_DEPEND=" |
58 |
+ >=dev-libs/glib-2.16 |
59 |
+ purple? ( net-im/pidgin ) |
60 |
+ libevent? ( dev-libs/libevent:= ) |
61 |
+ otr? ( >=net-libs/libotr-4 ) |
62 |
+ gnutls? ( net-libs/gnutls:= ) |
63 |
+ !gnutls? ( |
64 |
+ nss? ( dev-libs/nss ) |
65 |
+ !nss? ( |
66 |
+ libressl? ( dev-libs/libressl:= ) |
67 |
+ !libressl? ( dev-libs/openssl:0= ) |
68 |
+ ) |
69 |
+ ) |
70 |
+" |
71 |
+DEPEND="${COMMON_DEPEND} |
72 |
+ virtual/pkgconfig |
73 |
+ selinux? ( sec-policy/selinux-bitlbee ) |
74 |
+ test? ( dev-libs/check )" |
75 |
+ |
76 |
+RDEPEND="${COMMON_DEPEND} |
77 |
+ virtual/logger |
78 |
+ xinetd? ( sys-apps/xinetd )" |
79 |
+ |
80 |
+pkg_setup() { |
81 |
+ enewgroup bitlbee |
82 |
+ enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee |
83 |
+} |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ [[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${P}-systemd-user.patch |
87 |
+ eapply_user |
88 |
+} |
89 |
+ |
90 |
+src_configure() { |
91 |
+ local myconf |
92 |
+ |
93 |
+ # setup plugins, protocol, ipv6 and debug |
94 |
+ myconf+=( --jabber=$(usex xmpp 1 0) ) |
95 |
+ for flag in debug ipv6 plugins ${IUSE_PROTOCOLS/+xmpp/} ; do |
96 |
+ myconf+=( --${flag}=$(usex ${flag} 1 0) ) |
97 |
+ done |
98 |
+ |
99 |
+ # set otr |
100 |
+ if use otr && use plugins ; then |
101 |
+ myconf+=( --otr=plugin ) |
102 |
+ else |
103 |
+ if use otr ; then |
104 |
+ ewarn "OTR support has been disabled automatically because it" |
105 |
+ ewarn "requires the plugins USE flag." |
106 |
+ fi |
107 |
+ myconf+=( --otr=0 ) |
108 |
+ fi |
109 |
+ |
110 |
+ # setup ssl use flags |
111 |
+ if use gnutls ; then |
112 |
+ myconf+=( --ssl=gnutls ) |
113 |
+ einfo "Using gnutls for SSL support" |
114 |
+ else |
115 |
+ ewarn "Only gnutls is officially supported by upstream." |
116 |
+ if use nss ; then |
117 |
+ myconf+=( --ssl=nss ) |
118 |
+ einfo "Using nss for SSL support" |
119 |
+ else |
120 |
+ myconf+=( --ssl=openssl ) |
121 |
+ einfo "Using openssl for SSL support" |
122 |
+ fi |
123 |
+ fi |
124 |
+ |
125 |
+ # set event handler |
126 |
+ if use libevent ; then |
127 |
+ myconf+=( --events=libevent ) |
128 |
+ else |
129 |
+ myconf+=( --events=glib ) |
130 |
+ fi |
131 |
+ |
132 |
+ # not autotools-based |
133 |
+ ./configure \ |
134 |
+ --prefix=/usr \ |
135 |
+ --datadir=/usr/share/bitlbee \ |
136 |
+ --etcdir=/etc/bitlbee \ |
137 |
+ --plugindir=/usr/$(get_libdir)/bitlbee \ |
138 |
+ --systemdsystemunitdir=$(systemd_get_systemunitdir) \ |
139 |
+ --doc=1 \ |
140 |
+ --strip=0 \ |
141 |
+ "${myconf[@]}" || die |
142 |
+ |
143 |
+ sed -i \ |
144 |
+ -e "/^EFLAGS/s:=:&${LDFLAGS} :" \ |
145 |
+ Makefile.settings || die |
146 |
+} |
147 |
+ |
148 |
+src_install() { |
149 |
+ emake DESTDIR="${D}" install install-etc install-doc install-dev install-systemd |
150 |
+ |
151 |
+ keepdir /var/lib/bitlbee |
152 |
+ fperms 700 /var/lib/bitlbee |
153 |
+ fowners bitlbee:bitlbee /var/lib/bitlbee |
154 |
+ |
155 |
+ dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} |
156 |
+ |
157 |
+ if use xinetd ; then |
158 |
+ insinto /etc/xinetd.d |
159 |
+ newins doc/bitlbee.xinetd bitlbee |
160 |
+ fi |
161 |
+ |
162 |
+ newinitd "${FILESDIR}"/bitlbee.initd-r1 bitlbee |
163 |
+ newconfd "${FILESDIR}"/bitlbee.confd-r1 bitlbee |
164 |
+ |
165 |
+ exeinto /usr/share/bitlbee |
166 |
+ doexe utils/{convert_purple.py,bitlbee-ctl.pl} |
167 |
+} |
168 |
+ |
169 |
+pkg_postinst() { |
170 |
+ chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee |
171 |
+ [[ -d "${ROOT}"/var/run/bitlbee ]] && |
172 |
+ chown -R bitlbee:bitlbee "${ROOT}"/var/run/bitlbee |
173 |
+ |
174 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
175 |
+ einfo |
176 |
+ elog "The bitlbee init script will now attempt to stop all processes owned by the" |
177 |
+ elog "bitlbee user, including per-client forks." |
178 |
+ elog |
179 |
+ elog "Tell the init script not to touch anything besides the main bitlbee process" |
180 |
+ elog "by changing the BITLBEE_STOP_ALL variable in" |
181 |
+ elog " /etc/conf.d/bitlbee" |
182 |
+ einfo |
183 |
+ fi |
184 |
+} |
185 |
|
186 |
diff --git a/net-im/bitlbee/bitlbee-9999.ebuild b/net-im/bitlbee/bitlbee-9999.ebuild |
187 |
index 8a75327..ae09048 100644 |
188 |
--- a/net-im/bitlbee/bitlbee-9999.ebuild |
189 |
+++ b/net-im/bitlbee/bitlbee-9999.ebuild |
190 |
@@ -2,10 +2,9 @@ |
191 |
# Distributed under the terms of the GNU General Public License v2 |
192 |
# $Id$ |
193 |
|
194 |
-EAPI=5 |
195 |
-PYTHON_COMPAT=( python2_7 ) |
196 |
+EAPI=6 |
197 |
|
198 |
-inherit eutils multilib user python-single-r1 systemd |
199 |
+inherit user systemd |
200 |
|
201 |
if [[ ${PV} == "9999" ]]; then |
202 |
EGIT_REPO_URI="https://github.com/bitlbee/bitlbee.git" |
203 |
@@ -20,8 +19,14 @@ HOMEPAGE="http://www.bitlbee.org/" |
204 |
|
205 |
LICENSE="GPL-2" |
206 |
SLOT="0" |
207 |
-IUSE="debug gnutls ipv6 +xmpp libevent msn nss +oscar otr +plugins purple selinux |
208 |
- skype ssl test twitter +yahoo xinetd libressl" |
209 |
+IUSE_PROTOCOLS="msn oscar purple twitter +xmpp yahoo" |
210 |
+IUSE="debug +gnutls ipv6 libevent libressl nss otr +plugins selinux test xinetd |
211 |
+ ${IUSE_PROTOCOLS}" |
212 |
+ |
213 |
+REQUIRED_USE=" |
214 |
+ || ( purple xmpp msn oscar yahoo ) |
215 |
+ xmpp? ( !nss ) |
216 |
+" |
217 |
|
218 |
COMMON_DEPEND=" |
219 |
>=dev-libs/glib-2.16 |
220 |
@@ -31,122 +36,91 @@ COMMON_DEPEND=" |
221 |
gnutls? ( net-libs/gnutls:= ) |
222 |
!gnutls? ( |
223 |
nss? ( dev-libs/nss ) |
224 |
- !nss? ( ssl? ( !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:= ) ) ) |
225 |
+ !nss? ( |
226 |
+ libressl? ( dev-libs/libressl:= ) |
227 |
+ !libressl? ( dev-libs/openssl:0= ) |
228 |
+ ) |
229 |
) |
230 |
" |
231 |
DEPEND="${COMMON_DEPEND} |
232 |
- dev-lang/python |
233 |
virtual/pkgconfig |
234 |
selinux? ( sec-policy/selinux-bitlbee ) |
235 |
test? ( dev-libs/check )" |
236 |
|
237 |
RDEPEND="${COMMON_DEPEND} |
238 |
virtual/logger |
239 |
- skype? ( |
240 |
- dev-python/skype4py[${PYTHON_USEDEP}] |
241 |
- net-im/skype |
242 |
- ) |
243 |
xinetd? ( sys-apps/xinetd )" |
244 |
|
245 |
-REQUIRED_USE="|| ( purple xmpp msn oscar yahoo ) |
246 |
- msn? ( || ( gnutls nss ssl ) ) |
247 |
- xmpp? ( !nss )" |
248 |
- |
249 |
pkg_setup() { |
250 |
- if use xmpp && ! use gnutls && ! use ssl ; then |
251 |
- einfo |
252 |
- elog "You have enabled support for Jabber but do not have SSL" |
253 |
- elog "support enabled. This *will* prevent bitlbee from being" |
254 |
- elog "able to connect to SSL enabled Jabber servers. If you need to" |
255 |
- elog "connect to Jabber over SSL, enable ONE of the following use" |
256 |
- elog "flags: gnutls or ssl" |
257 |
- einfo |
258 |
- fi |
259 |
- |
260 |
- use skype && python-single-r1_pkg_setup |
261 |
- |
262 |
enewgroup bitlbee |
263 |
enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee |
264 |
} |
265 |
|
266 |
src_prepare() { |
267 |
- sed -i \ |
268 |
- -e "s@/usr/local/sbin/bitlbee@/usr/sbin/bitlbee@" \ |
269 |
- -e "s/nobody/bitlbee/" \ |
270 |
- -e "s/}/ disable = yes\n}/" \ |
271 |
- doc/bitlbee.xinetd || die "sed failed in xinetd" |
272 |
- |
273 |
- sed -i \ |
274 |
- -e "s@mozilla-nss@nss@g" \ |
275 |
- configure || die "sed failed in configure" |
276 |
- |
277 |
- use skype && python_fix_shebang protocols/skype/skyped.py |
278 |
- |
279 |
- [[ ${PV} != "9999" ]] && epatch "${FILESDIR}"/${PN}-3.2.1-configure.patch |
280 |
- epatch_user |
281 |
+ [[ ${PV} != "9999" ]] && eapply "${FILESDIR}"/${P}-systemd-user.patch |
282 |
+ eapply_user |
283 |
} |
284 |
|
285 |
src_configure() { |
286 |
+ local myconf |
287 |
+ |
288 |
# setup plugins, protocol, ipv6 and debug |
289 |
- use xmpp && myconf="${myconf} --jabber=1" |
290 |
- for flag in debug ipv6 msn oscar plugins purple skype twitter yahoo ; do |
291 |
- if use ${flag} ; then |
292 |
- myconf="${myconf} --${flag}=1" |
293 |
- else |
294 |
- myconf="${myconf} --${flag}=0" |
295 |
- fi |
296 |
+ myconf+=( --jabber=$(usex xmpp 1 0) ) |
297 |
+ for flag in debug ipv6 plugins ${IUSE_PROTOCOLS/+xmpp/} ; do |
298 |
+ myconf+=( --${flag}=$(usex ${flag} 1 0) ) |
299 |
done |
300 |
|
301 |
# set otr |
302 |
if use otr && use plugins ; then |
303 |
- myconf="${myconf} --otr=plugin" |
304 |
+ myconf+=( --otr=plugin ) |
305 |
else |
306 |
if use otr ; then |
307 |
ewarn "OTR support has been disabled automatically because it" |
308 |
ewarn "requires the plugins USE flag." |
309 |
fi |
310 |
- myconf="${myconf} --otr=0" |
311 |
+ myconf+=( --otr=0 ) |
312 |
fi |
313 |
|
314 |
# setup ssl use flags |
315 |
if use gnutls ; then |
316 |
- myconf="${myconf} --ssl=gnutls" |
317 |
+ myconf+=( --ssl=gnutls ) |
318 |
einfo "Using gnutls for SSL support" |
319 |
- elif use ssl ; then |
320 |
- myconf="${myconf} --ssl=openssl" |
321 |
- einfo "Using openssl for SSL support" |
322 |
- elif use nss ; then |
323 |
- myconf="${myconf} --ssl=nss" |
324 |
- einfo "Using nss for SSL support" |
325 |
else |
326 |
- myconf="${myconf} --ssl=bogus" |
327 |
- einfo "You will not have any encryption support enabled." |
328 |
+ ewarn "Only gnutls is officially supported by upstream." |
329 |
+ if use nss ; then |
330 |
+ myconf+=( --ssl=nss ) |
331 |
+ einfo "Using nss for SSL support" |
332 |
+ else |
333 |
+ myconf+=( --ssl=openssl ) |
334 |
+ einfo "Using openssl for SSL support" |
335 |
+ fi |
336 |
fi |
337 |
|
338 |
# set event handler |
339 |
if use libevent ; then |
340 |
- myconf="${myconf} --events=libevent" |
341 |
+ myconf+=( --events=libevent ) |
342 |
else |
343 |
- myconf="${myconf} --events=glib" |
344 |
+ myconf+=( --events=glib ) |
345 |
fi |
346 |
|
347 |
- # NOTE: bitlbee's configure script is not an autotool creation, |
348 |
- # so that is why we don't use econf. |
349 |
+ # not autotools-based |
350 |
./configure \ |
351 |
- --prefix="${EPREFIX}/usr" \ |
352 |
- --datadir="${EPREFIX}/usr/share/bitlbee" \ |
353 |
- --etcdir="${EPREFIX}/etc/bitlbee" \ |
354 |
- --plugindir="${EPREFIX}/usr/$(get_libdir)/bitlbee" \ |
355 |
- --systemdsystemunitdir=$(systemd_get_unitdir) \ |
356 |
- --doc=1 --strip=0 ${myconf} || die "econf failed" |
357 |
+ --prefix=/usr \ |
358 |
+ --datadir=/usr/share/bitlbee \ |
359 |
+ --etcdir=/etc/bitlbee \ |
360 |
+ --plugindir=/usr/$(get_libdir)/bitlbee \ |
361 |
+ --systemdsystemunitdir=$(systemd_get_systemunitdir) \ |
362 |
+ --doc=1 \ |
363 |
+ --strip=0 \ |
364 |
+ "${myconf[@]}" || die |
365 |
|
366 |
sed -i \ |
367 |
-e "/^EFLAGS/s:=:&${LDFLAGS} :" \ |
368 |
- Makefile.settings || die "sed failed" |
369 |
+ Makefile.settings || die |
370 |
} |
371 |
|
372 |
src_install() { |
373 |
- emake install install-etc install-doc install-dev install-systemd DESTDIR="${D}" |
374 |
+ emake DESTDIR="${D}" install install-etc install-doc install-dev install-systemd |
375 |
|
376 |
keepdir /var/lib/bitlbee |
377 |
fperms 700 /var/lib/bitlbee |
378 |
@@ -154,11 +128,6 @@ src_install() { |
379 |
|
380 |
dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} |
381 |
|
382 |
- if use skype ; then |
383 |
- newdoc protocols/skype/NEWS NEWS-skype |
384 |
- newdoc protocols/skype/README README-skype |
385 |
- fi |
386 |
- |
387 |
if use xinetd ; then |
388 |
insinto /etc/xinetd.d |
389 |
newins doc/bitlbee.xinetd bitlbee |
390 |
|
391 |
diff --git a/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch b/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch |
392 |
new file mode 100644 |
393 |
index 00000000..07d58f4 |
394 |
--- /dev/null |
395 |
+++ b/net-im/bitlbee/files/bitlbee-3.4.2-systemd-user.patch |
396 |
@@ -0,0 +1,10 @@ |
397 |
+--- a/init/bitlbee.service.in |
398 |
++++ b/init/bitlbee.service.in |
399 |
+@@ -4,6 +4,7 @@ |
400 |
+ |
401 |
+ [Service] |
402 |
+ ExecStart=@sbindir@bitlbee -F -n |
403 |
++User=bitlbee |
404 |
+ |
405 |
+ [Install] |
406 |
+ WantedBy=multi-user.target |