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