You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.3 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libnatpmp
  9. PKG_VERSION:=20140401
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://miniupnp.free.fr/files
  13. PKG_HASH:=b2ce5e626a21c795cba2d118f26e54aaa89de29d4611c440fafc49a2a5bedabb
  14. PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
  15. PKG_LICENSE:=BSD-3c
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/libnatpmp/Default
  20. TITLE:=NAT Port Mapping Protocol (NAT-PMP)
  21. URL:=http://miniupnp.free.fr/libnatpmp.html
  22. endef
  23. define Package/libnatpmp/Default/description
  24. libnatpmp is an attempt to make a portable and fully compliant implementation
  25. of the protocol for the client side. It is based on non blocking sockets and
  26. all calls of the API are asynchronous. It is therefore very easy to integrate
  27. the NAT-PMP code to any event driven code.
  28. endef
  29. define Package/libnatpmp
  30. $(call Package/libnatpmp/Default)
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE+= library
  34. endef
  35. define Package/libnatpmp/description
  36. $(call Package/libnatpmp/Default/description)
  37. This package contains the shared library.
  38. endef
  39. define Package/natpmpc
  40. $(call Package/libnatpmp/Default)
  41. SECTION:=net
  42. CATEGORY:=Network
  43. SUBMENU:=Firewall
  44. TITLE+= client
  45. DEPENDS:=+libnatpmp
  46. endef
  47. define Package/natpmpc/description
  48. $(call Package/libnatpmp/Default/description)
  49. This package contains the natpmp client.
  50. endef
  51. MAKE_FLAGS += \
  52. COPTS="$(TARGET_CFLAGS)" \
  53. PREFIX="$(PKG_INSTALL_DIR)" \
  54. OS="Linux"
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/declspec.h $(1)/usr/include/
  58. $(CP) $(PKG_INSTALL_DIR)/usr/include/natpmp.h $(1)/usr/include/
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp*.{so*,a} $(1)/usr/lib/
  61. endef
  62. define Package/libnatpmp/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnatpmp.so.* $(1)/usr/lib/
  65. endef
  66. define Package/natpmpc/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/natpmpc $(1)/usr/bin/
  69. endef
  70. $(eval $(call BuildPackage,libnatpmp))
  71. $(eval $(call BuildPackage,natpmpc))