%if 0%{?fedora} >= 15 || 0%{?rhel} >= 5 %bcond_without otr %else %bcond_with otr %endif %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 %bcond_without systemd %else %bcond_with systemd %endif Summary: IRC to other chat networks gateway Name: bitlbee Version: 3.2 Release: 7.20130713bzr997%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons URL: http://www.bitlbee.org/ # bzr export -r 997 --root=bitlbee-3.2 bitlbee-997.tar.bz2 http://code.bitlbee.org/bitlbee/ Source0: bitlbee-997.tar.bz2 #Source0: http://get.bitlbee.org/src/%{name}-%{version}.tar.gz Source1: bitlbee.xinetd Source2: bitlbee-wrapper.h # Always use 'install -p' instead of plain install to protect time stamps Patch0: bitlbee-3.2-install.patch # Support for old glibc (EL-5) which doesn't have ns_initparse and its friends Patch1: bitlbee-libresolv.patch # Patch configure to build with glib2 2.12.3 (EL-5) without twitter support Patch2: bitlbee-glib-version.patch # When the above patches will be consolidated upstream, this should merge # with Patch1 or Patch2 or something like that Patch3: bitlbee-forkdaemon.patch # Patch rejected upstream, however we need to keep this, because # of the SELinux policy is set up for this mode of operation. Patch4: bitlbee-systemd.patch # Fedora 20 introduces libotr4. This patch makes bitlbee to compile with # it. # Originally from # http://marc.info/?l=openbsd-ports&m=137656238506916&w=2 Patch5: bitlbee-3.2-libotr4.patch # Suggested fix for https://bugzilla.redhat.com/949303 # aka http://bugs.bitlbee.org/bitlbee/ticket/1008 # Open socket on IPv6 as well Patch6: bitlbee-IPv6.patch Requires(pre): shadow-utils Requires(preun): /sbin/service %if 0%{?rhel} == 5 BuildRequires: glib2-devel >= 2.4, libxslt %else BuildRequires: glib2-devel >= 2.14, libxslt %endif BuildRequires: nss-devel %if %{with systemd} BuildRequires: pkgconfig(systemd) Requires: systemd-units %else Requires: xinetd %endif %if %{with otr} BuildRequires: libotr-devel >= 3.2.0 # Only needed for bzr builds - adamw 2013/09 BuildRequires: xmlto %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used as an IRC server which forwards everything you say to people on other chat networks like ICQ/AIM, MSN, XMPP/Jabber (including Google Talk), Yahoo or Twitter! %package devel Summary: Development files for bitlbee Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig %description devel The bitlbee-devel package includes header files necessary for building and developing programs and plugins which use bitlbee. %if %{with otr} %package otr Summary: OTR plugin for bitlbee Group: System Environment/Daemons Requires: %{name}%{?_isa} = %{version}-%{release} %description otr The bitlbee-otr package includes OTR plugin for bitlbee. Not completely stable and not 100% foolproof so use at your own risk. %endif %prep echo With OTR %with_otr echo With systemd %with_systemd %setup -q %patch0 -p1 %if 0%{?rhel} == 5 %patch1 -p1 %patch2 -p1 %endif %if %{with systemd} %patch3 -p1 %patch4 -p1 %patch6 -p1 %endif %if 0%{?fedora} >= 20 %patch5 -p1 %endif # there's an annoying check which tries to only build the docs if # building a bzr checkout...just by testing for .bzr. So you can # either build from a 'clean' tarball (without all the .bzr stuff) # but hack out that check, or build from a 'dirty' tarball but # leave the check intact. Let's hack out the check. Obviously this # is not needed for stable builds. -adamw 2013/09 sed -i -e 's/test ! -d ..\/.bzr ||//' doc/Makefile %build # Note that we cannot use openssl in Fedora packages ... it breaks GPL CFLAGS="$RPM_OPT_FLAGS" ./configure \ --prefix=%{_prefix} \ --bindir=%{_sbindir} \ --etcdir=%{_sysconfdir}/%{name} \ --mandir=%{_mandir} \ --datadir=%{_datadir}/%{name} \ --config=%{_localstatedir}/lib/%{name} \ --pcdir=%{_libdir}/pkgconfig \ --plugindir=%{_libdir}/%{name} \ --strip=0 \ --plugins=1 \ --ssl=nss \ %if 0%{?rhel} == 5 --twitter=0 \ %endif %if %{with otr} --otr=plugin %endif make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install install-dev install-etc # Install some files manually to their correct destination mkdir -p $RPM_BUILD_ROOT{%{_localstatedir}/lib,%{_libdir}}/%{name} %if %{with systemd} install -p -d $RPM_BUILD_ROOT%{_unitdir} install -p -m 644 init/%{name}{.service,@.service,.socket} $RPM_BUILD_ROOT%{_unitdir} %else install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name} %endif install -D -p -m 644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf # Hack to allow parallel install of 32 bit and 64 bit -devel packages %if 0%{?fedora}%{?rhel} < 6 mv -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config{,-%{_arch}}.h install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h %endif # Convert everything to UTF-8 for cnvfile in doc/CHANGES doc/CREDITS; do iconv -f iso-8859-1 -t utf-8 -o ${cnvfile}.utf8 ${cnvfile} touch -c -r ${cnvfile} ${cnvfile}.utf8 mv -f ${cnvfile}.utf8 ${cnvfile} done %pre getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name} getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "BitlBee User" %{name} exit 0 %post %if %{with systemd} %if 0%{?fedora} >= 18 %systemd_post %{name}.service %else if [ $1 -eq 1 ]; then # Package install, not upgrade /bin/systemctl daemon-reload > /dev/null 2>&1 || : fi %endif %endif %preun %if %{with systemd} %if 0%{?fedora} >= 18 %systemd_preun %{name}.service %else # Work around RHBZ #655116 if [ $1 -eq 0 ]; then # Package removal, not upgrade /bin/systemctl disable %{name}.service > /dev/null 2>&1 || : /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : fi %endif %else if [ $1 -eq 0 ]; then /sbin/service xinetd condrestart > /dev/null 2>&1 fi %endif %postun %if %{with systemd} %if 0%{?fedora} >= 18 %systemd_postun_with_restart %{name}.service %else /bin/systemctl daemon-reload > /dev/null 2>&1 || : if [ $1 -ge 1 ]; then # Package upgrade, not uninstall /bin/systemctl try-restart%{name}.service > /dev/null 2>&1 || : fi %endif %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING doc/{AUTHORS,CHANGES,CREDITS,FAQ,README} %doc doc/user-guide/*.xml doc/user-guide/user-guide.txt %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/* %{_sbindir}/%{name} %dir %{_libdir}/%{name}/ %{_datadir}/%{name}/ %{_mandir}/man?/%{name}* %attr(0700,bitlbee,bitlbee) %dir %{_localstatedir}/lib/%{name} %if %{with systemd} %{_unitdir}/%{name}* %else %config(noreplace) %{_sysconfdir}/xinetd.d/%{name} %endif %files devel %defattr(-,root,root,-) %doc doc/example_plugin.c %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc %if %{with otr} %defattr(-,root,root,-) %files otr %{_libdir}/%{name}/otr.so %endif %changelog * Tue Sep 24 2013 Adam Williamson -3.2-7.20130713bzr997 - let's just go to latest upstream bzr, since there's no new release - drop nss-crash-rhbz922447.patch, merged upstream as rev 987 * Fri Aug 16 2013 Matěj Cepl - 3.2-6 - systemd socket should be opened over IPv6 as well (#949303) - return fix for NSS crash (#922447) * Fri Aug 16 2013 Matěj Cepl - 3.2-5 - Add a conditional patch for F>=20 to build with libotr4 * Sat Aug 03 2013 Fedora Release Engineering - 3.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Apr 02 2013 Matěj Cepl - 3.2-3 - Add upstream patch to avoid double-free crash (#922447) * Thu Mar 14 2013 Robert Scheck 3.2-2 - Add accidentially lost OTR support for RHEL 5 and 6 (#919912) * Wed Feb 20 2013 Robert Scheck 3.2-1 - Upgrade to 3.2 (#912675, thanks to Eike Hein and Rex Dieter) - Use the new systemd macros (#850048, thanks to Václav Pavlín) * Wed Feb 13 2013 Fedora Release Engineering - 3.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Jul 24 2012 Matej Cepl - 3.0.5-4 - The last version of SSL/NSS patch for the upstream #714 * Wed Jul 18 2012 Fedora Release Engineering - 3.0.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jun 21 2012 Matej Cepl - 3.0.5-2 - Add more error handling to lib/ssl_nss.c - Checking patches for compatibility with the current state of the word and updating comments. - Improve otr conditional * Sat Mar 31 2012 Adam Williamson - 3.0.5-1 - new upstream release 3.0.5 * Sat Jan 14 2012 Adam Williamson - 3.0.4-3 - add upstream fix for a high-priority twitter disconnect/crasher * Thu Jan 12 2012 Fedora Release Engineering - 3.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Dec 06 2011 Adam Williamson - 3.0.4-1 - new upstream release 3.0.4 - drop 823_822.diff (merged upstream obviously) * Fri Nov 11 2011 Adam Williamson - 3.0.3-6 - 823_822.diff: fix MSN login (upstream rev #823) * Thu Aug 04 2011 Matěj Cepl - 3.0.3-5 - Tiny typo in systemd units. * Sat Jul 30 2011 Matěj Cepl - 3.0.3-4 - Rebuilt against new libraries. * Thu Jul 28 2011 Matěj Cepl - 3.0.3-3 - Add Restart=always to systemd (following discussion on upstream #738). * Mon Jul 25 2011 Matěj Cepl - 3.0.3-2 - One more fix to the systemd unit files (#705096) * Wed Mar 09 2011 Matěj Cepl - 3.0.2-1 - New upstream release. We can eliminate parts which were already merged upstream (ssl_pending patch) * Mon Feb 07 2011 Fedora Release Engineering - 3.0.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Jan 09 2011 Matěj Cepl - 3.0.1-8 - Fix crash when no SRV record is provided (#668190); fix by Ricky Zhou * Wed Dec 29 2010 Matěj Cepl - 3.0.1-7 - Adding more missing systemd-support pieces and eliminate xinetd on F<15 * Tue Dec 28 2010 Matěj Cepl - 3.0.1-6 - commented all patches with status of their upstreaming - two tiny fixes for SSL implementation (#666022) * Mon Dec 27 2010 Matěj Cepl - 3.0.1-5 - Systemd support * Mon Dec 27 2010 Matěj Cepl - 3.0.1-4 - Add Ricky Zhou's fixed patch for libresolv (#663934) * Sun Dec 26 2010 Matěj Cepl - 3.0.1-3 - Add bitlbee-des3-implement patch with working ssl_des3_encrypt implementation by Ricky Zhou. * Sat Dec 25 2010 Matěj Cepl - 3.0.1-2 - Implement missing ssl_pending() (Fix by Ricky Zhou, #665553) * Sat Dec 04 2010 Matěj Cepl - 3.0.1-1 - New upstream release - Switched to NSS (3DES still via lib/des.c) - Added -otr subpackage with optional OTR plugin. * Sun Nov 21 2010 Matěj Cepl - 3.0-2 - Get rid of bad regexp magic, now with pure DESTDIR. * Fri Oct 22 2010 Matěj Cepl - 3.0-1 - New upstream release. * Sun Jul 04 2010 Robert Scheck 1.2.8-1 - Upgrade to 1.2.8 * Sat May 15 2010 Robert Scheck 1.2.7-1 - Upgrade to 1.2.7 * Sun Apr 25 2010 Robert Scheck 1.2.6a-3 - Updated the description to reflect twitter support - Really fixed the optional libresolv patch this time * Tue Apr 20 2010 Robert Scheck 1.2.6a-2 - Remerged the optional libresolv patch for 1.2.6a * Tue Apr 20 2010 Robert Scheck 1.2.6a-1 - Upgrade to 1.2.6a (#584071) * Thu Mar 18 2010 Robert Scheck 1.2.5-1 - Upgrade to 1.2.5 * Sat Oct 17 2009 Robert Scheck 1.2.4-1 - Upgrade to 1.2.4 * Mon Aug 17 2009 Robert Scheck 1.2.3-4 - Updated libresolv patch to not segfault when connecting to the Jabber/XMPP server if there's no SRV record (#506719, #501786) - Added -devel subpackage with header files for plugins (#504882) * Fri Jul 24 2009 Fedora Release Engineering - 1.2.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Robert Scheck 1.2.3-2 - Rebuilt against gcc 4.4 and rpm 4.6 * Sun Sep 07 2008 Robert Scheck 1.2.3-1 - Upgrade to 1.2.3 (#461424) * Wed Aug 27 2008 Robert Scheck 1.2.2-1 - Upgrade to 1.2.2 (#460355) * Mon Jul 07 2008 Robert Scheck 1.2.1-1 - Upgrade to 1.2.1 (thanks to Matěj Cepl) * Tue Apr 15 2008 Robert Scheck 1.2-1 - Upgrade to 1.2 (#439047, thanks to Matěj Cepl) * Sun Feb 10 2008 Robert Scheck 1.0.4-2 - Rebuilt against gcc 4.3 * Wed Aug 29 2007 Robert Scheck 1.0.4-1 - Upgrade to 1.0.4 - Updated the license tag according to the guidelines * Mon May 07 2007 Robert Scheck 1.0.3-6 - Rebuilt * Sat Oct 21 2006 Robert Scheck 1.0.3-5 - Create a bitlbee user and condrestart xinetd instead of reload * Fri Aug 04 2006 Robert Scheck 1.0.3-4 - Switched to gnutls per default for SSL support (#196591 #c12) * Mon Jun 26 2006 Robert Scheck 1.0.3-3 - Added patch for using CFLAGS env (#196591 #c4, upstream #171) * Sun Jun 25 2006 Robert Scheck 1.0.3-2 - Changes to match with Fedora Packaging Guidelines (#196591) * Sun Jun 25 2006 Robert Scheck 1.0.3-1 - Upgrade to 1.0.3 * Sun Apr 02 2006 Robert Scheck 1.0.2-1 - Upgrade to 1.0.2 * Sun Jan 15 2006 Robert Scheck 1.0.1-1 - Upgrade to 1.0.1 * Wed Dec 28 2005 Robert Scheck 1.0-2 - Rebuilt against gcc 4.1 * Mon Dec 05 2005 Robert Scheck 1.0-1 - Upgrade to 1.0 * Sat Nov 12 2005 Robert Scheck 0.92-4 - Rebuilt against openssl 0.9.8a * Sun Aug 28 2005 Robert Scheck 0.92-3 - Added patch, that allows specifying the Jabber server manually - Don't start bitlbee per default as xinetd service * Sun Jul 03 2005 Robert Scheck 0.92-2 - Added patch giving ICQ/AIM support for typing notifications * Fri Jul 01 2005 Robert Scheck 0.92-1 - Upgrade to 0.92 - Initial spec file for Fedora Core