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.

72 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=miniupnpd
  9. PKG_VERSION:=2.1.20200510
  10. PKG_RELEASE:=5
  11. PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_HASH:=821e708f369cc1fb851506441fbc3a1f4a1b5a8bf8e84a9e71758a32f5127e8b
  14. PKG_LICENSE:=BSD-3-Clause
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_CPE_ID:=cpe:/a:miniupnp_project:miniupnpd
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/version.mk
  21. define Package/miniupnpd
  22. SECTION:=net
  23. CATEGORY:=Network
  24. DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid +libcap-ng
  25. TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
  26. SUBMENU:=Firewall
  27. URL:=https://miniupnp.tuxfamily.org/
  28. endef
  29. define Package/miniupnpd/conffiles
  30. /etc/config/upnpd
  31. endef
  32. define Build/Prepare
  33. $(call Build/Prepare/Default)
  34. echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
  35. endef
  36. CONFIGURE_ARGS = \
  37. $(if $(CONFIG_IPV6),--ipv6) \
  38. --igd2 \
  39. --leasefile \
  40. --portinuse \
  41. --firewall=iptables
  42. TARGET_CFLAGS += $(FPIC) -flto
  43. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  44. define Package/miniupnpd/install
  45. $(INSTALL_DIR) $(1)/usr/sbin
  46. $(INSTALL_DIR) $(1)/etc/init.d
  47. $(INSTALL_DIR) $(1)/etc/config
  48. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  49. $(INSTALL_DIR) $(1)/etc/uci-defaults
  50. $(INSTALL_DIR) $(1)/usr/share/miniupnpd
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miniupnpd $(1)/usr/sbin/miniupnpd
  52. $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
  53. $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
  54. $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
  55. $(INSTALL_BIN) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
  56. $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
  57. endef
  58. $(eval $(call BuildPackage,miniupnpd))