define Package/miniupnpd
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables
+ DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid
TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
SUBMENU:=Firewall
URL:=http://miniupnp.free.fr/
endef
MAKE_FLAGS += \
- TEST=0 \
+ TARGET_OPENWRT=1 TEST=0 \
LIBS="" \
- CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc $(if $(CONFIG_IPV6),-lip6tc)" \
+ CC="$(TARGET_CC) -DIPTABLES_143 \
+ -lip4tc $(if $(CONFIG_IPV6),-lip6tc) -luuid" \
CONFIG_OPTIONS="$(if $(CONFIG_IPV6),--ipv6) --leasefile" \
-f Makefile.linux \
miniupnpd
+++ /dev/null
---- a/Makefile.linux
-+++ b/Makefile.linux
-@@ -147,7 +147,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
- LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
- endif # ($(TEST),1)
-
--LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
-+# n/a - we don't enable https server for IGD v2 anyway
-+#LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
-
- TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
-
--- /dev/null
+We do not need to autodetect SSL/UUID; SSL we do not support, UUID we always do.
+
+diff --git a/miniupnpd/Makefile.linux b/miniupnpd/Makefile.linux
+index 2d28126..01daeea 100644
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -153,14 +153,18 @@ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libmnl)
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
+ endif # ($(TEST),1)
+
++ifeq ($(TARGET_OPENWRT),)
++# n/a - we don't enable https server for IGD v2 anyway in OpenWrt
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
+
++# n/a - we hardcodedly support libuuid
+ TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
+ ifeq ($(TEST),1)
+ LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l uuid)
+ else
+ $(info please install uuid-dev package / libuuid)
+ endif # ($(TEST),1)
++endif
+
+ TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
+
--- /dev/null
+As it turns out, the 'magic' libuuid/bsd uuid check just checks
+outside buildtree altogether for the uuid_generate. So we just
+hardcode it.
+
+--- a/genconfig.sh
++++ b/genconfig.sh
+@@ -367,12 +367,7 @@ case $FW in
+ esac
+
+ # UUID API
+-if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
+- echo "#define BSD_UUID" >> ${CONFIGFILE}
+-fi
+-if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
+- echo "#define LIB_UUID" >> ${CONFIGFILE}
+-fi
++echo "#define LIB_UUID" >> ${CONFIGFILE}
+
+ # set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
+ if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then