11
|
1 %define localstatedir /var/lib
|
|
2
|
10
|
3 Summary: Syslog to iptables dynamic firewall
|
|
4 Name: @PACKAGE@
|
|
5 Version: @VERSION@
|
|
6 Release: %{?custom_release}%{!?custom_release:1}
|
|
7 Copyright: GPL
|
|
8 Group: System Environment/Daemons
|
11
|
9 Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz
|
10
|
10 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
11
|
11 URL: http://www.five-ten-sg.com/@PACKAGE@/
|
10
|
12 Vendor: 510 Software Group
|
|
13 Packager: 510 Software Group
|
|
14 Requires(post,preun): /sbin/chkconfig /sbin/service
|
|
15 Requires: iptables
|
|
16 Requires: coreutils
|
|
17 BuildRequires: gcc gcc-c++
|
|
18
|
|
19
|
|
20 %description
|
11
|
21
|
|
22 @PACKAGE@ is a simple adaptive firewall. It maintains the INPUT chain of the iptables firewall set based on syslog entries.
|
10
|
23
|
|
24 This package cannot co-exist with any other daemon that tries to maintain the INPUT chain, since it periodically flushes and recreates the INPUT chain.
|
|
25
|
|
26
|
|
27 %prep
|
|
28
|
|
29
|
|
30 %setup
|
|
31
|
|
32
|
|
33 %build
|
|
34 ./configure --prefix=%{_prefix} \
|
|
35 --bindir=%{_bindir} --mandir=%{_mandir} \
|
|
36 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
|
|
37 --datadir=%{_datadir} --includedir=%{_includedir} \
|
|
38 --sysconfdir=%{_sysconfdir}
|
|
39 make
|
|
40
|
|
41
|
|
42 %install
|
|
43 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
|
|
44 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
|
|
45 exit 1
|
|
46 fi
|
|
47 rm -rf $RPM_BUILD_ROOT
|
|
48 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
|
|
49 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
|
|
50 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
|
|
51 datadir=$RPM_BUILD_ROOT%{_datadir} \
|
|
52 includedir=$RPM_BUILD_ROOT%{_includedir} \
|
|
53 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
|
|
54 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
12
|
55 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
56 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/syslog2iptables $RPM_BUILD_ROOT/etc/rc.d/init.d
|
12
|
57 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
58
|
|
59
|
|
60 %clean
|
|
61 rm -rf $RPM_BUILD_ROOT
|
|
62
|
|
63
|
|
64 %pre
|
|
65
|
|
66
|
|
67 %post
|
|
68 /sbin/chkconfig --add @PACKAGE@
|
|
69
|
|
70
|
|
71 %preun
|
|
72 /sbin/service @PACKAGE@ stop || :
|
|
73 /sbin/chkconfig --del @PACKAGE@
|
|
74
|
|
75
|
|
76 %postun
|
|
77
|
|
78
|
|
79 %files
|
|
80 %defattr(-,root,root)
|
|
81 %{_sbindir}/*
|
12
|
82 %doc %{_mandir}/*
|
|
83 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@
|
|
84 %{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
85 %config(noreplace) %{_sysconfdir}/@PACKAGE@.conf
|
|
86 /etc/rc.d/init.d/@PACKAGE@
|
|
87
|
12
|
88 # %doc AUTHORS COPYING ChangeLog NEWS README
|
10
|
89
|
|
90 %changelog
|
|
91 * Thu Dec 08 2005 Carl Byington 1.0
|
|
92 - initial revision based on dnsbl spec file
|
|
93 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html
|