#
-# Copyright (C) 2010-2011 OpenWrt.org
+# Copyright (C) 2010-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpc
-PKG_VERSION:=1.6
+PKG_VERSION:=1.7
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=88055f2d4a061cfd4cfe25a9eae22f67
+PKG_MD5SUM:=297bee441b56af87c6622fc4002179fd
PKG_INSTALL:=1
TARGET_CFLAGS += $(FPIC)
MAKE_FLAGS += \
+ OS="Linux" \
PREFIX="$(PKG_INSTALL_DIR)"
define Build/InstallDev
--- a/Makefile
+++ b/Makefile
-@@ -107,8 +107,8 @@ installpythonmodule: pythonmodule
+@@ -129,8 +129,8 @@ installpythonmodule: pythonmodule
python setup.py install
validateminixml: minixmlvalid
+# ./minixmlvalid
touch $@
- clean:
+ validateminiwget: testminiwget minihttptestserver testminiwget.sh
--- a/upnpcommands.c
+++ b/upnpcommands.c
-@@ -351,7 +351,7 @@ UPNP_AddPortMapping(const char * control
+@@ -367,7 +367,7 @@ UPNP_AddPortMapping(const char * control
AddPortMappingArgs[5].elt = "NewEnabled";
AddPortMappingArgs[5].val = "1";
AddPortMappingArgs[6].elt = "NewPortMappingDescription";
- AddPortMappingArgs[6].val = desc?desc:"libminiupnpc";
+ AddPortMappingArgs[6].val = desc?desc:"miniupnpc";
AddPortMappingArgs[7].elt = "NewLeaseDuration";
- AddPortMappingArgs[7].val = "0";
- if(simpleUPnPcommand(-1, controlURL, servicetype, "AddPortMapping", AddPortMappingArgs, buffer, &bufsize) < 0) {
+ AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0";
+ if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,