Blob Blame History Raw
Summary:           IRC to other chat networks gateway
Name:              bitlbee
Version:           3.0.1
Release:           6%{?dist}
License:           GPLv2+ and MIT
Group:             System Environment/Daemons
URL:               http://www.bitlbee.org/
Source0:           http://get.bitlbee.org/src/%{name}-%{version}.tar.gz
Source1:           bitlbee.xinetd
Source2:           bitlbee-wrapper.h
# 64bit directories should go before 32bit ones.
Patch0:            bitlbee-syslibdirs.patch
# use install -p instead of plain install ... we should protect time stamps
Patch1:            bitlbee-installP.patch
# support for old glibc (EL-4, EL-5) which doesn't have ns_initparse and its friends
Patch2:            bitlbee-libresolv.patch
# Fix for missing ssl_pending() function (upstream #368, RHBZ #665553)
Patch3:            bitlbee-ssl_pending.patch
# Completion of NSS-based SSL implementation. Sent upstream. #714
# (combined with two tiny fixes from RHBZ #666022)
Patch4:            bitlbee-des3-implement.patch
# Yet unaccepted upstream patch from #738, RHBZ #662289
Patch5:            bitlbee-systemd.patch
# When the above patches will  be consolidated upstream, this should merge
# with Patch1 or Patch2 or something like that
Patch6:            bitlbee-forkdaemon.patch
Requires:          xinetd
Requires(pre):     shadow-utils
Requires(preun):   /sbin/service
BuildRequires:     glib2-devel >= 2.4, libxslt
BuildRequires:     nss-devel
%if 0%{?fedora} >= 15
BuildRequires:     pkgconfig(systemd)
%endif
%if 0%{?fedora}%{?rhel} >= 6
BuildRequires:     libotr-devel >= 3.2.0
%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} = %{version}-%{release}, pkgconfig

%description devel
The bitlbee-devel package includes header files necessary for building and
developing programs and plugins which use bitlbee.

%if 0%{?fedora}%{?rhel} >= 6
%package otr
Summary:           OTR plugin for bitlbee
Group:             System Environment/Daemons
Requires:          %{name} = %{version}-%{release}, pkgconfig

%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
%setup -q
%patch0 -p1 -b .syslibdir
%patch1 -p1 -b .installP
%if 0%{?fedora}%{?rhel} < 6
%patch2 -p1 -b .libresolv
%endif
%patch3 -p0 -b .sslPending
%patch4 -p1 -b .des3
%if 0%{?fedora} >= 15
%patch5 -p1 -b .systemd
%patch6 -p1 -b .forkdaemon
%endif

%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%{?fedora}%{?rhel} >= 6
        --otr=plugin
%endif

make DESTDIR=$RPM_BUILD_ROOT %{?_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}
install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
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
iconv -f iso-8859-1 -t utf-8 -o doc/CHANGES.utf8 doc/CHANGES
touch -c -r doc/CHANGES doc/CHANGES.utf8
mv -f doc/CHANGES.utf8 doc/CHANGES

iconv -f iso-8859-1 -t utf-8 -o doc/CREDITS.utf8 doc/CREDITS
touch -c -r doc/CREDITS doc/CREDITS.utf8
mv -f doc/CREDITS.utf8 doc/CREDITS

%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

%preun
if [ $1 -eq 0 ]; then
/sbin/service xinetd condrestart > /dev/null 2>&1 || :
fi

%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}/*
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
%{_sbindir}/%{name}
%dir %{_libdir}/%{name}/
%{_datadir}/%{name}/
%{_mandir}/man?/%{name}*
%attr(0700,bitlbee,bitlbee) %dir %{_localstatedir}/lib/%{name}
%if 0%{?fedora} >= 15
/lib/systemd/system/%{name}*
%endif

%files devel
%defattr(-,root,root,-)
%doc doc/example_plugin.c
%{_includedir}/%{name}/
%{_libdir}/pkgconfig/%{name}.pc

%if 0%{?fedora}%{?rhel} >= 6
%files otr
%{_libdir}/%{name}/otr.so
%endif

%changelog
* Tue Dec 28 2010 Matěj Cepl <mcepl@redhat.com> - 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 <mcepl@redhat.com> - 3.0.1-5
- Systemd support

* Mon Dec 27 2010 Matěj Cepl <mcepl@redhat.com> - 3.0.1-4
- Add Ricky Zhou's fixed patch for libresolv (#663934)

* Sun Dec 26 2010 Matěj Cepl <mcepl@redhat.com> - 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 <mcepl@redhat.com> - 3.0.1-2
- Implement missing ssl_pending() (Fix by Ricky Zhou, #665553)

* Sat Dec 04 2010 Matěj Cepl <mcepl@redhat.com> - 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 <mcepl@redhat.com> - 3.0-2
- Get rid of bad regexp magic, now with pure DESTDIR.

* Fri Oct 22 2010 Matěj Cepl <mcepl@redhat.com> - 3.0-1
- New upstream release.

* Sun Jul 04 2010 Robert Scheck <robert@fedoraproject.org> 1.2.8-1
- Upgrade to 1.2.8

* Sat May 15 2010 Robert Scheck <robert@fedoraproject.org> 1.2.7-1
- Upgrade to 1.2.7

* Sun Apr 25 2010 Robert Scheck <robert@fedoraproject.org> 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 <robert@fedoraproject.org> 1.2.6a-2
- Remerged the optional libresolv patch for 1.2.6a

* Tue Apr 20 2010 Robert Scheck <robert@fedoraproject.org> 1.2.6a-1
- Upgrade to 1.2.6a (#584071)

* Thu Mar 18 2010 Robert Scheck <robert@fedoraproject.org> 1.2.5-1
- Upgrade to 1.2.5

* Sat Oct 17 2009 Robert Scheck <robert@fedoraproject.org> 1.2.4-1
- Upgrade to 1.2.4

* Mon Aug 17 2009 Robert Scheck <robert@fedoraproject.org> 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 <rel-eng@lists.fedoraproject.org> - 1.2.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 1.2.3-2
- Rebuilt against gcc 4.4 and rpm 4.6

* Sun Sep 07 2008 Robert Scheck <robert@fedoraproject.org> 1.2.3-1
- Upgrade to 1.2.3 (#461424)

* Wed Aug 27 2008 Robert Scheck <robert@fedoraproject.org> 1.2.2-1
- Upgrade to 1.2.2 (#460355)

* Mon Jul 07 2008 Robert Scheck <robert@fedoraproject.org> 1.2.1-1
- Upgrade to 1.2.1 (thanks to Matěj Cepl)

* Tue Apr 15 2008 Robert Scheck <robert@fedoraproject.org> 1.2-1
- Upgrade to 1.2 (#439047, thanks to Matěj Cepl)

* Sun Feb 10 2008 Robert Scheck <robert@fedoraproject.org> 1.0.4-2
- Rebuilt against gcc 4.3

* Wed Aug 29 2007 Robert Scheck <robert@fedoraproject.org> 1.0.4-1
- Upgrade to 1.0.4
- Updated the license tag according to the guidelines

* Mon May 07 2007 Robert Scheck <robert@fedoraproject.org> 1.0.3-6
- Rebuilt

* Sat Oct 21 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-5
- Create a bitlbee user and condrestart xinetd instead of reload

* Fri Aug 04 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-4
- Switched to gnutls per default for SSL support (#196591 #c12)

* Mon Jun 26 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-3
- Added patch for using CFLAGS env (#196591 #c4, upstream #171)

* Sun Jun 25 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-2
- Changes to match with Fedora Packaging Guidelines (#196591)

* Sun Jun 25 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-1
- Upgrade to 1.0.3

* Sun Apr 02 2006 Robert Scheck <robert@fedoraproject.org> 1.0.2-1
- Upgrade to 1.0.2

* Sun Jan 15 2006 Robert Scheck <robert@fedoraproject.org> 1.0.1-1
- Upgrade to 1.0.1

* Wed Dec 28 2005 Robert Scheck <robert@fedoraproject.org> 1.0-2
- Rebuilt against gcc 4.1

* Mon Dec 05 2005 Robert Scheck <robert@fedoraproject.org> 1.0-1
- Upgrade to 1.0

* Sat Nov 12 2005 Robert Scheck <robert@fedoraproject.org> 0.92-4
- Rebuilt against openssl 0.9.8a

* Sun Aug 28 2005 Robert Scheck <robert@fedoraproject.org> 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 <robert@fedoraproject.org> 0.92-2
- Added patch giving ICQ/AIM support for typing notifications

* Fri Jul 01 2005 Robert Scheck <robert@fedoraproject.org> 0.92-1
- Upgrade to 0.92
- Initial spec file for Fedora Core