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
|
18
|
14 AutoReqProv: no
|
|
15
|
|
16 Requires(post,preun): /sbin/chkconfig
|
|
17 Requires(post,preun): /sbin/service
|
10
|
18 Requires: iptables
|
|
19 Requires: coreutils
|
|
20 BuildRequires: gcc gcc-c++
|
18
|
21 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6
|
10
|
22
|
|
23
|
|
24 %description
|
11
|
25
|
|
26 @PACKAGE@ is a simple adaptive firewall. It maintains the INPUT chain of the iptables firewall set based on syslog entries.
|
10
|
27
|
|
28 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.
|
|
29
|
|
30
|
|
31 %prep
|
|
32
|
|
33
|
|
34 %setup
|
|
35
|
|
36
|
|
37 %build
|
|
38 ./configure --prefix=%{_prefix} \
|
|
39 --bindir=%{_bindir} --mandir=%{_mandir} \
|
|
40 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
|
|
41 --datadir=%{_datadir} --includedir=%{_includedir} \
|
|
42 --sysconfdir=%{_sysconfdir}
|
|
43 make
|
|
44
|
|
45
|
|
46 %install
|
|
47 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
|
|
48 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
|
|
49 exit 1
|
|
50 fi
|
|
51 rm -rf $RPM_BUILD_ROOT
|
|
52 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
|
|
53 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
|
|
54 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
|
|
55 datadir=$RPM_BUILD_ROOT%{_datadir} \
|
|
56 includedir=$RPM_BUILD_ROOT%{_includedir} \
|
|
57 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
|
|
58 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
12
|
59 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
60 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/syslog2iptables $RPM_BUILD_ROOT/etc/rc.d/init.d
|
12
|
61 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
62
|
|
63
|
|
64 %clean
|
|
65 rm -rf $RPM_BUILD_ROOT
|
|
66
|
|
67
|
|
68 %pre
|
|
69
|
|
70
|
|
71 %post
|
|
72 /sbin/chkconfig --add @PACKAGE@
|
|
73
|
|
74
|
|
75 %preun
|
|
76 /sbin/service @PACKAGE@ stop || :
|
|
77 /sbin/chkconfig --del @PACKAGE@
|
|
78
|
|
79
|
|
80 %postun
|
|
81
|
|
82
|
|
83 %files
|
|
84 %defattr(-,root,root)
|
|
85 %{_sbindir}/*
|
12
|
86 %doc %{_mandir}/*
|
|
87 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@
|
|
88 %{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
89 %config(noreplace) %{_sysconfdir}/@PACKAGE@.conf
|
|
90 /etc/rc.d/init.d/@PACKAGE@
|
|
91
|
|
92 %changelog
|
|
93 * Thu Dec 08 2005 Carl Byington 1.0
|
|
94 - initial revision based on dnsbl spec file
|
|
95 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html
|