1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 12:53:54 +02:00
openwrt-packages/net/trafficshaper/Makefile
Paul Spooren 30ea917518 treewide: replace which with command -v
Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-09 13:58:14 -10:00

49 lines
1.4 KiB
Makefile

#
# Copyright (C) 2018-2019 Luiz Angelo Daros de Luca
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=trafficshaper
PKG_VERSION:=1.0.0
PKG_RELEASE:=2
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
include $(INCLUDE_DIR)/package.mk
define Package/trafficshaper
SECTION:=net
CATEGORY:=Network
TITLE:=WAN traffic shaper based on LAN addresses
DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
PKGARCH:=all
endef
define Package/trafficshaper/description
Setup QoS rules to limit (or reserve) traffic used by classes of clients.
Uplink and downlink can be controled (or not controlled) independently.
Client classes are defined by its network addresses (IPv4 or IPv6). Each
client class can define absolute or relative (to wan) bandwith, and also
the use (or not) of spare wan bandwidth when avaiable.
endef
define Package/trafficshaper/conffiles
/etc/config/trafficshaper
endef
define Build/Compile
endef
define Package/trafficshaper/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/trafficshaper.conf $(1)/etc/config/trafficshaper
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/trafficshaper.init $(1)/etc/init.d/trafficshaper
endef
$(eval $(call BuildPackage,trafficshaper))