sshtunnel: move to github
[openwrt.org/packages.git] / libs / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
# Copyright (C) 2011-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
 
include $(TOPDIR)/rules.mk
 
PKG_NAME:=libnatpmp
PKG_VERSION:=20110808
PKG_RELEASE:=1
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_MD5SUM:=22a1225b890471a7750a9bf26eb863f7
 
PKG_INSTALL:=1
 
include $(INCLUDE_DIR)/package.mk
 
define Package/libnatpmp/Default
  TITLE:=NAT Port Mapping Protocol (NAT-PMP)
  URL:=http://miniupnp.free.fr/libnatpmp.html
endef
 
define Package/libnatpmp/Default/description
  libnatpmp is an attempt to make a portable and fully compliant implementation
  of the protocol for the client side. It is based on non blocking sockets and
  all calls of the API are asynchronous. It is therefore very easy to integrate
  the NAT-PMP code to any event driven code.
endef
 
define Package/libnatpmp
  $(call Package/libnatpmp/Default)
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE+= library
endef
 
define Package/libnatpmp/description
  $(call Package/libnatpmp/Default/description)
  This package contains the shared library.
endef
 
define Package/natpmpc
  $(call Package/libnatpmp/Default)
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Firewall
  TITLE+= client
  DEPENDS:=+libnatpmp
endef
 
define Package/natpmpc/description
  $(call Package/libnatpmp/Default/description)
  This package contains the natpmp client.
endef
 
MAKE_FLAGS += \
        COPTS="$(TARGET_CFLAGS)" \
        PREFIX="$(PKG_INSTALL_DIR)" \
        OS="Linux"
 
define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
endef
 
define Package/libnatpmp/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
endef
 
define Package/natpmpc/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
endef
 
$(eval $(call BuildPackage,libnatpmp))
$(eval $(call BuildPackage,natpmpc))
 
comments