libyang: bump to latest version
[feed/packages.git] / libs / libnatpmp / Makefile
1 #
2 # Copyright (C) 2011-2012 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:=20140401
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_HASH:=b2ce5e626a21c795cba2d118f26e54aaa89de29d4611c440fafc49a2a5bedabb
17 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
18 PKG_LICENSE:=BSD-3c
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libnatpmp/Default
26 TITLE:=NAT Port Mapping Protocol (NAT-PMP)
27 URL:=http://miniupnp.free.fr/libnatpmp.html
28 endef
29
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.
35 endef
36
37 define Package/libnatpmp
38 $(call Package/libnatpmp/Default)
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE+= library
42 endef
43
44 define Package/libnatpmp/description
45 $(call Package/libnatpmp/Default/description)
46 This package contains the shared library.
47 endef
48
49 define Package/natpmpc
50 $(call Package/libnatpmp/Default)
51 SECTION:=net
52 CATEGORY:=Network
53 SUBMENU:=Firewall
54 TITLE+= client
55 DEPENDS:=+libnatpmp
56 endef
57
58 define Package/natpmpc/description
59 $(call Package/libnatpmp/Default/description)
60 This package contains the natpmp client.
61 endef
62
63 MAKE_FLAGS += \
64 COPTS="$(TARGET_CFLAGS)" \
65 PREFIX="$(PKG_INSTALL_DIR)" \
66 OS="Linux"
67
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/
74 endef
75
76 define Package/libnatpmp/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
79 endef
80
81 define Package/natpmpc/install
82 $(INSTALL_DIR) $(1)/usr/bin
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
84 endef
85
86 $(eval $(call BuildPackage,libnatpmp))
87 $(eval $(call BuildPackage,natpmpc))