]>
Commit | Line | Data |
---|---|---|
3d3e66ca ER |
1 | # TODO |
2 | # - pldize initscript | |
3 | # - unbash initscript | |
4 | # - recheck deps | |
3aaa3ef5 ER |
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/ | |
8d21b09a | 8 | Summary: Simple and powerful firewall and traffic shaping languages |
3d3e66ca | 9 | Name: firehol |
3f94e594 | 10 | Version: 3.0.1 |
3d3e66ca ER |
11 | Release: 0.1 |
12 | License: GPL v2+ | |
13 | Group: Applications/Networking | |
3f94e594 ER |
14 | Source0: https://firehol.org/download/firehol/releases/v%{version}/%{name}-%{version}.tar.xz |
15 | # Source0-md5: afee409b698ad0707340112ff0e811b2 | |
8d21b09a ER |
16 | Source1: %{name}.service |
17 | Source2: fireqos.service | |
3f94e594 | 18 | URL: https://firehol.org/ |
8d21b09a ER |
19 | BuildRequires: hostname |
20 | BuildRequires: iproute2 | |
21 | BuildRequires: iptables | |
22 | BuildRequires: procps | |
23 | BuildRequires: systemd-devel | |
24 | BuildRequires: tar >= 1:1.22 | |
25 | BuildRequires: xz | |
26 | Requires(post,preun): /sbin/chkconfig | |
27 | Requires: coreutils | |
3d3e66ca ER |
28 | Requires: gawk >= 3.0 |
29 | Requires: grep >= 2.4.2 | |
8d21b09a ER |
30 | Requires: gzip |
31 | Requires: hostname | |
3d3e66ca ER |
32 | Requires: iproute2 >= 2.2.4 |
33 | Requires: iptables >= 1.2.4 | |
8d21b09a | 34 | Requires: kmod |
3d3e66ca | 35 | Requires: less |
3aaa3ef5 | 36 | Requires: ipset |
8d21b09a | 37 | Requires: procps |
3d3e66ca | 38 | Requires: rc-scripts |
8d21b09a ER |
39 | Requires: sed |
40 | Requires: uname(release) >= 2.4 | |
41 | Requires: util-linux >= 2.11 | |
3d3e66ca ER |
42 | BuildArch: noarch |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
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. | |
50 | ||
51 | FireHOL uses an extremely simple but powerful way to define firewall | |
52 | rules which it turns into complete stateful iptables firewalls. | |
53 | ||
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 | |
57 | interfaces. | |
58 | ||
59 | %prep | |
60 | %setup -q | |
8d21b09a ER |
61 | |
62 | %build | |
3aaa3ef5 ER |
63 | %configure \ |
64 | TRACEROUTE=/usr/sbin/traceroute | |
8d21b09a | 65 | %{__make} |
3d3e66ca ER |
66 | |
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
8d21b09a ER |
69 | %{__make} install \ |
70 | DESTDIR=$RPM_BUILD_ROOT | |
3d3e66ca | 71 | |
8d21b09a ER |
72 | # Hack for documentation without crufts. |
73 | rm -frv $RPM_BUILD_ROOT%{_docdir} | |
74 | find examples/ -name "Makefile*" -delete -print | |
3d3e66ca | 75 | |
8d21b09a ER |
76 | # Install systemd units. |
77 | install -d $RPM_BUILD_ROOT%{systemdunitdir} | |
78 | cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir} | |
3d3e66ca | 79 | |
8d21b09a ER |
80 | # Install runtime directories. |
81 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services | |
3d3e66ca ER |
82 | install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol |
83 | ||
8d21b09a ER |
84 | # Ghost configurations. |
85 | touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \ | |
86 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
3d3e66ca ER |
91 | %post |
92 | /sbin/chkconfig --add firehol | |
93 | %service firehol restart | |
8d21b09a ER |
94 | %systemd_post firehol.service |
95 | %systemd_post fireqos.service | |
3d3e66ca ER |
96 | |
97 | %preun | |
98 | if [ "$1" = 0 ]; then | |
99 | %service firehol stop | |
100 | /sbin/chkconfig --del firehol | |
101 | fi | |
8d21b09a ER |
102 | %systemd_preun firehol.service |
103 | %systemd_preun fireqos.service | |
3d3e66ca | 104 | |
8d21b09a ER |
105 | %postun |
106 | %systemd_reload | |
3d3e66ca ER |
107 | |
108 | %files | |
109 | %defattr(644,root,root,755) | |
8d21b09a ER |
110 | %doc AUTHORS NEWS README THANKS examples |
111 | %doc doc/firehol/firehol-manual.{pdf,html} | |
112 | %doc doc/fireqos/fireqos-manual.{pdf,html} | |
3d3e66ca | 113 | %dir %{_sysconfdir}/firehol |
8d21b09a ER |
114 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf |
115 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf | |
116 | %{_sysconfdir}/%{name}/*.example | |
117 | %dir %{_sysconfdir}/%{name}/services | |
118 | %{_sysconfdir}/%{name}/services/*.example | |
119 | %attr(755,root,root) %{_sbindir}/firehol | |
120 | %attr(755,root,root) %{_sbindir}/fireqos | |
3d3e66ca ER |
121 | %{_mandir}/man1/*.1* |
122 | %{_mandir}/man5/*.5* | |
8d21b09a ER |
123 | %{systemdunitdir}/firehol.service |
124 | %{systemdunitdir}/fireqos.service | |
125 | %{_localstatedir}/spool/%{name} |