[packages] libnatpmp: update to 20110715, refresh patches
[openwrt/svn-archive/archive.git] / libs / libnatpmp / Makefile
1 #
2 # Copyright (C) 2011 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:=libnatpmp
11 PKG_VERSION:=20110715
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
16 PKG_MD5SUM:=56b9f784836f0783bcc862486aa19491
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libnatpmp/Default
23 TITLE:=NAT Port Mapping Protocol (NAT-PMP)
24 URL:=http://miniupnp.free.fr/libnatpmp.html
25 endef
26
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.
32 endef
33
34 define Package/libnatpmp
35 $(call Package/libnatpmp/Default)
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE+= library
39 endef
40
41 define Package/libnatpmp/description
42 $(call Package/libnatpmp/Default/description)
43 This package contains the shared library.
44 endef
45
46 define Package/natpmpc
47 $(call Package/libnatpmp/Default)
48 SECTION:=net
49 CATEGORY:=Network
50 SUBMENU:=Firewall
51 TITLE+= client
52 DEPENDS:=+libnatpmp
53 endef
54
55 define Package/natpmpc/description
56 $(call Package/libnatpmp/Default/description)
57 This package contains the natpmp client.
58 endef
59
60 MAKE_FLAGS += \
61 COPTS="$(TARGET_CFLAGS)" \
62 PREFIX="$(PKG_INSTALL_DIR)" \
63 OS="Linux"
64
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/
70 endef
71
72 define Package/libnatpmp/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
75 endef
76
77 define Package/natpmpc/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
80 endef
81
82 $(eval $(call BuildPackage,libnatpmp))
83 $(eval $(call BuildPackage,natpmpc))