]> git.pld-linux.org Git - packages/firewall-init-ipchains.git/blob - firewall-init-ipchains.spec
- added using CVS keywords in %changelog (for automating them).
[packages/firewall-init-ipchains.git] / firewall-init-ipchains.spec
1 Summary:        Firewall SysV-init style start-up script
2 Name:           firewall-init
3 Version:        2.0
4 Release:        1
5 Copyright:      BSD
6 Group:          Networking/Admin
7 Source:         ftp://hunter.mimuw.edu.pl/pub/users/baggins/%{name}-%{version}.tar.gz
8 Prereq:         /sbin/chkconfig
9 Requires:       ipchains
10 Buildarch:      noarch
11 Buildroot:      /tmp/%{name}-%{version}-root
12
13 %description
14 Firewall-init is meant to provide an easy to use interface to start and
15 stopping the kernel IP packet filters and accounting through ipchains(8).
16
17 %prep
18 %setup -q
19
20 %install
21 rm -rf $RPM_BUILD_ROOT
22
23 install -d $RPM_BUILD_ROOT/etc/{sysconfig/firewall-rules,rc.d/init.d}
24
25 install firewall.init $RPM_BUILD_ROOT/etc/rc.d/init.d/firewall
26 install firewall $RPM_BUILD_ROOT/etc/sysconfig/
27
28 for i in input output forward; do
29         echo '#<policy> <proto> <s_addr/s_mask> <s_port> <d_addr/d_mask> <d_port> <interface> <options>' > \
30                 $RPM_BUILD_ROOT/etc/sysconfig/firewall-rules/${i}
31 done
32
33 %post
34 /sbin/chkconfig --add firewall
35
36 %postun
37 if [ $1 = 0 ]; then
38    /sbin/chkconfig --del firewall
39 fi
40
41 %clean
42 rm -rf $RPM_BUILD_ROOT
43
44 %files
45 %defattr(644, root, root, 755)
46 %doc README input.example
47 %attr(600, root, root) %verify(not size mtime md5) %config(noreplace) /etc/sysconfig/firewall
48 %attr(600, root, root) %verify(not size mtime md5) %config(noreplace) /etc/sysconfig/firewall-rules/*
49 %attr(700, root, root) %dir /etc/sysconfig/firewall-rules
50 %attr(700, root, root) /etc/rc.d/init.d/firewall
This page took 0.056794 seconds and 3 git commands to generate.