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
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
-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
--
- 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)
++#LIBS = $(BUILD_DIR)/iptables-1.3.3/libiptc/libiptc.a
+ #LIBS = $(TOPDIR)/../iptables-1.3.3/libiptc/libiptc.a
+ TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
-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 $
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 $
--- /dev/null
+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