From fff24b0be7ed2e54023048f964eb2d1868c6b6eb Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 20 May 2008 10:06:16 +0000 Subject: [PATCH] Upgrade miniupnpd to 1.1, thanks Nanard git-svn-id: svn://svn.openwrt.org/openwrt/packages@11219 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/miniupnpd/Makefile | 6 +-- .../patches/001-makefile-tweaks.patch | 46 +++++++++---------- .../100-iptables-wan-device-name.patch | 12 ++--- .../patches/101-config.h.openwrt.patch | 38 +++++++++++++++ 4 files changed, 68 insertions(+), 34 deletions(-) create mode 100644 net/miniupnpd/patches/101-config.h.openwrt.patch diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index 2cc7baf83..6f05c3cff 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd -PKG_VERSION:=1.0-RC8 +PKG_VERSION:=1.1 PKG_RELEASE:=1 -PKG_MD5SUM:=54536b268f630449e9ecb0e2552a1d52 +PKG_MD5SUM:=a0f6651476721db9b554668c8c83b151 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -41,7 +41,7 @@ endef define Package/miniupnpd/install $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/*.sh $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/netfilter/*.sh $(1)/usr/bin/ $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd $(INSTALL_DATA) ./files/upnpd.config $(1)/etc/config/upnpd $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/20-miniupnpd diff --git a/net/miniupnpd/patches/001-makefile-tweaks.patch b/net/miniupnpd/patches/001-makefile-tweaks.patch index 8a2be093b..1af76c5f2 100644 --- a/net/miniupnpd/patches/001-makefile-tweaks.patch +++ b/net/miniupnpd/patches/001-makefile-tweaks.patch @@ -1,39 +1,35 @@ -Index: miniupnpd-1.0-RC8/Makefile.openwrt +Index: Makefile.openwrt =================================================================== ---- miniupnpd-1.0-RC8.orig/Makefile.openwrt 2007-09-17 17:43:54.000000000 -0500 -+++ miniupnpd-1.0-RC8/Makefile.openwrt 2007-09-17 17:43:54.000000000 -0500 -@@ -2,7 +2,7 @@ - # http://miniupnp.free.fr/ - # Author : Thomas Bernard - # for use with GNU Make +RCS file: /usr/local/cvsroot/miniupnp/miniupnpd/Makefile.openwrt,v +retrieving revision 1.11 +diff -u -r1.11 miniupnpd-1.1/Makefile.openwrt +--- miniupnpd-1.1.orig/Makefile.openwrt 29 Jan 2008 12:52:03 -0000 1.11 ++++ miniupnpd-1.1/Makefile.openwrt 1 May 2008 22:34:28 -0000 +@@ -6,7 +6,7 @@ + # your openwrt SDK/etc... + # http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=713 + -include $(TOPDIR)/rules.mk -+ ++#include $(TOPDIR)/rules.mk #CFLAGS = -Wall -O -D_GNU_SOURCE -g #CFLAGS = -Wall -Os -D_GNU_SOURCE #CC = mipsel-linux-gcc -@@ -11,7 +11,7 @@ - CFLAGS += -D_GNU_SOURCE +@@ -16,7 +16,8 @@ + CP = cp RM = rm -f INSTALL = install -IPTABLESINC=$(BUILD_DIR)/iptables-1.3.3/include +IPTABLESINC=$(STAGING_DIR)/usr/include ++#IPTABLESINC=$(BUILD_DIR)/iptables-1.3.3/include + #IPTABLESINC=$(TOPDIR)/../iptables-1.3.3/include BASEOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \ - upnpreplyparse.o minixml.o \ -@@ -20,8 +20,6 @@ - - LNXOBJS = linux/getifstats.o linux/iptcrdr.o +@@ -28,7 +29,7 @@ + NETFILTEROBJS = netfilter/iptcrdr.o + ALLOBJS = $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) -LIBS = $(BUILD_DIR)/iptables-1.3.3/libiptc/libiptc.a -- ++#LIBS = $(BUILD_DIR)/iptables-1.3.3/libiptc/libiptc.a + #LIBS = $(TOPDIR)/../iptables-1.3.3/libiptc/libiptc.a + TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o - - EXECUTABLES = miniupnpd testupnpdescgen -@@ -38,6 +36,7 @@ - @echo no install for now... - - miniupnpd: $(BASEOBJS) $(LNXOBJS) $(LIBS) -+ $(CC) $(CFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS) - - testupnpdescgen: $(TESTUPNPDESCGENOBJS) - diff --git a/net/miniupnpd/patches/100-iptables-wan-device-name.patch b/net/miniupnpd/patches/100-iptables-wan-device-name.patch index 000cc23a2..cd870708d 100644 --- a/net/miniupnpd/patches/100-iptables-wan-device-name.patch +++ b/net/miniupnpd/patches/100-iptables-wan-device-name.patch @@ -1,7 +1,7 @@ -Index: miniupnpd-1.0-RC8/linux/iptables_init.sh +Index: miniupnpd-1.1/netfilter/iptables_init.sh =================================================================== ---- miniupnpd-1.0-RC8.orig/linux/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500 -+++ miniupnpd-1.0-RC8/linux/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500 +--- miniupnpd-1.1.orig/netfilter/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500 ++++ miniupnpd-1.1/netfilter/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500 @@ -1,9 +1,12 @@ #! /bin/sh # $Id: iptables_init.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $ @@ -16,10 +16,10 @@ Index: miniupnpd-1.0-RC8/linux/iptables_init.sh EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" echo "External IP = $EXTIP" -Index: miniupnpd-1.0-RC8/linux/iptables_removeall.sh +Index: miniupnpd-1.1/netfilter/iptables_removeall.sh =================================================================== ---- miniupnpd-1.0-RC8.orig/linux/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500 -+++ miniupnpd-1.0-RC8/linux/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500 +--- miniupnpd-1.1.orig/netfilter/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500 ++++ miniupnpd-1.1/netfilter/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500 @@ -1,9 +1,12 @@ #! /bin/sh # $Id: iptables_removeall.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $ diff --git a/net/miniupnpd/patches/101-config.h.openwrt.patch b/net/miniupnpd/patches/101-config.h.openwrt.patch new file mode 100644 index 000000000..703821da2 --- /dev/null +++ b/net/miniupnpd/patches/101-config.h.openwrt.patch @@ -0,0 +1,38 @@ +Index: miniupnpd-1.1/config.h.openwrt +=================================================================== +RCS file: /usr/local/cvsroot/miniupnp/miniupnpd/miniupnpd-1.1/config.h.openwrt,v +retrieving revision 1.2 +diff -u -r1.2 miniupnpd-1.1/config.h.openwrt +--- miniupnpd-1.1/config.h.openwrt 26 Apr 2007 19:11:09 -0000 1.2 ++++ miniupnpd-1.1/config.h.openwrt 1 May 2008 22:47:17 -0000 +@@ -1,18 +1,27 @@ + /* $Id: miniupnpd-1.1/config.h.openwrt,v 1.2 2007/04/26 19:11:09 nanard Exp $ */ + /* MiniUPnP Project + * http:///miniupnp.free.fr +- * (c) 2006 Thomas Bernard ++ * (c) 2006-2008 Thomas Bernard + */ + #ifndef __CONFIG_H__ + #define __CONFIG_H__ + + #define UPNP_VERSION "20070228" +- ++#define USE_NETFILTER 1 + #define OS_NAME "OpenWRT" + /* OS/version */ +-#define OS_VERSION "OpenWRT/WhiteRussian" ++#define OS_VERSION "OpenWRT/kamikaze" + #define OS_URL "http://openwrt.org/" + + #define LOG_MINIUPNPD LOG_DAEMON ++ ++/* Comment the following line to disable NAT-PMP operations */ ++#define ENABLE_NATPMP ++ ++/* Comment the following line to use home made daemonize() func instead ++ * of BSD daemon() */ ++#define USE_DAEMON ++ ++#define ENABLE_L3F_SERVICE + + #endif