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