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.

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