Browse Source

Add miniupnpc

Steven Barth 10 years ago
parent
commit
1faebf9b28

+ 73
- 0
net/miniupnpc/Makefile View File

@@ -0,0 +1,73 @@
1
+#
2
+# Copyright (C) 2010-2012 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=miniupnpc
11
+PKG_VERSION:=1.9
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE_URL:=http://miniupnp.free.fr/files
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16
+PKG_MD5SUM:=5ef3ba321e6df72d6519b728b292073e
17
+PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
18
+
19
+PKG_INSTALL:=1
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/miniupnpc/Default
24
+  TITLE:=Lightweight UPnP
25
+  URL:=http://miniupnp.tuxfamily.org/
26
+endef
27
+
28
+define Package/miniupnpc
29
+  $(call Package/miniupnpc/Default)
30
+  SECTION:=net
31
+  CATEGORY:=Network
32
+  SUBMENU:=Firewall
33
+  TITLE+= client
34
+  DEPENDS:=+libminiupnpc
35
+endef
36
+
37
+define Package/libminiupnpc
38
+  $(call Package/miniupnpc/Default)
39
+  SECTION:=libs
40
+  CATEGORY:=Libraries
41
+  TITLE+= library
42
+endef
43
+
44
+TARGET_CFLAGS += $(FPIC)
45
+
46
+MAKE_FLAGS += \
47
+	OS="Linux" \
48
+
49
+define Build/InstallDev
50
+	$(INSTALL_DIR) $(1)/usr/include/miniupnpc
51
+	$(CP) \
52
+		$(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \
53
+		$(1)/usr/include/miniupnpc/
54
+	$(INSTALL_DIR) $(1)/usr/lib
55
+	$(CP) \
56
+		$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
57
+		$(1)/usr/lib/
58
+endef
59
+
60
+define Package/miniupnpc/install
61
+	$(INSTALL_DIR) $(1)/usr/bin
62
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upnpc $(1)/usr/bin/
63
+endef
64
+
65
+define Package/libminiupnpc/install
66
+	$(INSTALL_DIR) $(1)/usr/lib
67
+	$(INSTALL_BIN) \
68
+		$(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* \
69
+		$(1)/usr/lib/
70
+endef
71
+
72
+$(eval $(call BuildPackage,miniupnpc))
73
+$(eval $(call BuildPackage,libminiupnpc))

+ 13
- 0
net/miniupnpc/patches/100-no_minixml_test.patch View File

@@ -0,0 +1,13 @@
1
+--- a/Makefile
2
++++ b/Makefile
3
+@@ -151,8 +151,8 @@ installpythonmodule3:	pythonmodule3
4
+ 	python3 setup.py install
5
+ 
6
+ validateminixml:	minixmlvalid
7
+-	@echo "minixml validation test"
8
+-	./minixmlvalid
9
++	@echo "(skipping) minixml validation test"
10
++#	./minixmlvalid
11
+ 	touch $@
12
+ 
13
+ validateminiwget:	testminiwget minihttptestserver testminiwget.sh

+ 11
- 0
net/miniupnpc/patches/200-miniupnpc_desc.patch View File

@@ -0,0 +1,11 @@
1
+--- a/upnpcommands.c
2
++++ b/upnpcommands.c
3
+@@ -367,7 +367,7 @@ UPNP_AddPortMapping(const char * control
4
+ 	AddPortMappingArgs[5].elt = "NewEnabled";
5
+ 	AddPortMappingArgs[5].val = "1";
6
+ 	AddPortMappingArgs[6].elt = "NewPortMappingDescription";
7
+-	AddPortMappingArgs[6].val = desc?desc:"libminiupnpc";
8
++	AddPortMappingArgs[6].val = desc?desc:"miniupnpc";
9
+ 	AddPortMappingArgs[7].elt = "NewLeaseDuration";
10
+ 	AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0";
11
+ 	if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,