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