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_HASH
:=b2ce5e626a21c795cba2d118f26e54aaa89de29d4611c440fafc49a2a5bedabb
17 PKG_MAINTAINER
:=Hauke Mehrtens
<hauke@hauke-m.de
>
19 PKG_LICENSE_FILES
:=LICENSE
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libnatpmp
/Default
26 TITLE
:=NAT Port Mapping Protocol
(NAT-PMP
)
27 URL
:=http
://miniupnp.free.fr
/libnatpmp.html
30 define Package
/libnatpmp
/Default
/description
31 libnatpmp is an attempt to make a portable and fully compliant implementation
32 of the protocol for the client side. It is based on non blocking sockets and
33 all calls of the API are asynchronous. It is therefore very easy to integrate
34 the NAT-PMP code to any event driven code.
37 define Package
/libnatpmp
38 $(call Package
/libnatpmp
/Default
)
44 define Package
/libnatpmp
/description
45 $(call Package
/libnatpmp
/Default
/description
)
46 This package contains the shared library.
49 define Package
/natpmpc
50 $(call Package
/libnatpmp
/Default
)
58 define Package
/natpmpc
/description
59 $(call Package
/libnatpmp
/Default
/description
)
60 This package contains the natpmp client.
64 COPTS
="$(TARGET_CFLAGS)" \
65 PREFIX
="$(PKG_INSTALL_DIR)" \
68 define Build
/InstallDev
69 $(INSTALL_DIR
) $(1)/usr
/include
70 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/declspec.h
$(1)/usr
/include/
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/natpmp.h
$(1)/usr
/include/
72 $(INSTALL_DIR
) $(1)/usr
/lib
73 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnatpmp
*.
{so
*,a
} $(1)/usr
/lib
/
76 define Package
/libnatpmp
/install
77 $(INSTALL_DIR
) $(1)/usr
/lib
78 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnatpmp.so.
* $(1)/usr
/lib
/
81 define Package
/natpmpc
/install
82 $(INSTALL_DIR
) $(1)/usr
/bin
83 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/natpmpc
$(1)/usr
/bin
/
86 $(eval
$(call BuildPackage
,libnatpmp
))
87 $(eval
$(call BuildPackage
,natpmpc
))