350336b
Summary:           IRC to other chat networks gateway
350336b
Name:              bitlbee
78837c9
Version:           1.0.4
03da84f
Release:           2%{?dist}
78837c9
License:           GPLv2+ and MIT
350336b
Group:             System Environment/Daemons
350336b
URL:               http://www.bitlbee.org/
78837c9
Source0:           http://home.parabolic.nl/~maurits/src/%{name}-%{version}-fedora.tar.gz
78837c9
# Bitlbee 1.0.5 or 1.1 will get the correct source again, 1.0.4 was
78837c9
# repackaged to match with the Fedora Packaging License Guideline.
78837c9
#Source0:           http://get.bitlbee.org/src/%{name}-%{version}.tar.gz
350336b
Source1:           bitlbee.xinetd
350336b
Requires:          xinetd
78837c9
Requires(pre):     shadow-utils
350336b
Requires(preun):   /sbin/service
350336b
BuildRequires:     glib2-devel, libxslt
350336b
%if 0%{?rhl}%{?fedora}%{?rhel}
350336b
BuildRequires:     gnutls-devel
350336b
%else
350336b
BuildRequires:     openssl-devel
350336b
%endif
1a01b88
BuildRoot:         %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
350336b
350336b
%description
350336b
Bitlbee is an IRC to other chat networks gateway. Bitlbee can be used as
350336b
an IRC server which forwards everything you say to people on other chat
78837c9
networks like ICQ, MSN, Jabber or Yahoo!
350336b
350336b
%prep
350336b
%setup -q
350336b
350336b
perl -pi.make -e '
350336b
                s|\$\(BINDIR\)|\$(sbindir)|g;
350336b
                s|\$\(DATADIR\)|\$(datadir)/%{name}|g;
350336b
                s|\$\(ETCDIR\)|\$(sysconfdir)/%{name}|g;
350336b
                s|\$\(MANDIR\)|\$(mandir)|g;
350336b
        ' Makefile */Makefile */*/Makefile
350336b
350336b
%build
350336b
CFLAGS="$RPM_OPT_FLAGS" ./configure \
350336b
        --prefix=%{_prefix} \
350336b
        --bindir=%{_sbindir} \
350336b
        --etcdir=%{_sysconfdir}/%{name} \
350336b
        --mandir=%{_mandir} \
350336b
        --datadir=%{_datadir}/%{name} \
350336b
        --config=%{_localstatedir}/lib/%{name} \
350336b
        --strip=0 \
350336b
%if 0%{?rhl}%{?fedora}%{?rhel}
350336b
        --ssl=gnutls
350336b
%else
350336b
        --ssl=openssl
350336b
%endif
350336b
350336b
make %{?_smp_mflags}
350336b
350336b
%install
350336b
rm -rf $RPM_BUILD_ROOT
350336b
%makeinstall
350336b
350336b
mkdir -p $RPM_BUILD_ROOT{%{_localstatedir}/lib/%{name},%{_mandir}/man8}
350336b
350336b
install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
350336b
install -D -m 644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
350336b
install -m 644 doc/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
350336b
350336b
%pre
78837c9
getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{name}
78837c9
getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "BitlBee User" %{name}
78837c9
exit 0
350336b
350336b
%preun
350336b
if [ $1 -eq 0 ]; then
350336b
  /sbin/service xinetd condrestart > /dev/null 2>&1 || :
350336b
fi
350336b
350336b
%clean
350336b
rm -rf $RPM_BUILD_ROOT
350336b
350336b
%files
350336b
%defattr(-,root,root)
350336b
%doc COPYING doc/{AUTHORS,CHANGES,CREDITS,FAQ,README}
350336b
%doc doc/user-guide/*.xml doc/user-guide/user-guide.txt
350336b
%dir %{_sysconfdir}/%{name}
350336b
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
350336b
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
350336b
%{_sbindir}/%{name}
350336b
%{_datadir}/%{name}/
350336b
%{_mandir}/man?/%{name}*
350336b
%attr(0700,bitlbee,bitlbee) %dir %{_localstatedir}/lib/%{name}
350336b
350336b
%changelog
03da84f
* Sun Feb 10 2008 Robert Scheck <robert@fedoraproject.org> 1.0.4-2
03da84f
- Rebuilt against gcc 4.3
03da84f
78837c9
* Wed Aug 29 2007 Robert Scheck <robert@fedoraproject.org> 1.0.4-1
78837c9
- Upgrade to 1.0.4
78837c9
- Updated the license tag according to the guidelines
78837c9
1a01b88
* Mon May 07 2007 Robert Scheck <robert@fedoraproject.org> 1.0.3-6
1a01b88
- Rebuilt
1a01b88
350336b
* Sat Oct 21 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-5
350336b
- Create a bitlbee user and condrestart xinetd instead of reload
350336b
350336b
* Fri Aug 04 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-4
350336b
- Switched to gnutls per default for SSL support (#196591 #c12)
350336b
350336b
* Mon Jun 26 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-3
350336b
- Added patch for using CFLAGS env (#196591 #c4, upstream #171)
350336b
350336b
* Sun Jun 25 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-2
350336b
- Changes to match with Fedora Packaging Guidelines (#196591)
350336b
350336b
* Sun Jun 25 2006 Robert Scheck <robert@fedoraproject.org> 1.0.3-1
350336b
- Upgrade to 1.0.3
350336b
350336b
* Sun Apr 02 2006 Robert Scheck <robert@fedoraproject.org> 1.0.2-1
350336b
- Upgrade to 1.0.2
350336b
350336b
* Sun Jan 15 2006 Robert Scheck <robert@fedoraproject.org> 1.0.1-1
350336b
- Upgrade to 1.0.1
350336b
350336b
* Wed Dec 28 2005 Robert Scheck <robert@fedoraproject.org> 1.0-2
350336b
- Rebuilt against gcc 4.1
350336b
350336b
* Mon Dec 05 2005 Robert Scheck <robert@fedoraproject.org> 1.0-1
350336b
- Upgrade to 1.0
350336b
350336b
* Sat Nov 12 2005 Robert Scheck <robert@fedoraproject.org> 0.92-4
350336b
- Rebuilt against openssl 0.9.8a
350336b
350336b
* Sun Aug 28 2005 Robert Scheck <robert@fedoraproject.org> 0.92-3
350336b
- Added patch, that allows specifying the Jabber server manually
350336b
- Don't start bitlbee per default as xinetd service
350336b
350336b
* Sun Jul 03 2005 Robert Scheck <robert@fedoraproject.org> 0.92-2
350336b
- Added patch giving ICQ/AIM support for typing notifications
350336b
350336b
* Fri Jul 01 2005 Robert Scheck <robert@fedoraproject.org> 0.92-1
350336b
- Upgrade to 0.92
350336b
- Initial spec file for Fedora Core