5 # - update configure not to require tools at build time
6 # - checking whether /usr/sbin/iprange version is 1.0.2 or newer... no
7 # configure: error: could not find required version of iprange - check http://firehol.org/download/iprange/
8 Summary: Simple and powerful firewall and traffic shaping languages
13 Group: Applications/Networking
14 Source0: https://firehol.org/download/firehol/releases/v%{version}/%{name}-%{version}.tar.xz
15 # Source0-md5: afee409b698ad0707340112ff0e811b2
16 Source1: %{name}.service
17 Source2: fireqos.service
18 URL: https://firehol.org/
19 BuildRequires: hostname
20 BuildRequires: iproute2
21 BuildRequires: iptables
23 BuildRequires: systemd-devel
24 BuildRequires: tar >= 1:1.22
26 Requires(post,preun): /sbin/chkconfig
29 Requires: grep >= 2.4.2
32 Requires: iproute2 >= 2.2.4
33 Requires: iptables >= 1.2.4
40 Requires: uname(release) >= 2.4
41 Requires: util-linux >= 2.11
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 FireHOL is a generic firewall generator, meaning that you can design
47 any kind of local or routing stateful packet filtering firewalls with
48 ease. Install FireHOL if you want an easy way to configure stateful
49 packet filtering firewalls on Linux hosts and routers.
51 FireHOL uses an extremely simple but powerful way to define firewall
52 rules which it turns into complete stateful iptables firewalls.
54 You can run FireHOL with the 'helpme' argument, to get a configuration
55 file for the system run, which you can modify according to your needs.
56 The default configuration file will allow only client traffic on all
63 # grep AX_NEED_PROG configure.ac |sort -u|sed -rne 's/.+\(\[([^]]+)\], \[([^]]+)\].+/echo \1=`which \2` \\\\/p'|sh
65 BASH_SHELL_PATH=/bin/bash \
75 DIRNAME=/usr/bin/dirname \
79 FLOCK=/usr/bin/flock \
84 IPRANGE=/usr/sbin/iprange \
85 IPSET=/usr/sbin/ipset \
87 LOGGER=/usr/bin/logger \
92 MODPROBE=/sbin/insmod \
95 PING6=/usr/bin/ping6 \
103 SYSCTL=/sbin/sysctl \
109 TRACEROUTE=/usr/bin/traceroute \
119 rm -rf $RPM_BUILD_ROOT
121 DESTDIR=$RPM_BUILD_ROOT
123 # Hack for documentation without crufts.
124 rm -frv $RPM_BUILD_ROOT%{_docdir}
125 find examples/ -name "Makefile*" -delete -print
127 # Install systemd units.
128 install -d $RPM_BUILD_ROOT%{systemdunitdir}
129 cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
131 # Install runtime directories.
132 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
133 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
135 # Ghost configurations.
136 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
137 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
140 rm -rf $RPM_BUILD_ROOT
143 /sbin/chkconfig --add firehol
144 %service firehol restart
145 %systemd_post firehol.service
146 %systemd_post fireqos.service
149 if [ "$1" = 0 ]; then
150 %service firehol stop
151 /sbin/chkconfig --del firehol
153 %systemd_preun firehol.service
154 %systemd_preun fireqos.service
160 %defattr(644,root,root,755)
161 %doc AUTHORS NEWS README THANKS examples
162 %doc doc/firehol/firehol-manual.{pdf,html}
163 %doc doc/fireqos/fireqos-manual.{pdf,html}
164 %dir %{_sysconfdir}/firehol
165 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
166 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
167 %{_sysconfdir}/%{name}/*.example
168 %dir %{_sysconfdir}/%{name}/services
169 %{_sysconfdir}/%{name}/services/*.example
170 %attr(755,root,root) %{_sbindir}/firehol
171 %attr(755,root,root) %{_sbindir}/fireqos
174 %{systemdunitdir}/firehol.service
175 %{systemdunitdir}/fireqos.service
176 %{_localstatedir}/spool/%{name}