]> git.pld-linux.org Git - packages/firehol.git/blob - firehol.spec
cleanup superfluous deps for build
[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.1
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 %description
42 FireHOL is a generic firewall generator, meaning that you can design
43 any kind of local or routing stateful packet filtering firewalls with
44 ease. Install FireHOL if you want an easy way to configure stateful
45 packet filtering firewalls on Linux hosts and routers.
46
47 FireHOL uses an extremely simple but powerful way to define firewall
48 rules which it turns into complete stateful iptables firewalls.
49
50 You can run FireHOL with the 'helpme' argument, to get a configuration
51 file for the system run, which you can modify according to your needs.
52 The default configuration file will allow only client traffic on all
53 interfaces.
54
55 %prep
56 %setup -q
57
58 %build
59 # 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
60 %configure \
61         BASH_SHELL_PATH=/bin/bash \
62         BRIDGE=/sbin/bridge \
63         CAT=/bin/cat \
64         CHMOD=/bin/chmod \
65         CHOWN=/bin/chown \
66         CP=/bin/cp \
67         CURL=/usr/bin/curl \
68         CUT=/usr/bin/cut \
69         DATE=/bin/date \
70         DIFF=/usr/bin/diff \
71         DIRNAME=/usr/bin/dirname \
72         ENV=/usr/bin/env \
73         EXPR=/usr/bin/expr \
74         FIND=/usr/bin/find \
75         FLOCK=/usr/bin/flock \
76         FOLD=/usr/bin/fold \
77         FUNZIP=/usr/bin/funzip \
78         GAWK=/usr/bin/gawk \
79         GIT=/usr/bin/git \
80         HEAD=/usr/bin/head \
81         HOSTNAMECMD=/bin/hostname \
82         IP6TABLES=/usr/sbin/ip6tables \
83         IP6TABLES_RESTORE=/usr/sbin/ip6tables-restore \
84         IP6TABLES_SAVE=/usr/sbin/ip6tables-save \
85         IP=/sbin/ip \
86         IPRANGE=/usr/bin/iprange \
87         IPSET=/usr/sbin/ipset \
88         IPTABLES=/usr/sbin/iptables \
89         IPTABLES_RESTORE=/usr/sbin/iptables-restore \
90         IPTABLES_SAVE=/usr/sbin/iptables-save \
91         LN=/bin/ln \
92         LOGGER=/usr/bin/logger \
93         LS=/bin/ls \
94         LSMOD=/sbin/lsmod \
95         MKDIR=/bin/mkdir \
96         MKTEMP=/bin/mktemp \
97         MODPROBE=/sbin/insmod \
98         MODPROBE=/sbin/modprobe \
99         MORE=/bin/more \
100         MV=/bin/mv \
101         NEATO=/usr/bin/neato \
102         PING6=/usr/bin/ping6 \
103         PING=/usr/bin/ping \
104         RENICE=/usr/bin/renice \
105         RM=/bin/rm \
106         RMMOD=/sbin/rmmod \
107         SCREEN=/usr/bin/screen \
108         SEQ=/usr/bin/seq \
109         SH=/bin/sh \
110         SLEEP=/bin/sleep \
111         SORT=/bin/sort \
112         SS=/sbin/ss \
113         STTY=/bin/stty \
114         SYSCTL=/sbin/sysctl \
115         TAIL=/usr/bin/tail \
116         TAR=/bin/tar \
117         TC=/sbin/tc \
118         TCPDUMP=/usr/sbin/tcpdump \
119         TOUCH=/bin/touch \
120         TPUT=/usr/bin/tput \
121         TR=/usr/bin/tr \
122         TRACEROUTE=/usr/bin/traceroute \
123         UNAME=/bin/uname \
124         UNIQ=/usr/bin/uniq \
125         UNZIP=/usr/bin/unzip \
126         WC=/usr/bin/wc \
127         WGET=/usr/bin/wget \
128         WHOIS=/usr/bin/whois \
129         ZCAT=/bin/zcat \
130         %{nil}
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 %{__make} install \
137         DESTDIR=$RPM_BUILD_ROOT
138
139 # Hack for documentation without crufts.
140 rm -frv $RPM_BUILD_ROOT%{_docdir}
141 find examples/ -name "Makefile*" -delete -print
142
143 # Install systemd units.
144 install -d $RPM_BUILD_ROOT%{systemdunitdir}
145 cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
146
147 # Install runtime directories.
148 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
149 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
150
151 # Ghost configurations.
152 touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
153       $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
154
155 %clean
156 rm -rf $RPM_BUILD_ROOT
157
158 %post
159 /sbin/chkconfig --add firehol
160 %service firehol restart
161 %systemd_post firehol.service
162 %systemd_post fireqos.service
163
164 %preun
165 if [ "$1" = 0 ]; then
166         %service firehol stop
167         /sbin/chkconfig --del firehol
168 fi
169 %systemd_preun firehol.service
170 %systemd_preun fireqos.service
171
172 %postun
173 %systemd_reload
174
175 %files
176 %defattr(644,root,root,755)
177 %doc README THANKS examples
178 %doc doc/firehol/firehol-manual.{pdf,html}
179 %doc doc/fireqos/fireqos-manual.{pdf,html}
180 %dir %{_sysconfdir}/firehol
181 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
182 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
183 %{_sysconfdir}/%{name}/*.example
184 %dir %{_sysconfdir}/%{name}/services
185 %{_sysconfdir}/%{name}/services/*.example
186 %attr(755,root,root) %{_sbindir}/firehol
187 %attr(755,root,root) %{_sbindir}/fireqos
188 %{_mandir}/man1/*.1*
189 %{_mandir}/man5/*.5*
190 %{systemdunitdir}/firehol.service
191 %{systemdunitdir}/fireqos.service
192 %{_localstatedir}/spool/%{name}
This page took 0.051958 seconds and 3 git commands to generate.