view syslog2iptables.spec.in @ 56:73dd2daeaf8e stable-1-0-13-2

switch to auto requires
author Carl Byington <carl@five-ten-sg.com>
date Wed, 17 Aug 2011 10:12:16 -0700
parents d6fb7fca0394
children b45dddebe8fc
line wrap: on
line source

%define localstatedir   /var/lib

Summary:            Syslog to iptables dynamic firewall
Name:               @PACKAGE@
Version:            @VERSION@
Release:            2%{?dist}
License:            GPLv3+
Group:              System Environment/Daemons
Source:             http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
BuildRoot:          %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL:                http://www.five-ten-sg.com/%{name}/

Requires(post,preun):   /sbin/chkconfig
Requires(post,preun):   /sbin/service
Requires:               iptables
Requires:               coreutils
BuildRequires:          gcc gcc-c++


%description
This is a simple adaptive firewall.  It maintains the INPUT chain
of the iptables firewall set based on syslog entries.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}        $RPM_BUILD_ROOT/etc/rc.d/init.d


%clean
rm -rf $RPM_BUILD_ROOT


%pre


%post
/sbin/chkconfig --add %{name}


%preun
[ $1 = 0 ] && /sbin/service %{name} stop || :


%postun
[ $1 = 0 ] && /sbin/chkconfig --del %{name}


%files
%defattr(-,root,root,-)
%{_sbindir}/*
%{_mandir}/man1/*
%{_mandir}/man5/*
%docdir %{_datadir}/doc/%{name}-%{version}
%{_datadir}/doc/%{name}-%{version}
%config(noreplace) %{_sysconfdir}/%{name}.conf
/etc/rc.d/init.d/%{name}


%changelog
* Wed Aug 17 2011 Carl Byington <carl@five-ten-sg.com> - 1.13-2
- switch to auto requires

* Sun Jan 25 2009 Carl Byington <carl@five-ten-sg.com> - 1.13-1
- Document multiple contexts.

* Sat Jan 24 2009 Carl Byington <carl@five-ten-sg.com> - 1.12-1
- Allow multiple contexts with independent add/remove commands.

* Thu May 29 2008 Carl Byington <carl@five-ten-sg.com> - 1.11-1
- Fix to compile on Fedora 9 and for const correctness.

* Sat Mar 22 2008 Carl Byington <carl@five-ten-sg.com> - 1.10
- Fix to compile on Solaris.

* Fri Mar 21 2008 Carl Byington <carl@five-ten-sg.com> - 1.9
- changes for Fedora packaging guidelines

* Thu Aug 30 2007 Carl Byington <carl@five-ten-sg.com> - 1.5
- Fix pre/post scripts

* Thu Dec 08 2005 Carl Byington <carl@five-ten-sg.com> - 1.0
- initial revision based on dnsbl spec file
- and http://www.fedora.us/docs/rpm-packaging-guidelines.html