%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define _unpackaged_files_terminate_build 0 Name: pyroman Version: 0.4.6 Release: 3%{?dist} Summary: Very fast firewall configuration tool Group: Applications/Internet License: MIT URL: http://pyroman.alioth.debian.org/ Source0: https://alioth.debian.org/frs/download.php/2534/%{name}_%{version}.orig.tar.gz Source1: fedora.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: iptables Requires(post): chkconfig Requires(preun): chkconfig # This is for /sbin/service Requires(preun): initscripts Requires(postun): initscripts %description Pyroman is a firewall tool written in Python for complex networks, but it can of course also handle simple single-host-single-link setups. Pyroman is inspired by Shorewall and FireHOL, but tries to improve upon them with respect to performance and ease of configuration. Pyroman currently only configures IPv4 iptables/netfilter firewalls, it does not include configuration utilities for setting up VPN or traffic shaping. By using iptables-restore it's much faster than other tools in configuring the firewall, the configuration is simple and it has accurate error reporting and offers rollback of changes. %prep %setup -q -n %{name}-%{version} cp -p %SOURCE1 . %build %install rm -rf %{buildroot} install -d %{buildroot}/%{python_sitelib}/%{name}/ install -pm 644 pyroman/* %{buildroot}/%{python_sitelib}/%{name}/ install -D bin/pyroman %{buildroot}/%{_sbindir}/%{name} install -d %{buildroot}/%{_sysconfdir}/%{name} install -Dpm 644 doc/pyroman.8 %{buildroot}/%{_mandir}/man8/%{name}.8 install -p -D -m0755 fedora.init %{buildroot}/%{_initrddir}/%{name} %clean rm -rf %{buildroot} %files %defattr(-, root, root, -) %doc AUTHORS COPYING INSTALL examples/ %{_sbindir}/%{name} # For noarch packages: sitelib %{python_sitelib}/%{name}/ %{_mandir}/man8/%{name}.8* %dir %{_sysconfdir}/%{name} %{_initrddir}/%{name} %post # This adds the proper /etc/rc*.d links for the script /sbin/chkconfig --add pyroman %preun if [ $1 = 0 ] ; then /sbin/service pyroman stop >/dev/null 2>&1 /sbin/chkconfig --del pyroman fi %postun if [ "$1" -ge "1" ] ; then /sbin/service pyroman condrestart >/dev/null 2>&1 || : fi %changelog * Mon Mar 23 2009 Adam Huffman - 0.4.6-3 - add initscript * Thu Oct 9 2008 Adam Huffman - 0.4.6-2 - fix license tag - clean up install and files sections - more description * Mon Sep 15 2008 Adam Huffman - 0.4.6-1 - Initial version