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}
|
31
|
7 License: GPL
|
10
|
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 %prep
|
|
29
|
|
30
|
|
31 %setup
|
|
32
|
|
33
|
|
34 %build
|
|
35 ./configure --prefix=%{_prefix} \
|
|
36 --bindir=%{_bindir} --mandir=%{_mandir} \
|
|
37 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
|
|
38 --datadir=%{_datadir} --includedir=%{_includedir} \
|
|
39 --sysconfdir=%{_sysconfdir}
|
|
40 make
|
|
41
|
|
42
|
|
43 %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
|
|
49 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
|
|
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
|
12
|
56 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
33
|
57 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@ $RPM_BUILD_ROOT/etc/rc.d/init.d
|
12
|
58 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
10
|
59
|
|
60
|
|
61 %clean
|
|
62
|
|
63
|
|
64 %pre
|
|
65
|
|
66
|
|
67 %post
|
|
68 /sbin/chkconfig --add @PACKAGE@
|
|
69
|
|
70
|
|
71 %preun
|
31
|
72 [ $1 = 0 ] && /sbin/service @PACKAGE@ stop || :
|
10
|
73
|
|
74
|
|
75 %postun
|
31
|
76 [ $1 = 0 ] && /sbin/chkconfig --del @PACKAGE@
|
10
|
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
|
|
88 %changelog
|
31
|
89 * Thu Aug 30 2007 Carl Byington 1.5
|
|
90 - Fix pre/post scripts
|
|
91
|
10
|
92 * Thu Dec 08 2005 Carl Byington 1.0
|
|
93 - initial revision based on dnsbl spec file
|
|
94 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html
|