annotate syslog2iptables.spec.in @ 10:5dfe0138b4f9

initial coding
author carl
date Thu, 08 Dec 2005 13:58:08 -0800
parents
children a9b52f657f08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
1 Summary: Syslog to iptables dynamic firewall
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
2 Name: @PACKAGE@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
3 Version: @VERSION@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
4 Release: %{?custom_release}%{!?custom_release:1}
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
5 Copyright: GPL
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
6 Group: System Environment/Daemons
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
7 Source: http://www.five-ten-sg.com/util/@PACKAGE@-@VERSION@.tar.gz
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
8 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
9 URL: http://www.five-ten-sg.com/@PACKAGE@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
10 Vendor: 510 Software Group
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
11 Packager: 510 Software Group
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
12 Requires(post,preun): /sbin/chkconfig /sbin/service
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
13 Requires: iptables
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
14 Requires: coreutils
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
15 BuildRequires: gcc gcc-c++
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
16
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
17
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
18 %description
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
19 @PACKAGE@ reads a configuration file /etc/@PACKAGE@.conf that defines a collection of syslog files to be parsed for ip addresses to be added to the iptables INPUT chain with DROP rules.
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
20
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
21 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.
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
22
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
23
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
24 %prep
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
25
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
26
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
27 %setup
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
28
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
29
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
30 %build
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
31 ./configure --prefix=%{_prefix} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
32 --bindir=%{_bindir} --mandir=%{_mandir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
33 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
34 --datadir=%{_datadir} --includedir=%{_includedir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
35 --sysconfdir=%{_sysconfdir}
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
36 make
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
37
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
38
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
39 %install
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
40 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
41 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
42 exit 1
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
43 fi
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
44 rm -rf $RPM_BUILD_ROOT
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
45 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
46 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
47 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
48 datadir=$RPM_BUILD_ROOT%{_datadir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
49 includedir=$RPM_BUILD_ROOT%{_includedir} \
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
50 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
51 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
52 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/syslog2iptables $RPM_BUILD_ROOT/etc/rc.d/init.d
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
53
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
54
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
55 %clean
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
56 rm -rf $RPM_BUILD_ROOT
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
57
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
58
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
59 %pre
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
60
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
61
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
62 %post
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
63 /sbin/chkconfig --add @PACKAGE@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
64 /sbin/chkconfig @PACKAGE@ on
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
65 /sbin/service @PACKAGE@ start || :
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
66
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
67
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
68 %preun
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
69 /sbin/service @PACKAGE@ stop || :
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
70 /sbin/chkconfig --del @PACKAGE@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
71
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
72
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
73 %postun
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
74
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
75
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
76 %files
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
77 %doc AUTHORS COPYING ChangeLog NEWS README
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
78 %defattr(-,root,root)
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
79 %{_sbindir}/*
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
80 %config(noreplace) %{_sysconfdir}/@PACKAGE@.conf
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
81 /etc/rc.d/init.d/@PACKAGE@
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
82
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
83
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
84 %changelog
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
85 * Thu Dec 08 2005 Carl Byington 1.0
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
86 - initial revision based on dnsbl spec file
5dfe0138b4f9 initial coding
carl
parents:
diff changeset
87 - and http://www.fedora.us/docs/rpm-packaging-guidelines.html