2021-11-01 15:35:16 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2021 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=qosify
|
|
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2021-11-19 21:57:03 +00:00
|
|
|
PKG_SOURCE_DATE:=2021-11-19
|
|
|
|
PKG_SOURCE_VERSION:=e728a319a9a5ac692d18fef936e6ac4377f1bbf1
|
|
|
|
PKG_MIRROR_HASH:=86362483e4462a9dc4c4c31363a9a43a140472f105da363053e07e2486fff24f
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
PKG_LICENSE:=GPL-2.0
|
|
|
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
PKG_BUILD_DEPENDS:=bpf-headers
|
2021-11-09 10:03:10 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
include $(INCLUDE_DIR)/bpf.mk
|
2021-11-03 17:54:04 +00:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2021-11-01 15:35:16 +00:00
|
|
|
|
|
|
|
define Package/qosify
|
2021-11-15 16:53:43 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Base system
|
2021-11-01 15:35:16 +00:00
|
|
|
TITLE:=A simple QoS solution based eBPF + CAKE
|
2021-11-08 20:28:27 +00:00
|
|
|
DEPENDS:=+libbpf +libubox +libubus +kmod-sched-cake +kmod-sched-bpf +kmod-ifb +tc-full $(BPF_DEPENDS)
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
|
|
|
|
$(Build/Compile/Default)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/qosify/conffiles
|
|
|
|
/etc/config/qosify
|
2021-11-08 21:26:45 +00:00
|
|
|
/etc/qosify/00-defaults.conf
|
2021-11-01 15:35:16 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/qosify/install
|
2021-11-08 21:26:45 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/bpf $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/net $(1)/etc/qosify
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
|
2021-11-19 22:50:50 +00:00
|
|
|
$(INSTALL_BIN) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/bin/qosify \
|
|
|
|
./files/qosify-status \
|
|
|
|
$(1)/usr/sbin/
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
|
2021-11-08 21:26:45 +00:00
|
|
|
$(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify/00-defaults.conf
|
2021-11-01 15:35:16 +00:00
|
|
|
$(INSTALL_DATA) ./files/qosify.conf $(1)/etc/config/qosify
|
|
|
|
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/net/10-qosify
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,qosify))
|