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.

48 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=trafficshaper
  8. PKG_VERSION:=1.0.0
  9. PKG_RELEASE:=2
  10. PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
  11. PKG_LICENSE:=GPL-2.0-or-later
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/trafficshaper
  14. SECTION:=net
  15. CATEGORY:=Network
  16. TITLE:=WAN traffic shaper based on LAN addresses
  17. DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
  18. PKGARCH:=all
  19. endef
  20. define Package/trafficshaper/description
  21. Setup QoS rules to limit (or reserve) traffic used by classes of clients.
  22. Uplink and downlink can be controled (or not controlled) independently.
  23. Client classes are defined by its network addresses (IPv4 or IPv6). Each
  24. client class can define absolute or relative (to wan) bandwith, and also
  25. the use (or not) of spare wan bandwidth when avaiable.
  26. endef
  27. define Package/trafficshaper/conffiles
  28. /etc/config/trafficshaper
  29. endef
  30. define Build/Compile
  31. endef
  32. define Package/trafficshaper/install
  33. $(INSTALL_DIR) $(1)/etc/config
  34. $(INSTALL_CONF) ./files/trafficshaper.conf $(1)/etc/config/trafficshaper
  35. $(INSTALL_DIR) $(1)/etc/init.d
  36. $(INSTALL_BIN) ./files/trafficshaper.init $(1)/etc/init.d/trafficshaper
  37. endef
  38. $(eval $(call BuildPackage,trafficshaper))