]> git.pld-linux.org Git - packages/filtergen.git/blob - filtergen.spec
- fix improper usage of %%{_sysconfdir}
[packages/filtergen.git] / filtergen.spec
1 Summary:        Simple packet filter generator
2 Summary(pl):    Prosty generator filtrów pakietów
3 Name:           filter
4 Version:        0.9
5 Release:        3
6 License:        GPL
7 Group:          Networking/Utilities
8 Source0:        http://hairy.beasts.org/filter/%{name}-%{version}.tar.gz
9 Source1:        %{name}.conf
10 Source2:        %{name}.sysconfig
11 Source3:        %{name}.init
12 Patch0:         %{name}-types.patch
13 URL:            http://hairy.beasts.org/filter/
14 BuildRequires:  flex
15 Prereq:         rc-scripts
16 Prereq:         /sbin/chkconfig
17 Provides:       firewall
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 This tool is for generating packet filtering rules from a fairly high-
22 level description language. It doesn't support all of the whizz-bang
23 features of the latest and greatest packet filters, but supports a
24 decent subset which is sufficient for typical workstation.
25
26 It currently supports only Linux iptables and ipchains. Cisco IOS has
27 been begun, but is incomplete. Darren Reed's ipfilter may be supported
28 at some stage. It doesn't generate optimal rulesets, and has a few
29 limitations which need to be removed, but is still a useful tool.
30
31 Please read HONESTY file!
32
33 %description -l pl
34 To jest narzêdzie do generowania regu³ filtrowania pakietów z
35 wzglêdnie wysokopoziomowego jêzyka opisu. Nie obs³uguje wszystkich
36 zaawansowanych mo¿liwo¶ci najnowszych filtrów pakietów, ale wspiera
37 przyzwoity podzbiór, wystarczaj±cy dla typowych stacji roboczych.
38
39 Aktualnie obs³uguje tylko linuksowe iptables i ipchains. Obs³uga Cisco
40 IOS jest zaczêta, ale nie kompletna. ipfilter Darrena Reeda jest
41 obs³ugiwany czê¶ciowo. Nie generuje optymalnych regu³ek i ma parê
42 ograniczeñ, które powinny byæ usuniête, ale mimo to jest u¿ytecznym
43 narzêdziem.
44
45 Przeczytaj plik HONESTY!
46
47 %prep
48 %setup -q
49 %patch -p1
50
51 %build
52 %{__make} \
53         CC="%{__cc}" \
54         CFLAGS="%{rpmcflags} -Wall -Werror"
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/%{name}} \
59         $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,rc.d/init.d} \
60         $RPM_BUILD_ROOT%{_mandir}/man{5,7,8}
61
62 install filtergen $RPM_BUILD_ROOT%{_sbindir}
63 install filter_syntax.5 $RPM_BUILD_ROOT%{_mandir}/man5
64 install filter_backends.7 $RPM_BUILD_ROOT%{_mandir}/man7
65 install filtergen.8 $RPM_BUILD_ROOT%{_mandir}/man8
66 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/simple.conf
67 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
68 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
69 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/generated_rules
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post
75 /sbin/chkconfig --add filter
76 if [ -f /var/lock/subsys/filter ]; then
77         /etc/rc.d/init.d/filter restart >&2
78 else
79         echo "Run \"/etc/rc.d/init.d/filter start\" to start filter"
80 fi
81
82 %preun
83 if [ "$1" = "0" ]; then
84         if [ -f /var/lock/subsys/filter ]; then
85                 /etc/rc.d/init.d/filter stop >&2
86         fi
87         /sbin/chkconfig --del filter
88 fi
89
90 %files
91 %defattr(644,root,root,755)
92 %doc README HONESTY HISTORY TODO tests
93 %attr(755,root,root) %{_sbindir}/filtergen
94 %dir %{_sysconfdir}/%{name}
95 %attr(600,root,root) %{_sysconfdir}/%{name}/simple.conf
96 %attr(600,root,root) %{_sysconfdir}/%{name}/generated_rules
97 %attr(600,root,root) /etc/sysconfig/%{name}
98 %attr(754,root,root) /etc/rc.d/init.d/%{name}
99 %{_mandir}/man5/*
100 %{_mandir}/man7/*
101 %{_mandir}/man8/*
This page took 0.080114 seconds and 4 git commands to generate.