/[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.10 - (show annotations) (download)
Thu Jun 5 10:04:32 2014 UTC (3 months, 2 weeks ago) by mrueg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +2 -2 lines
Restrict dependency to <net-libs/libotr-4

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key )

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.9 2014/05/26 09:10:12 swift 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 selinux? ( sec-policy/selinux-bitlbee )"
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 skype? (
39 dev-python/skype4py
40 net-im/skype
41 )
42 xinetd? ( sys-apps/xinetd )"
43
44 REQUIRED_USE="^^ ( purple || ( jabber msn oscar yahoo ) )
45 msn? ( || ( gnutls nss ssl ) )
46 jabber? ( !nss )"
47
48 pkg_setup() {
49 if use jabber && ! use gnutls && ! use ssl ; then
50 einfo
51 elog "You have enabled support for Jabber but do not have SSL"
52 elog "support enabled. This *will* prevent bitlbee from being"
53 elog "able to connect to SSL enabled Jabber servers. If you need to"
54 elog "connect to Jabber over SSL, enable ONE of the following use"
55 elog "flags: gnutls or ssl"
56 einfo
57 fi
58
59 enewgroup bitlbee
60 enewuser bitlbee -1 -1 /var/lib/bitlbee bitlbee
61
62 if use skype ; then
63 python_set_active_version 2
64 python_pkg_setup
65 fi
66 }
67
68 src_prepare() {
69 sed -i \
70 -e "s@/usr/local/sbin/bitlbee@/usr/sbin/bitlbee@" \
71 -e "s/nobody/bitlbee/" \
72 -e "s/}/ disable = yes\n}/" \
73 doc/bitlbee.xinetd || die "sed failed in xinetd"
74
75 sed -i \
76 -e "s@mozilla-nss@nss@g" \
77 configure || die "sed failed in configure"
78
79 use skype && python_convert_shebangs 2 protocols/skype/skyped.py
80
81 epatch "${FILESDIR}"/${PN}-3.0-configure.patch
82 epatch "${FILESDIR}"/${P}-parallel-make.patch
83 }
84
85 src_configure() {
86 # ldap hard-disabled for now
87 local myconf="--ldap=0"
88
89 # setup plugins, protocol, ipv6 and debug
90 for flag in debug ipv6 msn jabber oscar plugins purple skype twitter yahoo ; do
91 if use ${flag} ; then
92 myconf="${myconf} --${flag}=1"
93 else
94 myconf="${myconf} --${flag}=0"
95 fi
96 done
97
98 # set otr
99 if use otr && use plugins ; then
100 myconf="${myconf} --otr=plugin"
101 else
102 if use otr ; then
103 ewarn "OTR support has been disabled automatically because it"
104 ewarn "requires the plugins USE flag."
105 fi
106 myconf="${myconf} --otr=0"
107 fi
108
109 # setup ssl use flags
110 if use gnutls ; then
111 myconf="${myconf} --ssl=gnutls"
112 einfo "Using gnutls for SSL support"
113 elif use ssl ; then
114 myconf="${myconf} --ssl=openssl"
115 einfo "Using openssl for SSL support"
116 elif use nss ; then
117 myconf="${myconf} --ssl=nss"
118 einfo "Using nss for SSL support"
119 else
120 myconf="${myconf} --ssl=bogus"
121 einfo "You will not have any encryption support enabled."
122 fi
123
124 # set event handler
125 if use libevent ; then
126 myconf="${myconf} --events=libevent"
127 else
128 myconf="${myconf} --events=glib"
129 fi
130
131 # NOTE: bitlbee's configure script is not an autotool creation,
132 # so that is why we don't use econf.
133 ./configure --prefix=/usr --datadir=/usr/share/bitlbee \
134 --etcdir=/etc/bitlbee --plugindir=/usr/$(get_libdir)/bitlbee \
135 --strip=0 ${myconf} || die "econf failed"
136
137 sed -i \
138 -e "/^EFLAGS/s:=:&${LDFLAGS} :" \
139 Makefile.settings || die "sed failed"
140 }
141
142 src_install() {
143 emake install install-etc install-doc install-dev DESTDIR="${D}"
144
145 keepdir /var/lib/bitlbee
146 fperms 700 /var/lib/bitlbee
147 fowners bitlbee:bitlbee /var/lib/bitlbee
148
149 dodoc doc/{AUTHORS,CHANGES,CREDITS,FAQ,README}
150 dodoc doc/user-guide/user-guide.txt
151 dohtml doc/user-guide/*.html
152
153 if use skype ; then
154 newdoc protocols/skype/NEWS NEWS-skype
155 newdoc protocols/skype/README README-skype
156 fi
157
158 doman doc/bitlbee.8 doc/bitlbee.conf.5
159
160 if use xinetd ; then
161 insinto /etc/xinetd.d
162 newins doc/bitlbee.xinetd bitlbee
163 fi
164
165 newinitd "${FILESDIR}"/bitlbee.initd bitlbee
166 newconfd "${FILESDIR}"/bitlbee.confd bitlbee
167
168 exeinto /usr/share/bitlbee
169 cd utils
170 doexe convert_purple.py bitlbee-ctl.pl
171 }
172
173 pkg_postinst() {
174 chown -R bitlbee:bitlbee "${ROOT}"/var/lib/bitlbee
175 chown -R bitlbee:bitlbee "${ROOT}"/var/run/bitlbee
176
177 einfo
178 elog "The utils included in bitlbee are now located in /usr/share/bitlbee"
179 elog
180 elog "NOTE: The IRSSI script is no longer provided by BitlBee."
181 elog
182 elog "The bitlbeed init script has been replaced by bitlbee."
183 elog "You must update your configuration."
184 einfo
185 }

  ViewVC Help
Powered by ViewVC 1.1.20