]> git.pld-linux.org Git - packages/firehol.git/commitdiff
up to 2.0.1
authorElan Ruusamäe <glen@delfi.ee>
Wed, 20 Apr 2016 21:29:18 +0000 (00:29 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 20 Apr 2016 21:29:42 +0000 (00:29 +0300)
rewritten using fedora package, 31cc95c

firehol.service [new file with mode: 0644]
firehol.spec
fireqos.service [new file with mode: 0644]

diff --git a/firehol.service b/firehol.service
new file mode 100644 (file)
index 0000000..cbfc8f1
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Firehol iptables stateful firewall
+Documentation=man:firehol(1) man:firehol.conf(5)
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/firehol start
+ExecStop=/usr/sbin/firehol stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
index 5143c8e7902a618dfcc6bc63a4ab87fbc34f8dac..15d21710f580bc7d707ff022d5c43c4e37144d95 100644 (file)
@@ -2,33 +2,39 @@
 # - pldize initscript
 # - unbash initscript
 # - recheck deps
 # - pldize initscript
 # - unbash initscript
 # - recheck deps
-Summary:       A powerful yet easy to use iptables frontend
+Summary:       Simple and powerful firewall and traffic shaping languages
 Name:          firehol
 Name:          firehol
-Version:       1.273
+Version:       2.0.1
 Release:       0.1
 License:       GPL v2+
 Group:         Applications/Networking
 Release:       0.1
 License:       GPL v2+
 Group:         Applications/Networking
-Source0:       http://downloads.sourceforge.net/firehol/%{name}-%{version}.tar.bz2
-# Source0-md5: cbbe1ba21cf44955827d5c906a55aa21
-Patch0:                pld.patch
-URL:           http://firehol.sourceforge.net
-BuildRequires: rpmbuild(macros) >= 1.228
-Requires:      bash >= 2.04
-Requires:      fileutils >= 4.0.36
+Source0:       http://firehol.org/download/firehol/releases/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: e2672c82b2b6012f9000c15c08c7dc89
+Source1:       %{name}.service
+Source2:       fireqos.service
+URL:           http://firehol.org
+BuildRequires: hostname
+BuildRequires: iproute2
+BuildRequires: iptables
+BuildRequires: procps
+BuildRequires: systemd-devel
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires(post,preun):  /sbin/chkconfig
+Requires:      coreutils
 Requires:      gawk >= 3.0
 Requires:      grep >= 2.4.2
 Requires:      gawk >= 3.0
 Requires:      grep >= 2.4.2
+Requires:      gzip
+Requires:      hostname
 Requires:      iproute2 >= 2.2.4
 Requires:      iptables >= 1.2.4
 Requires:      iproute2 >= 2.2.4
 Requires:      iptables >= 1.2.4
-Requires:      kernel >= 2.4
+Requires:      kmod
 Requires:      less
 Requires:      less
-Requires:      modutils >= 2.4.13
-Requires:      net-tools >= 1.57
-Requires:      sed >= 3.02
-Requires:      sh-utils >= 2.0
-Requires:      textutils >= 2.0.11
-Requires:      util-linux >= 2.11
-Requires(post,preun):  /sbin/chkconfig
+Requires:      procps
 Requires:      rc-scripts
 Requires:      rc-scripts
+Requires:      sed
+Requires:      uname(release) >= 2.4
+Requires:      util-linux >= 2.11
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -48,47 +54,67 @@ interfaces.
 
 %prep
 %setup -q
 
 %prep
 %setup -q
-%patch0 -p1
+
+%build
+%configure
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -D -p firehol.sh $RPM_BUILD_ROOT%{_initrddir}/firehol
-install -D -p examples/client-all.conf $RPM_BUILD_ROOT%{_sysconfdir}/firehol/firehol.conf
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 
-# Install man files
-install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5}
-install -p man/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1
-install -p man/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5
+# Hack for documentation without crufts.
+rm -frv $RPM_BUILD_ROOT%{_docdir}
+find examples/ -name "Makefile*" -delete -print
 
 
-# Executables
-install -d $RPM_BUILD_ROOT%{_libdir}/firehol
-install -p *.sh $RPM_BUILD_ROOT%{_libdir}/firehol
+# Install systemd units.
+install -d $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}
 
 
-# Install runtime directories
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/firehol/services
+# Install runtime directories.
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/services
 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
 
 install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/firehol
 
+# Ghost configurations.
+touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/firehol.conf \
+      $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/fireqos.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
 /sbin/chkconfig --add firehol
 %service firehol restart
 %post
 /sbin/chkconfig --add firehol
 %service firehol restart
+%systemd_post firehol.service
+%systemd_post fireqos.service
 
 %preun
 if [ "$1" = 0 ]; then
        %service firehol stop
        /sbin/chkconfig --del firehol
 fi
 
 %preun
 if [ "$1" = 0 ]; then
        %service firehol stop
        /sbin/chkconfig --del firehol
 fi
+%systemd_preun firehol.service
+%systemd_preun fireqos.service
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%postun
+%systemd_reload
 
 %files
 %defattr(644,root,root,755)
 
 %files
 %defattr(644,root,root,755)
-%doc README TODO ChangeLog WhatIsNew examples doc
+%doc AUTHORS NEWS README THANKS examples
+%doc doc/firehol/firehol-manual.{pdf,html}
+%doc doc/fireqos/fireqos-manual.{pdf,html}
 %dir %{_sysconfdir}/firehol
 %dir %{_sysconfdir}/firehol
-%config(noreplace) %{_sysconfdir}/firehol/firehol.conf
-%attr(754,root,root) /etc/rc.d/init.d/firehol
-%{_libdir}/firehol
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/firehol.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fireqos.conf
+%{_sysconfdir}/%{name}/*.example
+%dir %{_sysconfdir}/%{name}/services
+%{_sysconfdir}/%{name}/services/*.example
+%attr(755,root,root) %{_sbindir}/firehol
+%attr(755,root,root) %{_sbindir}/fireqos
 %{_mandir}/man1/*.1*
 %{_mandir}/man5/*.5*
 %{_mandir}/man1/*.1*
 %{_mandir}/man5/*.5*
-%{_sysconfdir}/firehol/services
-%{_localstatedir}/spool/firehol
+%{systemdunitdir}/firehol.service
+%{systemdunitdir}/fireqos.service
+%{_localstatedir}/spool/%{name}
diff --git a/fireqos.service b/fireqos.service
new file mode 100644 (file)
index 0000000..f998f96
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=FireQOS traffic shaping tool
+Documentation=man:fireqos(1) man:fireqos.conf(5)
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/fireqos start
+ExecStop=/usr/sbin/fireqos stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
This page took 0.044443 seconds and 4 git commands to generate.