]> git.pld-linux.org Git - packages/firehol.git/blob - firehol.spec
up to 2.0.1
[packages/firehol.git] / firehol.spec
1 # TODO
2 # - pldize initscript
3 # - unbash initscript
4 # - recheck deps
5 Summary:        Simple and powerful firewall and traffic shaping languages
6 Name:           firehol
7 Version:        2.0.1
8 Release:        0.1
9 License:        GPL v2+
10 Group:          Applications/Networking
11 Source0:        http://firehol.org/download/firehol/releases/v%{version}/%{name}-%{version}.tar.xz
12 # Source0-md5:  e2672c82b2b6012f9000c15c08c7dc89
13 Source1:        %{name}.service
14 Source2:        fireqos.service
15 URL:            http://firehol.org
16 BuildRequires:  hostname
17 BuildRequires:  iproute2
18 BuildRequires:  iptables
19 BuildRequires:  procps
20 BuildRequires:  systemd-devel
21 BuildRequires:  tar >= 1:1.22
22 BuildRequires:  xz
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       coreutils
25 Requires:       gawk >= 3.0
26 Requires:       grep >= 2.4.2
27 Requires:       gzip
28 Requires:       hostname
29 Requires:       iproute2 >= 2.2.4
30 Requires:       iptables >= 1.2.4
31 Requires:       kmod
32 Requires:       less
33 Requires:       procps
34 Requires:       rc-scripts
35 Requires:       sed
36 Requires:       uname(release) >= 2.4
37 Requires:       util-linux >= 2.11
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 FireHOL is a generic firewall generator, meaning that you can design
43 any kind of local or routing stateful packet filtering firewalls with
44 ease. Install FireHOL if you want an easy way to configure stateful
45 packet filtering firewalls on Linux hosts and routers.
46
47 FireHOL uses an extremely simple but powerful way to define firewall
48 rules which it turns into complete stateful iptables firewalls.
49
50 You can run FireHOL with the 'helpme' argument, to get a configuration
51 file for the system run, which you can modify according to your needs.
52 The default configuration file will allow only client traffic on all
53 interfaces.
54
55 %prep
56 %setup -q
57
58 %build
59 %configure
60 %{__make}
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 # Hack for documentation without crufts.
68 rm -frv $RPM_BUILD_ROOT%{_docdir}
69 find examples/ -name "Makefile*" -delete -print
70
71 # Install systemd units.
72 install -d $RPM_BUILD_ROOT%{systemdunitdir}
73 cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
74
75 # Install runtime directories.
76 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
77 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
78
79 # Ghost configurations.
80 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
81       $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 /sbin/chkconfig --add firehol
88 %service firehol restart
89 %systemd_post firehol.service
90 %systemd_post fireqos.service
91
92 %preun
93 if [ "$1" = 0 ]; then
94         %service firehol stop
95         /sbin/chkconfig --del firehol
96 fi
97 %systemd_preun firehol.service
98 %systemd_preun fireqos.service
99
100 %postun
101 %systemd_reload
102
103 %files
104 %defattr(644,root,root,755)
105 %doc AUTHORS NEWS README THANKS examples
106 %doc doc/firehol/firehol-manual.{pdf,html}
107 %doc doc/fireqos/fireqos-manual.{pdf,html}
108 %dir %{_sysconfdir}/firehol
109 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
110 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
111 %{_sysconfdir}/%{name}/*.example
112 %dir %{_sysconfdir}/%{name}/services
113 %{_sysconfdir}/%{name}/services/*.example
114 %attr(755,root,root) %{_sbindir}/firehol
115 %attr(755,root,root) %{_sbindir}/fireqos
116 %{_mandir}/man1/*.1*
117 %{_mandir}/man5/*.5*
118 %{systemdunitdir}/firehol.service
119 %{systemdunitdir}/fireqos.service
120 %{_localstatedir}/spool/%{name}
This page took 0.050537 seconds and 3 git commands to generate.