]> git.pld-linux.org Git - packages/firehol.git/blob - firehol.spec
doc subpackage
[packages/firehol.git] / firehol.spec
1 # TODO
2 # - pldize initscript
3 # - unbash initscript
4 # - recheck deps
5 # - update configure not to require tools at build time
6 Summary:        Simple and powerful firewall and traffic shaping languages
7 Name:           firehol
8 Version:        3.0.1
9 Release:        0.2
10 License:        GPL v2+
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:  hostname
18 BuildRequires:  iprange >= 1.0.2
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  wget
21 BuildRequires:  xz
22 Requires(post,preun):   /sbin/chkconfig
23 Requires:       coreutils
24 Requires:       gawk >= 3.0
25 Requires:       grep >= 2.4.2
26 Requires:       gzip
27 Requires:       hostname
28 Requires:       iproute2 >= 2.2.4
29 Requires:       ipset
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 %define         _libdir %{_prefix}/lib
42
43 %description
44 FireHOL is a generic firewall generator, meaning that you can design
45 any kind of local or routing stateful packet filtering firewalls with
46 ease. Install FireHOL if you want an easy way to configure stateful
47 packet filtering firewalls on Linux hosts and routers.
48
49 FireHOL uses an extremely simple but powerful way to define firewall
50 rules which it turns into complete stateful iptables firewalls.
51
52 You can run FireHOL with the 'helpme' argument, to get a configuration
53 file for the system run, which you can modify according to your needs.
54 The default configuration file will allow only client traffic on all
55 interfaces.
56
57 %package doc
58 Summary:        Documentation for firehol
59 Group:          Documentation
60
61 %description doc
62 Documentation for firehol.
63
64 %prep
65 %setup -q
66
67 %build
68 # grep -E 'AX_NEED_PROG|AX_CHECK_PROG' configure.ac |sort -u|sed -rne 's/.+\(\[([^]]+)\], \[([^]]+)\].+/echo \1=`PATH=$PATH:\/usr\/sbin which \2` \\\\/p'|sh
69 %configure \
70         FIREHOL_AUTOSAVE=/etc/sysconfig/iptables \
71         FIREHOL_AUTOSAVE6=/etc/sysconfig/ip6tables \
72         \
73         BASH_SHELL_PATH=/bin/bash \
74         BRIDGE=/sbin/bridge \
75         CAT=/bin/cat \
76         CHMOD=/bin/chmod \
77         CHOWN=/bin/chown \
78         CP=/bin/cp \
79         CURL=/usr/bin/curl \
80         CUT=/usr/bin/cut \
81         DATE=/bin/date \
82         DIFF=/usr/bin/diff \
83         DIRNAME=/usr/bin/dirname \
84         ENV=/usr/bin/env \
85         EXPR=/usr/bin/expr \
86         FIND=/usr/bin/find \
87         FLOCK=/usr/bin/flock \
88         FOLD=/usr/bin/fold \
89         FUNZIP=/usr/bin/funzip \
90         GAWK=/usr/bin/gawk \
91         GIT=/usr/bin/git \
92         HEAD=/usr/bin/head \
93         HOSTNAMECMD=/bin/hostname \
94         IP6TABLES=/usr/sbin/ip6tables \
95         IP6TABLES_RESTORE=/usr/sbin/ip6tables-restore \
96         IP6TABLES_SAVE=/usr/sbin/ip6tables-save \
97         IP=/sbin/ip \
98         IPRANGE=/usr/bin/iprange \
99         IPSET=/usr/sbin/ipset \
100         IPTABLES=/usr/sbin/iptables \
101         IPTABLES_RESTORE=/usr/sbin/iptables-restore \
102         IPTABLES_SAVE=/usr/sbin/iptables-save \
103         LN=/bin/ln \
104         LOGGER=/usr/bin/logger \
105         LS=/bin/ls \
106         LSMOD=/sbin/lsmod \
107         MKDIR=/bin/mkdir \
108         MKTEMP=/bin/mktemp \
109         MODPROBE=/sbin/insmod \
110         MODPROBE=/sbin/modprobe \
111         MORE=/bin/more \
112         MV=/bin/mv \
113         NEATO=/usr/bin/neato \
114         PING6=/usr/bin/ping6 \
115         PING=/usr/bin/ping \
116         RENICE=/usr/bin/renice \
117         RM=/bin/rm \
118         RMMOD=/sbin/rmmod \
119         SCREEN=/usr/bin/screen \
120         SEQ=/usr/bin/seq \
121         SH=/bin/sh \
122         SLEEP=/bin/sleep \
123         SORT=/bin/sort \
124         SS=/sbin/ss \
125         STTY=/bin/stty \
126         SYSCTL=/sbin/sysctl \
127         TAIL=/usr/bin/tail \
128         TAR=/bin/tar \
129         TC=/sbin/tc \
130         TCPDUMP=/usr/sbin/tcpdump \
131         TOUCH=/bin/touch \
132         TPUT=/usr/bin/tput \
133         TR=/usr/bin/tr \
134         TRACEROUTE=/usr/bin/traceroute \
135         UNAME=/bin/uname \
136         UNIQ=/usr/bin/uniq \
137         UNZIP=/usr/bin/unzip \
138         WC=/usr/bin/wc \
139         WGET=/usr/bin/wget \
140         WHOIS=/usr/bin/whois \
141         ZCAT=/bin/zcat \
142         %{nil}
143
144 %{__make}
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148 %{__make} install \
149         INSTALL="install -p" \
150         contribdir=%{_examplesdir}/%{name}-%{version}/contrib \
151         examplesdir=%{_examplesdir}/%{name}-%{version} \
152         htmldir=%{_docdir}/%{name}-doc-%{version} \
153         pdfdir=%{_docdir}/%{name}-doc-%{version} \
154         DESTDIR=$RPM_BUILD_ROOT
155
156
157 # Install systemd units.
158 install -d $RPM_BUILD_ROOT%{systemdunitdir}
159 cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
160
161 # Install runtime directories.
162 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
163 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
164
165 # Ghost configurations.
166 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
167       $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
168
169 %clean
170 rm -rf $RPM_BUILD_ROOT
171
172 %post
173 /sbin/chkconfig --add firehol
174 %service firehol restart
175 %systemd_post firehol.service
176 %systemd_post fireqos.service
177
178 %preun
179 if [ "$1" = 0 ]; then
180         %service firehol stop
181         /sbin/chkconfig --del firehol
182 fi
183 %systemd_preun firehol.service
184 %systemd_preun fireqos.service
185
186 %postun
187 %systemd_reload
188
189 %files
190 %defattr(644,root,root,755)
191 %doc README THANKS
192 %dir %{_sysconfdir}/firehol
193 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
194 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
195 %{_sysconfdir}/%{name}/*.example
196 %dir %{_sysconfdir}/%{name}/services
197 %{_sysconfdir}/%{name}/services/*.example
198 %attr(755,root,root) %{_sbindir}/firehol
199 %attr(755,root,root) %{_sbindir}/fireqos
200 %attr(755,root,root) %{_sbindir}/link-balancer
201 %attr(755,root,root) %{_sbindir}/update-ipsets
202 %attr(755,root,root) %{_sbindir}/vnetbuild
203 %dir %{_libdir}/firehol
204 %{_libdir}/firehol/functions.common.sh
205 %{_datadir}/update-ipsets
206 %{_mandir}/man1/firehol.1*
207 %{_mandir}/man1/fireqos.1*
208 %{_mandir}/man1/vnetbuild.1*
209 %{_mandir}/man5/firehol*.5*
210 %{_mandir}/man5/fireqos*.5*
211 %{_mandir}/man5/vnetbuild*.5*
212 %{systemdunitdir}/firehol.service
213 %{systemdunitdir}/fireqos.service
214 %{_localstatedir}/spool/%{name}
215
216 %files doc
217 %defattr(644,root,root,755)
218 %doc %{_docdir}/%{name}-doc-%{version}
219 %{_examplesdir}/%{name}-%{version}
This page took 0.073777 seconds and 3 git commands to generate.