2 # Copyright (C) 2011 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:=6a5fdc8aa6c8602ea96567dabe51d6d3
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)"
64 define Build/InstallDev
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
71 define Package/libnatpmp/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
76 define Package/natpmpc/install
77 $(INSTALL_DIR) $(1)/usr/bin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
81 $(eval $(call BuildPackage,libnatpmp))
82 $(eval $(call BuildPackage,natpmpc))