comparison 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
comparison
equal deleted inserted replaced
41:738d1f059183 42:d9ae11033b4b
1 %define localstatedir /var/lib 1 %define localstatedir /var/lib
2 2
3 Summary: Syslog to iptables dynamic firewall 3 Summary: Syslog to iptables dynamic firewall
4 Name: @PACKAGE@ 4 Name: @PACKAGE@
5 Version: @VERSION@ 5 Version: @VERSION@
6 Release: %{?custom_release}%{!?custom_release:1} 6 Release: 1%{?dist}
7 License: GPL 7 License: GPLv3+
8 Group: System Environment/Daemons 8 Group: System Environment/Daemons
9 Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz 9 Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 10 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
11 URL: http://www.five-ten-sg.com/@PACKAGE@/ 11 URL: http://www.five-ten-sg.com/%{name}/
12 Vendor: 510 Software Group
13 Packager: 510 Software Group
14 AutoReqProv: no 12 AutoReqProv: no
15 13
16 Requires(post,preun): /sbin/chkconfig 14 Requires(post,preun): /sbin/chkconfig
17 Requires(post,preun): /sbin/service 15 Requires(post,preun): /sbin/service
18 Requires: iptables 16 Requires: iptables
20 BuildRequires: gcc gcc-c++ 18 BuildRequires: gcc gcc-c++
21 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6 19 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6
22 20
23 21
24 %description 22 %description
25 23 This is a simple adaptive firewall. It maintains the INPUT chain
26 @PACKAGE@ is a simple adaptive firewall. It maintains the INPUT chain of the iptables firewall set based on syslog entries. 24 of the iptables firewall set based on syslog entries.
27 25
28 %prep 26 %prep
29 27 %setup -q
30
31 %setup
32
33 28
34 %build 29 %build
35 ./configure --prefix=%{_prefix} \ 30 %configure
36 --bindir=%{_bindir} --mandir=%{_mandir} \ 31 make %{?_smp_mflags}
37 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
38 --datadir=%{_datadir} --includedir=%{_includedir} \
39 --sysconfdir=%{_sysconfdir}
40 make
41 32
42 33
43 %install 34 %install
44 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
45 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
46 exit 1
47 fi
48 rm -rf $RPM_BUILD_ROOT 35 rm -rf $RPM_BUILD_ROOT
49 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ 36 make DESTDIR=$RPM_BUILD_ROOT install
50 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
51 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
52 datadir=$RPM_BUILD_ROOT%{_datadir} \
53 includedir=$RPM_BUILD_ROOT%{_includedir} \
54 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
55 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d 37 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
56 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@ 38 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name} $RPM_BUILD_ROOT/etc/rc.d/init.d
57 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@ $RPM_BUILD_ROOT/etc/rc.d/init.d
58 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
59 39
60 40
61 %clean 41 %clean
42 rm -rf $RPM_BUILD_ROOT
62 43
63 44
64 %pre 45 %pre
65 46
66 47
67 %post 48 %post
68 /sbin/chkconfig --add @PACKAGE@ 49 /sbin/chkconfig --add %{name}
69 50
70 51
71 %preun 52 %preun
72 [ $1 = 0 ] && /sbin/service @PACKAGE@ stop || : 53 [ $1 = 0 ] && /sbin/service %{name} stop || :
73 54
74 55
75 %postun 56 %postun
76 [ $1 = 0 ] && /sbin/chkconfig --del @PACKAGE@ 57 [ $1 = 0 ] && /sbin/chkconfig --del %{name}
77 58
78 59
79 %files 60 %files
80 %defattr(-,root,root) 61 %defattr(-,root,root,-)
81 %{_sbindir}/* 62 %{_sbindir}/*
82 %doc %{_mandir}/* 63 %{_mandir}/man1/*
83 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@ 64 %{_mandir}/man5/*
84 %{_datadir}/doc/@PACKAGE@-@VERSION@ 65 %docdir %{_datadir}/doc/%{name}-%{version}
85 %config(noreplace) %{_sysconfdir}/@PACKAGE@.conf 66 %{_datadir}/doc/%{name}-%{version}
86 /etc/rc.d/init.d/@PACKAGE@ 67 %config(noreplace) %{_sysconfdir}/%{name}.conf
68 /etc/rc.d/init.d/%{name}
69
87 70
88 %changelog 71 %changelog
89 * Thu Aug 30 2007 Carl Byington 1.5 72 * Fri Mar 21 2008 Carl Byington <carl@five-ten-sg.com> - 1.9
73 - changes for Fedora packaging guidelines
74
75 * Thu Aug 30 2007 Carl Byington <carl@five-ten-sg.com> - 1.5
90 - Fix pre/post scripts 76 - Fix pre/post scripts
91 77
92 * Thu Dec 08 2005 Carl Byington 1.0 78 * Thu Dec 08 2005 Carl Byington <carl@five-ten-sg.com> - 1.0
93 - initial revision based on dnsbl spec file 79 - initial revision based on dnsbl spec file
94 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html 80 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html