5 # - update configure not to require tools at build time
6 Summary: Simple and powerful firewall and traffic shaping languages
11 Group: Applications/Networking
12 Source0: https://firehol.org/download/firehol/releases/v%{version}/%{name}-%{version}.tar.xz
13 # Source0-md5: afee409b698ad0707340112ff0e811b2
14 Source1: %{name}.service
15 Source2: fireqos.service
16 URL: https://firehol.org/
17 BuildRequires: graphviz
18 BuildRequires: hostname
19 BuildRequires: iprange >= 1.0.2
20 BuildRequires: iproute2
21 BuildRequires: iptables
24 BuildRequires: systemd-devel
25 BuildRequires: tar >= 1:1.22
30 Requires(post,preun): /sbin/chkconfig
33 Requires: grep >= 2.4.2
36 Requires: iproute2 >= 2.2.4
38 Requires: iptables >= 1.2.4
44 Requires: uname(release) >= 2.4
45 Requires: util-linux >= 2.11
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 FireHOL is a generic firewall generator, meaning that you can design
51 any kind of local or routing stateful packet filtering firewalls with
52 ease. Install FireHOL if you want an easy way to configure stateful
53 packet filtering firewalls on Linux hosts and routers.
55 FireHOL uses an extremely simple but powerful way to define firewall
56 rules which it turns into complete stateful iptables firewalls.
58 You can run FireHOL with the 'helpme' argument, to get a configuration
59 file for the system run, which you can modify according to your needs.
60 The default configuration file will allow only client traffic on all
67 # grep AX_NEED_PROG configure.ac |sort -u|sed -rne 's/.+\(\[([^]]+)\], \[([^]]+)\].+/echo \1=`which \2` \\\\/p'|sh
69 BASH_SHELL_PATH=/bin/bash \
79 DIRNAME=/usr/bin/dirname \
83 FLOCK=/usr/bin/flock \
88 IPRANGE=/usr/bin/iprange \
89 IPSET=/usr/sbin/ipset \
91 LOGGER=/usr/bin/logger \
96 MODPROBE=/sbin/insmod \
99 PING6=/usr/bin/ping6 \
107 SYSCTL=/sbin/sysctl \
113 TRACEROUTE=/usr/bin/traceroute \
123 rm -rf $RPM_BUILD_ROOT
125 DESTDIR=$RPM_BUILD_ROOT
127 # Hack for documentation without crufts.
128 rm -frv $RPM_BUILD_ROOT%{_docdir}
129 find examples/ -name "Makefile*" -delete -print
131 # Install systemd units.
132 install -d $RPM_BUILD_ROOT%{systemdunitdir}
133 cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
135 # Install runtime directories.
136 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
137 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
139 # Ghost configurations.
140 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
141 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
144 rm -rf $RPM_BUILD_ROOT
147 /sbin/chkconfig --add firehol
148 %service firehol restart
149 %systemd_post firehol.service
150 %systemd_post fireqos.service
153 if [ "$1" = 0 ]; then
154 %service firehol stop
155 /sbin/chkconfig --del firehol
157 %systemd_preun firehol.service
158 %systemd_preun fireqos.service
164 %defattr(644,root,root,755)
165 %doc README THANKS examples
166 %doc doc/firehol/firehol-manual.{pdf,html}
167 %doc doc/fireqos/fireqos-manual.{pdf,html}
168 %dir %{_sysconfdir}/firehol
169 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
170 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
171 %{_sysconfdir}/%{name}/*.example
172 %dir %{_sysconfdir}/%{name}/services
173 %{_sysconfdir}/%{name}/services/*.example
174 %attr(755,root,root) %{_sbindir}/firehol
175 %attr(755,root,root) %{_sbindir}/fireqos
178 %{systemdunitdir}/firehol.service
179 %{systemdunitdir}/fireqos.service
180 %{_localstatedir}/spool/%{name}