/[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.7 - (show annotations) (download)
Fri Jul 20 01:33:34 2012 UTC (2 years, 1 month ago) by blueness
Branch: MAIN
Changes since 1.6: +2 -2 lines
Keyword ~ppc64

(Portage version: 2.1.10.65/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20