diff syslog2iptables.spec.in @ 42:d9ae11033b4b stable-1-9

Add default config to firewall systems that send bounces to non-existant accounts. Switch to Mercurial source control. Update spec file for fedora packaging.
author Carl Byington <carl@five-ten-sg.com>
date Fri, 21 Mar 2008 14:02:32 -0700
parents ee9553116dbf
children ba0259c9e411
line wrap: on
line diff
--- a/syslog2iptables.spec.in	Fri Mar 21 08:51:24 2008 +0000
+++ b/syslog2iptables.spec.in	Fri Mar 21 14:02:32 2008 -0700
@@ -3,14 +3,12 @@
 Summary:            Syslog to iptables dynamic firewall
 Name:               @PACKAGE@
 Version:            @VERSION@
-Release:            %{?custom_release}%{!?custom_release:1}
-License:            GPL
+Release:            1%{?dist}
+License:            GPLv3+
 Group:              System Environment/Daemons
-Source:             http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz
-BuildRoot:          %{_tmppath}/%{name}-%{version}-buildroot
-URL:                http://www.five-ten-sg.com/@PACKAGE@/
-Vendor:             510 Software Group
-Packager:           510 Software Group
+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}/
 AutoReqProv:        no
 
 Requires(post,preun):   /sbin/chkconfig
@@ -22,73 +20,61 @@
 
 
 %description
-
-@PACKAGE@ is a simple adaptive firewall.  It maintains the INPUT chain of the iptables firewall set based on syslog entries.
+This is a simple adaptive firewall.  It maintains the INPUT chain
+of the iptables firewall set based on syslog entries.
 
 %prep
-
-
-%setup
-
+%setup -q
 
 %build
-./configure --prefix=%{_prefix} \
-    --bindir=%{_bindir} --mandir=%{_mandir} \
-    --localstatedir=%{localstatedir} --libdir=%{_libdir} \
-    --datadir=%{_datadir} --includedir=%{_includedir} \
-    --sysconfdir=%{_sysconfdir}
-make
+%configure
+make %{?_smp_mflags}
 
 
 %install
-if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
-        echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
-        exit 1
-fi
 rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
-    mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
-    localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
-    datadir=$RPM_BUILD_ROOT%{_datadir} \
-    includedir=$RPM_BUILD_ROOT%{_includedir} \
-    sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
+make DESTDIR=$RPM_BUILD_ROOT install
 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
-mv -f $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@        $RPM_BUILD_ROOT/etc/rc.d/init.d
-mv AUTHORS COPYING ChangeLog NEWS README             $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
+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 @PACKAGE@
+/sbin/chkconfig --add %{name}
 
 
 %preun
-[ $1 = 0 ] && /sbin/service @PACKAGE@ stop || :
+[ $1 = 0 ] && /sbin/service %{name} stop || :
 
 
 %postun
-[ $1 = 0 ] && /sbin/chkconfig --del @PACKAGE@
+[ $1 = 0 ] && /sbin/chkconfig --del %{name}
 
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %{_sbindir}/*
-%doc %{_mandir}/*
-%docdir %{_datadir}/doc/@PACKAGE@-@VERSION@
-%{_datadir}/doc/@PACKAGE@-@VERSION@
-%config(noreplace) %{_sysconfdir}/@PACKAGE@.conf
-/etc/rc.d/init.d/@PACKAGE@
+%{_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
-* Thu Aug 30 2007 Carl Byington 1.5
+* 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 1.0
+* 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