Blob Blame History Raw
Name:    bip
Version: 0.8.4
Release: 2%{?dist}
Summary: IRC Bouncer
Group:   Applications/Internet
License: GPLv2+
URL: http://bip.t1r.net

Source0: http://bip.t1r.net/downloads/bip-%{version}.tar.gz
Source1: bip.init
Patch0: bip-conf.patch
Patch1: bip-fn-ircd7.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: autoconf
BuildRequires: byacc
BuildRequires: flex
BuildRequires: m4
BuildRequires: openssl-devel

%description
Bip is an IRC proxy, which means it keeps connected to your preferred IRC
servers, can store the logs for you, and even send them back to your IRC
client(s) upon connection.
You may want to use bip to keep your logfiles (in a unique format and on a
unique computer) whatever your client is, when you connect from multiple
workstations, or when you simply want to have a playback of what was said
while you were away.

%prep
%setup -q
%patch0 -p0
%patch1 -p1
iconv -f iso-8859-1 -t utf-8 -o ChangeLog{.utf8,}
mv ChangeLog{.utf8,}


%build
%configure --enable-openssl
make CFLAGS="$RPM_OPT_FLAGS"


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Remove misplaced files
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/bip
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
# Install bip.conf
install -m 644 samples/bip.conf $RPM_BUILD_ROOT%{_sysconfdir}/bip.conf
# Install initscript
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/bip
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/bip
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/bip

%clean
rm -rf $RPM_BUILD_ROOT


%pre
/usr/sbin/useradd -c "Bip IRC Proxy" \
  -s /bin/sh -r -d / bip 2> /dev/null || :

%post
/sbin/chkconfig --add bip

%preun
if [ "$1" = 0 ]; then
  /sbin/service bip stop >/dev/null 2>&1 || :
  /sbin/chkconfig --del bip
fi

%postun
if [ "$1" -ge 1 ]; then
  /sbin/service bip condrestart >/dev/null 2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README TODO
%doc samples/bip.vim
%{_bindir}/bip
%{_bindir}/bipmkpw
%{_mandir}/man1/bip.1.gz
%{_mandir}/man5/bip.conf.5.gz
%config(noreplace) %{_sysconfdir}/bip.conf
%{_initrddir}/bip
%attr(-,bip,bip) %dir %{_localstatedir}/run/bip
%attr(-,bip,bip) %dir %{_localstatedir}/log/bip

%changelog
* Mon Feb 1 2010 Lorenzo Villani <lvillani@binaryhelix.net> - 0.8.4-2
- Import patch reported by Kevin Fenzi (bz #560476)
- + Add a join delay to work around ircd7 flood protection
- + Add support for the "quiet" list

* Fri Jan  8 2010 Lorenzo Villani <lvillani@binaryhelix.net> - 0.8.4-1
- 0.8.4

* Thu Sep 03 2009 Lorenzo Villani <lvillani@binaryhelix.net> - 0.8.2-1
- 0.8.2

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.8.0-3
- rebuilt with new openssl

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Mar 05 2009 Lorenzo Villani <lvillani@binaryhelix.net> - 0.8.0-1
- 0.8.0

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 0.7.5-3
- rebuild with new openssl

* Sat Nov 29 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.5-2
- rebuilt

* Sat Nov 29 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.5-1
- 0.7.5
- Added support for running bip as system daemon
  (patches from Tom Hughes, thanks! - BugID: 471791)

* Tue Jun 08 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.4-1
- New version

* Tue May 06 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-6
- Removed _smp_mflags to avoid compilation errors with parallel jobs

* Wed Apr 30 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-5
- Corrected License field
- Removed openssl from Requires

* Wed Apr 30 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-4
- Convert ChangeLog to utf-8 in prep
- Ensure that package is compiled using RPM_OPT_FLAGS
- Make usage of RPM_BUILD_ROOT consistent
- Removed macros from ChangeLog (bad mistake)

* Mon Apr 14 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-3
- Removed INSTALL from doc

* Sun Apr 13 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-2
- Added AUTHORS, ChangeLog, COPYING, INSTALL, README, TODO to docdir
- added --enable-ssl to configure, just to make sure that bip is built
  with SSL support using OpenSSL

* Sat Apr 12 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.2-1
- Version bump

* Sun Mar 16 2008 Lorenzo Villani <lvillani@binaryhelix.net> - 0.7.0-1
- Initial release