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.

76 lines
1.7 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. #
  2. # Copyright (C) 2010-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:=miniupnpc
  9. PKG_VERSION:=2.1.20190408
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
  13. PKG_HASH:=a0c46bcf6065d6351a8fa6a0a18dc57d10a16908dbb470908fd2e423511514ec
  14. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  15. PKG_LICENSE:=BSD-3c
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/miniupnpc/Default
  21. TITLE:=Lightweight UPnP
  22. URL:=https://miniupnp.tuxfamily.org
  23. endef
  24. define Package/miniupnpc
  25. $(call Package/miniupnpc/Default)
  26. SECTION:=net
  27. CATEGORY:=Network
  28. SUBMENU:=Firewall
  29. TITLE+= client
  30. DEPENDS:=+libminiupnpc
  31. endef
  32. define Package/libminiupnpc
  33. $(call Package/miniupnpc/Default)
  34. SECTION:=libs
  35. CATEGORY:=Libraries
  36. TITLE+= library
  37. endef
  38. CMAKE_OPTIONS += -DUPNPC_BUILD_TESTS=OFF
  39. TARGET_CFLAGS += $(FPIC)
  40. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(1)/usr/include/miniupnpc
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \
  45. $(1)/usr/include/miniupnpc/
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) \
  48. $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
  49. $(1)/usr/lib/
  50. endef
  51. define Package/miniupnpc/install
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpc-shared $(1)/usr/bin/upnpc
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/listdevices $(1)/usr/bin/
  55. endef
  56. define Package/libminiupnpc/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* $(1)/usr/lib/
  59. endef
  60. $(eval $(call BuildPackage,miniupnpc))
  61. $(eval $(call BuildPackage,libminiupnpc))