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

Contents of /net-im/bitlbee/bitlbee-3.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Jun 14 20:48:02 2012 UTC (2 years, 2 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Remove old.

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

  ViewVC Help
Powered by ViewVC 1.1.20