# based on Fedora package: thanks %define prerel 0 %define rel 1 %define subrel 2 %if %{prerel} %define release %mkrel 0.%{prerel}.%{rel} %define distname %{name}-%{version}-%{prerel}.tar.gz %define dirname %{name}-%{version}-%{prerel} %else %define release %mkrel %{rel} %define distname %{name}-%{version}.tar.gz %define dirname %{name}-%{version} %endif Name: bip Version: 0.8.8 Release: %{release} Summary: IRC Bouncer (proxy) Group: Networking/IRC License: GPLv2+ URL: http://bip.milkypond.org/ Source0: https://projects.duckcorp.org/attachments/download/39/%{distname} Source1: bip.init Source2: bip.logrotate Patch0: bip-conf.patch # comes from upstream and debian # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657217 Patch1: bip-CVE-2012-0806.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: openssl-devel BuildRequires: flex BuildRequires: byacc %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 -n %{dirname} %patch0 -p0 %patch1 -p1 iconv -f iso-8859-1 -t utf-8 -o ChangeLog{.utf8,} mv ChangeLog{.utf8,} %build export CFLAGS="%{optflags} -DPIC -fPIC" %configure2_5x %make CFLAGS="%{optflags} -DPIC -fPIC" %install rm -rf %{buildroot} %makeinstall_std # Remove misplaced files rm -rf %{buildroot}%{_defaultdocdir}/bip mkdir -p %{buildroot}%{_sysconfdir} # Install bip.conf install -m 644 samples/bip.conf %{buildroot}%{_sysconfdir}/bip.conf # Install initscript mkdir -p %{buildroot}%{_initrddir} install -m755 %{SOURCE1} %{buildroot}%{_initrddir}/bip # Install logrotate mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/ install -m755 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/bip mkdir -p %{buildroot}%{_localstatedir}/run/bip mkdir -p %{buildroot}%{_localstatedir}/log/bip %clean rm -rf %{buildroot} %pre %_pre_useradd %name / /bin/sh %post %_post_service %{name} %preun %_preun_service %{name} %postun %_postun_userdel %name %files %defattr(0755,root,root,-) %doc AUTHORS ChangeLog README TODO %doc samples/bip.vim %{_bindir}/bip %{_bindir}/bipmkpw %{_mandir}/man1/bip.1* %{_mandir}/man5/bip.conf.5* %config(noreplace) %{_sysconfdir}/bip.conf %{_sysconfdir}/logrotate.d/bip %{_initrddir}/bip %attr(-,bip,bip) %dir %{_localstatedir}/run/bip %attr(-,bip,bip) %dir %{_localstatedir}/log/bip %changelog * Mon Feb 13 2012 misc <misc> 0.8.8-1.2.mga1 + Revision: 208395 - fix %%postun script, as seen on bug 4319 - add patch to fix CVE-2012-0806 ( buffer overflow ), thanks to upstream for notifying me * Mon May 09 2011 misc <misc> 0.8.8-1.mga1 + Revision: 96631 - do not restart bip when the package is updated, as this will break current connection - add logrotate file - update to 0.8.8 fix download url use a macro to create the user fix default file attribute - new website - imported package bip