Summary(pl.UTF-8): Shoreline Firewall - zapora sieciowa oparta na iptables
Name: shorewall
Version: 5.2.0.4
-Release: 0.1
+Release: 2
License: GPL
Group: Networking/Utilities
Source0: http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-%{version}.tar.bz2
Patch1: tld.patch
Patch2: man.patch
Patch3: init.patch
+Patch4: shell-fix.patch
URL: http://www.shorewall.net/
BuildRequires: perl
BuildRequires: perl(Digest::SHA)
BuildRequires: bash >= 4.0
BuildRequires: sed
+Requires: bash >= 4.0
Requires: %{name}-core = %{version}-%{release}
Requires: iproute2
Requires: iptables
+Requires: perl-modules
Requires(post): /sbin/chkconfig
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# Remove hash-bang from files which are not directly executed as shell
# scripts. This silences some rpmlint errors.
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall
targets="shorewall-core shorewall shorewall-lite shorewall6 shorewall6-lite shorewall-init"
for i in $targets; do
cd -
done
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+/sbin/chkconfig --add shorewall
+%service shorewall restart "Shorewall"
+
+%preun
+if [ "$1" = "0" ]; then
+ %service shorewall stop
+ /sbin/chkconfig --del shorewall
+fi
+
%files
%defattr(644,root,root,755)
%doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}