/[gentoo-x86]/net-im/bitlbee/bitlbee-3.0.5-r1.ebuild
Gentoo

Contents of /net-im/bitlbee/bitlbee-3.0.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun Nov 2 08:58:11 2014 UTC (6 weeks, 4 days ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +3 -2 lines
Remove sec-policy/selinux-* dependency from DEPEND but keep in RDEPEND (bug #527698)

(Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-im/bitlbee/bitlbee-3.0.5-r1.ebuild,v 1.10 2014/06/05 10:04:32 mrueg Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="skype? 2:2.5"
7
8 inherit eutils multilib python user
9
10 DESCRIPTION="irc to IM gateway that support multiple IM protocols"
11 HOMEPAGE="http://www.bitlbee.org/"
12 SRC_URI="http://get.bitlbee.org/src/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-fbsd"
17 IUSE="debug gnutls ipv6 +jabber libevent msn nss +oscar otr +plugins purple selinux
18 skype ssl test twitter +yahoo xinetd" # ldap - Bug 195758
19
20 COMMON_DEPEND="purple? ( net-im/pidgin )
21 libevent? ( dev-libs/libevent )
22 !libevent? ( >=dev-libs/glib-2.4 )
23 otr? ( <net-libs/libotr-4 )
24 gnutls? ( net-libs/gnutls )
25 !gnutls? (
26 nss? ( dev-libs/nss )
27 !nss? ( ssl? ( dev-libs/openssl ) )
28 )
29 "
30 # ldap? ( net-nds/openldap )"
31 DEPEND="${COMMON_DEPEND}
32 virtual/pkgconfig
33 skype? ( app-text/asciidoc )
34 test? ( dev-libs/check )"
35
36 RDEPEND="${COMMON_DEPEND}
37 virtual/logger
38 selinux? ( sec-policy/selinux-bitlbee )
39 skype? (
40 dev-python/skype4py
41 net-im/skype
42 )
43 xinetd? ( sys-apps/xinetd )"
44
45 REQUIRED_USE="^^ ( purple || ( jabber msn oscar yahoo ) )
46 msn? ( || ( gnutls nss ssl ) )
47 jabber? ( !nss )"
48
49 pkg_setup() {
50 if use jabber && ! use gnutls && ! use ssl ; then
51 einfo
52 elog "You have enabled support for Jabber but do not have SSL"
53 elog "support enabled. This *will* prevent bitlbee from being"
54 elog "able to connect to SSL enabled Jabber servers. If you need to"
55 elog "connect to Jabber over SSL, enable ONE of the following use"
56 elog "flags: gnutls or ssl"
57 einfo
58 fi
59
60 enewgroup bitlbee
61 enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee
62
63 if use skype ; then
64 python_set_active_version 2
65 python_pkg_setup
66 fi
67 }
68
69 src_prepare() {
70 sed -i \
71 -e "s@/usr/local/sbin/bitlbee@/usr/sbin/bitlbee@" \
72 -e "s/nobody/bitlbee/" \
73 -e "s/}/ disable = yes\n}/" \
74 doc/bitlbee.xinetd || die "sed failed in xinetd"
75
76 sed -i \
77 -e "s@mozilla-nss@nss@g" \
78 configure || die "sed failed in configure"
79
80 use skype && python_convert_shebangs 2 protocols/skype/skyped.py
81
82 epatch "${FILESDIR}"/${PN}-3.0-configure.patch
83 epatch "${FILESDIR}"/${P}-parallel-make.patch
84 }
85
86 src_configure() {
87 # ldap hard-disabled for now
88 local myconf="--ldap=0"
89
90 # setup plugins, protocol, ipv6 and debug
91 for flag in debug ipv6 msn jabber oscar plugins purple skype twitter yahoo ; do
92 if use ${flag} ; then
93 myconf="${myconf} --${flag}=1"
94 else
95 myconf="${myconf} --${flag}=0"
96 fi
97 done
98
99 # set otr
100 if use otr && use plugins ; then
101 myconf="${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="${myconf} --otr=0"
108 fi
109
110 # setup ssl use flags
111 if use gnutls ; then
112 myconf="${myconf} --ssl=gnutls"
113 einfo "Using gnutls for SSL support"
114 elif use ssl ; then
115 myconf="${myconf} --ssl=openssl"
116 einfo "Using openssl for SSL support"
117 elif use nss ; then
118 myconf="${myconf} --ssl=nss"
119 einfo "Using nss for SSL support"
120 else
121 myconf="${myconf} --ssl=bogus"
122 einfo "You will not have any encryption support enabled."
123 fi
124
125 # set event handler
126 if use libevent ; then
127 myconf="${myconf} --events=libevent"
128 else
129 myconf="${myconf} --events=glib"
130 fi
131
132 # NOTE: bitlbee's configure script is not an autotool creation,
133 # so that is why we don't use econf.
134 ./configure --prefix=/usr --datadir=/usr/share/bitlbee \
135 --etcdir=/etc/bitlbee --plugindir=/usr/$(get_libdir)/bitlbee \
136 --strip=0 ${myconf} || die "econf failed"
137
138 sed -i \
139 -e "/^EFLAGS/s:=:&${LDFLAGS} :" \
140 Makefile.settings || die "sed failed"
141 }
142
143 src_install() {
144 emake install install-etc install-doc install-dev DESTDIR="${D}"
145
146 keepdir /var/lib/bitlbee
147 fperms 700 /var/lib/bitlbee
148 fowners bitlbee:bitlbee /var/lib/bitlbee
149
150 dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README}
151 dodoc doc/user-guide/user-guide.txt
152 dohtml doc/user-guide/*.html
153
154 if use skype ; then
155 newdoc protocols/skype/NEWS NEWS-skype
156 newdoc protocols/skype/README README-skype
157 fi
158
159 doman doc/bitlbee.8 doc/bitlbee.conf.5
160
161 if use xinetd ; then
162 insinto /etc/xinetd.d
163 newins doc/bitlbee.xinetd bitlbee
164 fi
165
166 newinitd "${FILESDIR}"/bitlbee.initd bitlbee
167 newconfd "${FILESDIR}"/bitlbee.confd bitlbee
168
169 exeinto /usr/share/bitlbee
170 cd utils
171 doexe convert_purple.py bitlbee-ctl.pl
172 }
173
174 pkg_postinst() {
175 chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee
176 chown -R bitlbee:bitlbee "${ROOT}"/var/run/bitlbee
177
178 einfo
179 elog "The utils included in bitlbee are now located in /usr/share/bitlbee"
180 elog
181 elog "NOTE: The IRSSI script is no longer provided by BitlBee."
182 elog
183 elog "The bitlbeed init script has been replaced by bitlbee."
184 elog "You must update your configuration."
185 einfo
186 }

  ViewVC Help
Powered by ViewVC 1.1.20