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.

66 lines
1.9 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.0.20180503
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=http://miniupnp.free.fr/files
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_HASH:=b61bed16865f8692803a9f155523ca7c6e01c65db20362b6173226b08ce12a0c
  14. PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  15. PKG_LICENSE:=BSD-3-Clause
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/version.mk
  18. define Package/miniupnpd
  19. SECTION:=net
  20. CATEGORY:=Network
  21. DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid
  22. TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon
  23. SUBMENU:=Firewall
  24. URL:=http://miniupnp.free.fr/
  25. endef
  26. define Package/miniupnpd/conffiles
  27. /etc/config/upnpd
  28. endef
  29. define Build/Prepare
  30. $(call Build/Prepare/Default)
  31. echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
  32. endef
  33. MAKE_FLAGS += \
  34. TARGET_OPENWRT=1 TEST=0 LIBS="" \
  35. CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
  36. $(if $(CONFIG_IPV6),-lip6tc)" \
  37. CONFIG_OPTIONS="--portinuse --leasefile --igd2 \
  38. $(if $(CONFIG_IPV6),--ipv6)" \
  39. -f Makefile.linux miniupnpd
  40. define Package/miniupnpd/install
  41. $(INSTALL_DIR) $(1)/usr/sbin
  42. $(INSTALL_DIR) $(1)/etc/init.d
  43. $(INSTALL_DIR) $(1)/etc/config
  44. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  45. $(INSTALL_DIR) $(1)/etc/uci-defaults
  46. $(INSTALL_DIR) $(1)/usr/share/miniupnpd
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd
  48. $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd
  49. $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd
  50. $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd
  51. $(INSTALL_BIN) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd
  52. $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include
  53. endef
  54. $(eval $(call BuildPackage,miniupnpd))