bitlbee/bitlbee.spec

138 lines
4.1 KiB
RPMSpec

# vim: set ts=4 sw=4 et:
%if 0%{?suse_version} >= 1100
%define with_otr 1
%endif
Name: bitlbee
Version: 3.0.1
Release: 0
Summary: IRC to other Chat Networks Gateway
# http://get.bitlbee.org/src/bitlbee-%{version}.tar.gz
Source: bitlbee-%{version}.tar.bz2
Source1: %{name}.xinetd-suse.in
URL: http://www.bitlbee.org/
Group: Productivity/Networking/IRC
License: GNU General Public License version 2 (GPL v2)
BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: xinetd
BuildRequires: make gcc glibc-devel pkgconfig gnutls-devel libgcrypt-devel
BuildRequires: zlib-devel glib2-devel lzo-devel glib2-devel
%if 0%{?suse_version} >= 1010
BuildRequires: xmlto
%endif
%if 0%{?suse_version} >= 1030
BuildRequires: fdupes
%endif
%if 0%{?with_libotr:1}
BuildRequires: libotr-devel
%endif
PreReq: /usr/sbin/groupadd /usr/sbin/useradd
%description
We are both console lovers. But it is annoying to have a few tty's open with
chat things in them. IRC, ICQ, MSN, Jabber... For X there is Gaim, which
supports many chatprotocols. Why wasn't there such a thing for the console?
The idea to port Gaim was easily thought of, of course. But we liked our IRC
clients. And we used it the most, so we used it best. Importing it into the
IRC client was a nice idea. But what if someone liked a different client. Then
(s)he had to duplicate our work.
That's a shame, we thought. Doing work twice is pointless. So when Wilmer got
the ingenious thought in his mind while farming, to create an IRC to other
chatnetworks gateway, we were both so excited, that we started working on it
almost immediately. And the result is BitlBee.
This package comes with support for MSN, Jabber, Oscar and Yahoo, as well as
enabled flood protection.
%prep
%setup -q
# make it verbose!
find . -name Makefile -exec %__sed -i.orig 's|@$(CC)|$(CC)|;s|@$(LD)|$(LD)|' {} \;
%build
# fix to find the glib-2.0 pkgconfig on SLES_9
%if 0%{?suse_version} < 1030
export PKG_CONFIG_PATH="/opt/gnome/%{_lib}/pkgconfig"
%endif
# not autoconf
CFLAGS="%{optflags} -fno-strict-aliasing" \
CXXFLAGS="%{optflags} -fno-strict-aliasing" \
./configure \
--prefix="%{_prefix}" \
--bindir="%{_sbindir}" \
--etcdir="%{_sysconfdir}/%{name}" \
--mandir="%{_mandir}" \
--datadir="%{_datadir}/%{name}" \
--plugindir="%{_libdir}/%{name}" \
--pidfile="%{_localstatedir}/run/%{name}.pid" \
--config="%{_localstatedir}/lib/%{name}" \
--ipcsocket="%{_localstatedir}/run/%{name}.sock" \
--purple=0 \
%if 0%{?with_libotr:1}
--otr=1 \
%else
--otr=0 \
%endif
--msn=1 \
--jabber=1 \
--twitter=1 \
--oscar=1 \
--yahoo=1 \
--debug=0 \
--strip=0 \
--gcov=0 \
--flood=0 \
--plugins=1 \
--ssl=gnutls
%__make %{?jobs:-j%{jobs}}
%install
%__install -d "%{buildroot}%{_mandir}/man1"
%__install -d "%{buildroot}%{_mandir}/man8"
%__install -d "%{buildroot}%{_sysconfdir}/bitlbee"
%__install -d "%{buildroot}%{_localstatedir}/lib/bitlbee"
%if 0%{?suse_version} >= 1010
%__make DESTDIR="%{buildroot}" -C doc
%endif
%makeinstall install-etc
%__install -d "%{buildroot}%{_sysconfdir}/xinetd.d"
%__sed -e "s+@@BITLBEE@@+%{_sbindir}/bitlbee+g" \
< "%{SOURCE1}" > "%{buildroot}%{_sysconfdir}/xinetd.d/bitlbee"
%if 0%{?suse_version} >= 1030
%fdupes -s
%endif
%pre
/usr/bin/getent group bitlbee &>/dev/null || /usr/sbin/groupadd -r bitlbee &>/dev/null || :
/usr/bin/getent passwd bitlbee &>/dev/null || \
/usr/sbin/useradd -o -g bitlbee -s /bin/false -r -c "User for bitlbee" \
-d "%{_localstatedir}/run/bitlbee" bitlbee &>/dev/null || :
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc COPYING doc/AUTHORS doc/CHANGES doc/CREDITS doc/FAQ doc/README
%if 0%{?suse_version} >= 1010
%doc doc/user-guide/*.html doc/user-guide/*.txt
%endif
%config(noreplace) %{_sysconfdir}/xinetd.d/bitlbee
%attr(0750,root,bitlbee) %dir %{_sysconfdir}/bitlbee
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/bitlbee.conf
%config(noreplace) %attr(0640,root,bitlbee) %{_sysconfdir}/bitlbee/motd.txt
%{_sbindir}/bitlbee
%{_datadir}/bitlbee
%doc %{_mandir}/man5/bitlbee.conf.5%{ext_man}
%doc %{_mandir}/man8/bitlbee.8%{ext_man}
%attr(0750,bitlbee,bitlbee) %dir %{_localstatedir}/lib/bitlbee