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.

74 lines
1.6 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:=mwan3
  9. PKG_VERSION:=2.10.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_CONFIG_DEPENDS:=CONFIG_IPV6
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/mwan3
  16. SECTION:=net
  17. CATEGORY:=Network
  18. SUBMENU:=Routing and Redirection
  19. DEPENDS:= \
  20. +ip \
  21. +ipset \
  22. +iptables \
  23. +iptables-mod-conntrack-extra \
  24. +iptables-mod-ipopt \
  25. +jshn
  26. TITLE:=Multiwan hotplug script with connection tracking support
  27. MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
  28. PKGARCH:=all
  29. endef
  30. define Package/mwan3/description
  31. Hotplug script which makes configuration of multiple WAN interfaces simple
  32. and manageable. With loadbalancing/failover support for up to 250 wan
  33. interfaces, connection tracking and an easy to manage traffic ruleset.
  34. endef
  35. define Package/mwan3/conffiles
  36. /etc/config/mwan3
  37. /etc/mwan3.user
  38. endef
  39. define Build/Compile
  40. endef
  41. define Package/mwan3/postinst
  42. #!/bin/sh
  43. if [ -z "$${IPKG_INSTROOT}" ]; then
  44. /etc/init.d/rpcd restart
  45. fi
  46. exit 0
  47. endef
  48. define Package/mwan3/postrm
  49. #!/bin/sh
  50. if [ -z "$${IPKG_INSTROOT}" ]; then
  51. /etc/init.d/rpcd restart
  52. fi
  53. exit 0
  54. endef
  55. define Build/Compile
  56. $(TARGET_CC) $(CFLAGS) $(LDFLAGS) $(FPIC) -shared -o $(PKG_BUILD_DIR)/libwrap_mwan3_sockopt.so.1.0 $(if $(CONFIG_IPV6),-DCONFIG_IPV6) $(PKG_BUILD_DIR)/sockopt_wrap.c -ldl
  57. endef
  58. define Package/mwan3/install
  59. $(CP) ./files/* $(1)
  60. $(CP) $(PKG_BUILD_DIR)/libwrap_mwan3_sockopt.so.1.0 $(1)/lib/mwan3/
  61. endef
  62. $(eval $(call BuildPackage,mwan3))