%define pkgversion 0.6-beta4 Name: packetbl Version: 0.6.4 Release: 2 Summary: Packet Blacklist License: GPL Group: System Url: http://www.rjmsoftware.org/?q=node/4 Source0: %{name}-%{pkgversion}.tar.bz2 %if 0%{?suse_version} Source1: %{name}-suse.init %else Source1: %{name}-rh.init %endif Patch0: %{name}-DESTDIR.patch Patch1: %{name}-write-pid.patch #Patch2: %{name}-0.7-beta1_void-return.patch BuildRoot: %{_tmppath}/%{name}-%{pkgversion}-root # for 0.6.x BuildRequires: dotconf-devel # for 0.7.x BuildRequires: libconfig-devel BuildRequires: firedns-devel BuildRequires: /usr/include/dotconf.h BuildRequires: iptables-devel BuildRequires: libnetfilter_queue-devel BuildRequires: libnfnetlink-devel %description Packetbl checks IP addresses of incoming connections against RBLs and uses Netfilter/iptables to block them if they're listed. %prep %setup -n %{name}-%{pkgversion} %patch0 %patch1 ##patch2 %build %configure --with-firedns --with-stats --with-stats-socket=/var/run/packetbl/packetbl.sock %__make %install %__make DESTDIR=%{buildroot} install %__install -d %{buildroot}/var/run/packetbl %__install -d %{buildroot}%{_sbindir} %__install -D %{S:1} %{buildroot}%{_sysconfdir}/init.d/packetbl cd %{buildroot}%{_sbindir} ln -sf ../..%{_sysconfdir}/init.d/packetbl rcpacketbl %clean rm -rf %{buildroot} %preun %if 0%{?suse_version} %stop_on_removal %endif %postun %if 0%{?suse_version} %insserv_cleanup %endif %files %defattr(-,root,root) %doc AUTHORS README %config(noreplace) %{_sysconfdir}/packetbl.conf %{_sysconfdir}/init.d/packetbl %{_sbindir}/rcpacketbl %{_bindir}/packetbl %{_bindir}/packetbl_getstat %dir /var/run/packetbl %changelog * Sun Jan 13 2013 cs@linux-administrator.com - downgrade to 0.6 beta4 * Sun Dec 30 2012 cs@linux-administrator.com - update to 0.7-beta1 from SVN