[packages] sqlite3: update to 3070701
[packages.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:=20110618
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:=6a5fdc8aa6c8602ea96567dabe51d6d3
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
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/
69 endef
70
71 define Package/libnatpmp/install
72         $(INSTALL_DIR) $(1)/usr/lib
73         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
74 endef
75
76 define Package/natpmpc/install
77         $(INSTALL_DIR) $(1)/usr/bin
78         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
79 endef
80
81 $(eval $(call BuildPackage,libnatpmp))
82 $(eval $(call BuildPackage,natpmpc))