1 %define _name firewall-init
2 Summary: ipchains firewall SysV-init style start-up script
3 Summary(pl.UTF-8): Skrypt startowy firewalla ipchains
4 Name: %{_name}-ipchains
8 Group: Networking/Admin
9 Source0: %{_name}-%{version}.tar.gz
10 # Source0-md5: 07ba7a897e2d903d629e6607e3b495f3
11 Patch0: %{_name}-syntax_verify.patch
12 Requires(post,preun): /sbin/chkconfig
15 Obsoletes: firewall-init < 2.2
16 Conflicts: firewall-init >= 2.99
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 Firewall-init is meant to provide an easy to use interface to start
22 and stopping the kernel IP packet filters and accounting through
25 %description -l pl.UTF-8
26 Dzięki firewall-init uzyskuje się łatwy interfejs do startowania i
27 stopowania filtrów IP jądra oraz zliczania pakietów poprzez
31 %setup -q -n %{_name}-%{version}
35 rm -rf $RPM_BUILD_ROOT
36 install -d $RPM_BUILD_ROOT/etc/{sysconfig/firewall-rules,rc.d/init.d}
38 install firewall.init $RPM_BUILD_ROOT/etc/rc.d/init.d/firewall
39 install firewall $RPM_BUILD_ROOT/etc/sysconfig/
41 for i in input output forward; do
42 echo '#<policy> <proto> <s_addr/s_mask> <s_port> <d_addr/d_mask> <d_port> <interface> <options>' > \
43 $RPM_BUILD_ROOT/etc/sysconfig/firewall-rules/${i}
47 /sbin/chkconfig --add firewall
50 if [ "$1" = "0" ]; then
51 /sbin/chkconfig --del firewall
55 rm -rf $RPM_BUILD_ROOT
58 %defattr(644,root,root,755)
59 %doc README input.example
60 %attr(600,root,root) %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/firewall
61 %attr(600,root,root) %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/firewall-rules/*
62 %attr(700,root,root) %dir /etc/sysconfig/firewall-rules
63 %attr(754,root,root) /etc/rc.d/init.d/firewall