2 # Copyright (C) 2011-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
16 PKG_MD5SUM:=22a1225b890471a7750a9bf26eb863f7
20 include $(INCLUDE_DIR)/package.mk
22 define Package/libnatpmp/Default
23 TITLE:=NAT Port Mapping Protocol (NAT-PMP)
24 URL:=http://miniupnp.free.fr/libnatpmp.html
27 define Package/libnatpmp/Default/description
28 libnatpmp is an attempt to make a portable and fully compliant implementation
29 of the protocol for the client side. It is based on non blocking sockets and
30 all calls of the API are asynchronous. It is therefore very easy to integrate
31 the NAT-PMP code to any event driven code.
34 define Package/libnatpmp
35 $(call Package/libnatpmp/Default)
41 define Package/libnatpmp/description
42 $(call Package/libnatpmp/Default/description)
43 This package contains the shared library.
46 define Package/natpmpc
47 $(call Package/libnatpmp/Default)
55 define Package/natpmpc/description
56 $(call Package/libnatpmp/Default/description)
57 This package contains the natpmp client.
61 COPTS="$(TARGET_CFLAGS)" \
62 PREFIX="$(PKG_INSTALL_DIR)" \
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/include
67 $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
72 define Package/libnatpmp/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
77 define Package/natpmpc/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
82 $(eval $(call BuildPackage,libnatpmp))
83 $(eval $(call BuildPackage,natpmpc))