[packages/miniupnpd] - updated to 1.7 - fixed build with iptables >= 1.4.3 - added try-restart action to init script

qboosh qboosh at pld-linux.org
Tue Feb 5 16:26:57 CET 2013


commit 322a58cbde9c11343350a179b6d413cdbf5b36d4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 5 16:28:03 2013 +0100

    - updated to 1.7
    - fixed build with iptables >= 1.4.3
    - added try-restart action to init script

 miniupnpd.init | 12 +++++++++++-
 miniupnpd.spec | 24 +++++++++---------------
 2 files changed, 20 insertions(+), 16 deletions(-)
---
diff --git a/miniupnpd.spec b/miniupnpd.spec
index 706ba25..0bc0a12 100644
--- a/miniupnpd.spec
+++ b/miniupnpd.spec
@@ -1,29 +1,22 @@
-# TODO
-# - iptables or kernel headers messup:
-# - th:
-#   linux/iptcrdr.c:17:22: error: iptables.h: No such file or directory
-#   linux/iptcrdr.c:18:41: error: linux/netfilter_ipv4/ip_nat.h: No such file or directory
-#   linux/iptcrdr.c: In function 'get_redirect_rule':
-# - ac:
-#   netfilter/iptcrdr.c:23:36: linux/netfilter/nf_nat.h: No such file or directory
 Summary:	Small UPnP Daemon
 Summary(pl.UTF-8):	Mały demon UPnP
 Name:		miniupnpd
-Version:	1.2
-Release:	0.1
+Version:	1.7
+Release:	1
 License:	BSD
-Group:		Applications
+Group:		Networking/Daemons
 Source0:	http://miniupnp.tuxfamily.org/files/%{name}-%{version}.tar.gz
-# Source0-md5:	48f1fa81e5c2cb1c561c29cdcf261602
+# Source0-md5:	5af9e8332d34a7b490d0d2ed3e674196
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}.conf
 URL:		http://miniupnp.tuxfamily.org/
-BuildRequires:	iptables-devel
+BuildRequires:	iptables-devel >= 1.4.3
 BuildRequires:	rpmbuild(macros) >= 1.228
 Requires(post):	libuuid
 Requires(post):	sed >= 4.0
 Requires(post,preun):	/sbin/chkconfig
+Requires:	iptables-libs >= 1.4.3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,7 +31,8 @@ Mały demon UPnP.
 %build
 %{__make} -f Makefile.linux \
 	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} -Wall -D_GNU_SOURCE"
+	CFLAGS="%{rpmcflags} -fno-strict-aliasing -Wall -D_GNU_SOURCE -DIPTABLES_143" \
+	LIBS="-lip4tc -lip6tc"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -77,7 +71,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc README
+%doc Changelog.txt LICENSE README
 %attr(755,root,root) %{_sbindir}/miniupnpd
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
diff --git a/miniupnpd.init b/miniupnpd.init
index 8ab4e22..7a4972e 100644
--- a/miniupnpd.init
+++ b/miniupnpd.init
@@ -80,6 +80,16 @@ case "$1" in
 		start
 	fi
 	;;
+  try-restart)
+        if [ -f /var/lock/subsys/miniupnpd ]; then
+		msg_stopping miniupnpd
+		stop
+		msg_starting miniupnpd
+		start
+		RETVAL=$?
+	# else return successfully
+	fi
+	;;
   reload|graceful|force-reload)
 	if [ -f /var/lock/subsys/miniupnpd ]; then
 		msg_reloading miniupnpd
@@ -91,7 +101,7 @@ case "$1" in
 	fi
 	;;
   *)
-	msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
+	msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|graceful|status}"
 	exit 3
 	;;
 esac
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/miniupnpd.git/commitdiff/322a58cbde9c11343350a179b6d413cdbf5b36d4



More information about the pld-cvs-commit mailing list