]> TLD Linux GIT Repositories - packages/shorewall.git/blobdiff - shorewall.spec
- updated to 5.2.2
[packages/shorewall.git] / shorewall.spec
index caf7dabfde0b7b9c56ce29a0e85aaf2cfcfa6047..b9698c0c442c5fb4c035ed643b3fe33e321391f8 100644 (file)
@@ -1,33 +1,37 @@
 # NOTE:
 # A very helpful document for packaging Shorewall is "Anatomy of Shorewall 4.0"
 # which is found at http://www.shorewall.net/Anatomy.html
-# TODO
-# - rc-script inits
+#
+%define                ver     5.2.2
+%define                rel     %{nil}
+
 Summary:       Shoreline Firewall - an iptables-based firewall for Linux systems
 Summary(pl.UTF-8):     Shoreline Firewall - zapora sieciowa oparta na iptables
 Name:          shorewall
-Version:       5.2.0.4
+Version:       %{ver}%{rel}
 Release:       1
 License:       GPL
 Group:         Networking/Utilities
-Source0:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-%{version}.tar.bz2
-# Source0-md5: b8702d14846f890d263f5ea2447b5bed
-Source1:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-lite-%{version}.tar.bz2
-# Source1-md5: 0dd43f44f7555418ae2f153fbf7ce1ef
-Source2:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}6-%{version}.tar.bz2
-# Source2-md5: 14c87b9880bc69c82792854af45335e6
-Source3:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}6-lite-%{version}.tar.bz2
-# Source3-md5: 9f03407f5f7dac39f286bdaf3ec051e8
-Source4:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-init-%{version}.tar.bz2
-# Source4-md5: cf6b2a6c1a8827a99c1b3e717d42ccff
-Source5:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-5.2.0/%{name}-core-%{version}.tar.bz2
-# Source5-md5: be73e2f76b2438e7813f62873a50c203
+Source0:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-%{version}.tar.bz2
+# Source0-md5: eb4328784fbb87fd05b6a06d8745884d
+Source1:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-lite-%{version}.tar.bz2
+# Source1-md5: 878021766c6dac6e2249af4429d67656
+Source2:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}6-%{version}.tar.bz2
+# Source2-md5: 2cac9bdce4facd72961e0c38de5a5d74
+Source3:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}6-lite-%{version}.tar.bz2
+# Source3-md5: 625ce2ddc0949ba6cfe403be07467bdd
+Source4:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-init-%{version}.tar.bz2
+# Source4-md5: 91224247a67a57572d91f0a01e101308
+Source5:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-core-%{version}.tar.bz2
+# Source5-md5: bbd2d59d3a08c08ff67955c11a4bb065
 Source10:      %{name}.init
+Source11:      %{name}.logrotate
 Patch0:                %{name}-config.patch
-Patch1:                tld.patch
-Patch2:                man.patch
-Patch3:                init.patch
-Patch4:                shell-fix.patch
+Patch1:                %{name}-logging.patch
+Patch2:                tld.patch
+Patch3:                man.patch
+Patch4:                init.patch
+Patch5:                shell-fix.patch
 URL:           http://www.shorewall.net/
 BuildRequires: perl
 BuildRequires: perl(Digest::SHA)
@@ -107,6 +111,7 @@ rule compiler installed.
 %package core
 Summary:       Core libraries for Shorewall
 Group:         Applications/System
+Requires:      logrotate
 
 %description core
 This package contains the core libraries for Shorewall.
@@ -135,14 +140,16 @@ and shutdown.
 %setup -qcT -a0 -a1 -a2 -a3 -a4 -a5
 targets="shorewall-core shorewall shorewall-lite shorewall6 shorewall6-lite shorewall-init"
 for i in $targets; do
-       cp -p $i-%{version}/shorewallrc.{redhat,tld}
-       %{__sed} -i -r -e 's!RedHat/Fedora!TLD !; s/^HOST\=redhat/HOST\=tld/; /^(SERVICEDIR|SERVICEFILE)/d;' $i-%{version}/shorewallrc.tld
+        mv $i-%{version} $i
+       cp -p $i/shorewallrc.{redhat,tld}
+       %{__sed} -i -r -e 's!RedHat/Fedora!TLD !; s/^HOST\=redhat/HOST\=tld/; /^(SERVICEDIR|SERVICEFILE)/d;' $i/shorewallrc.tld
 done
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 # Remove hash-bang from files which are not directly executed as shell
 # scripts. This silences some rpmlint errors.
@@ -153,7 +160,7 @@ rm -rf $RPM_BUILD_ROOT
 
 targets="shorewall-core shorewall shorewall-lite shorewall6 shorewall6-lite shorewall-init"
 for i in $targets; do
-       cd $i-%{version}
+       cd $i
        ./configure \
                VENDOR=tld \
                LIBEXECDIR=%{_libexecdir} \
@@ -166,6 +173,7 @@ done
 
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall
+install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/shorewall
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -182,11 +190,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}
+%doc shorewall/{COPYING,changelog.txt,releasenotes.txt,Samples}
 %attr(755,root,root) %{_sbindir}/shorewall
 %dir %{_sysconfdir}/shorewall
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall/*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-init
 %{_datadir}/shorewall/action.*
 %{_datadir}/shorewall/actions.std
 %{_datadir}/shorewall/configfiles/
@@ -214,11 +222,11 @@ fi
 
 %files lite
 %defattr(644,root,root,755)
-%doc shorewall-lite-%{version}/{COPYING,changelog.txt,releasenotes.txt}
+%doc shorewall-lite/{COPYING,changelog.txt,releasenotes.txt}
 %attr(755,root,root) %{_sbindir}/shorewall-lite
 %dir %{_sysconfdir}/shorewall-lite
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall-lite/shorewall-lite.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-lite
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-lite-init
 %{_datadir}/shorewall-lite
 %{_libexecdir}/shorewall-lite
 %{_mandir}/man5/shorewall-lite*
@@ -228,11 +236,11 @@ fi
 
 %files -n shorewall6
 %defattr(644,root,root,755)
-%doc shorewall6-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples6}
+%doc shorewall6/{COPYING,changelog.txt,releasenotes.txt,Samples6}
 %attr(755,root,root) %{_sbindir}/shorewall6
 %dir %{_sysconfdir}/shorewall6
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall6/*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-init
 %{_mandir}/man5/shorewall6*
 %exclude %{_mandir}/man5/shorewall6-lite*
 %{_mandir}/man8/shorewall6*
@@ -243,11 +251,11 @@ fi
 
 %files -n shorewall6-lite
 %defattr(644,root,root,755)
-%doc shorewall6-lite-%{version}/{COPYING,changelog.txt,releasenotes.txt}
+%doc shorewall6-lite/{COPYING,changelog.txt,releasenotes.txt}
 %attr(755,root,root) %{_sbindir}/shorewall6-lite
 %dir %{_sysconfdir}/shorewall6-lite
 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shorewall6-lite/shorewall6-lite.conf
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-lite
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall6-lite-init
 %{_mandir}/man5/shorewall6-lite*
 %{_mandir}/man8/shorewall6-lite*
 %{_datadir}/shorewall6-lite
@@ -258,7 +266,8 @@ fi
 
 %files core
 %defattr(644,root,root,755)
-%doc shorewall-core-%{version}/{COPYING,changelog.txt,releasenotes.txt}
+%doc shorewall-core/{COPYING,changelog.txt,releasenotes.txt}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall
 %dir %{_datadir}/shorewall/
 %{_datadir}/shorewall/coreversion
 %{_datadir}/shorewall/functions
@@ -271,11 +280,11 @@ fi
 
 %files init
 %defattr(644,root,root,755)
-%doc shorewall-init-%{version}/{COPYING,changelog.txt,releasenotes.txt}
+%doc shorewall-init/{COPYING,changelog.txt,releasenotes.txt}
 %attr(755,root,root) %{_sbindir}/shorewall-init
 %attr(755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/01-shorewall
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/shorewall-init
-/etc/logrotate.d/shorewall-init
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/shorewall-ifupdown
 %{_mandir}/man8/shorewall-init.8.*
 %{_datadir}/shorewall-init
 %dir %{_libexecdir}/shorewall-init