qosify: bump to git HEAD
[openwrt/staging/chunkeey.git] / package / network / config / qosify / Makefile
1 #
2 # Copyright (C) 2021 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=qosify
12 PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_DATE:=2022-03-04
15 PKG_SOURCE_VERSION:=74cfd71531446440b70639f2290f510a529deaa6
16 PKG_MIRROR_HASH:=113ca3c91c11d7be4ca153f3295e2f00275fbb45396feedb46120c6b3009c23a
17 PKG_RELEASE:=$(AUTORELEASE)
18
19 PKG_LICENSE:=GPL-2.0
20 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
21
22 PKG_BUILD_DEPENDS:=bpf-headers
23 PKG_FLAGS:=nonshared
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
27 include $(INCLUDE_DIR)/bpf.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/qosify
31 SECTION:=utils
32 CATEGORY:=Base system
33 TITLE:=A simple QoS solution based eBPF + CAKE
34 DEPENDS:=+libbpf +libubox +libubus +kmod-sched-cake +kmod-sched-bpf +kmod-ifb +tc-full $(BPF_DEPENDS)
35 endef
36
37 define Build/Compile
38 $(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
39 $(Build/Compile/Default)
40 endef
41
42 define Package/qosify/conffiles
43 /etc/config/qosify
44 /etc/qosify/00-defaults.conf
45 endef
46
47 define Package/qosify/install
48 $(INSTALL_DIR) \
49 $(1)/lib/bpf \
50 $(1)/usr/sbin \
51 $(1)/etc/init.d \
52 $(1)/etc/config \
53 $(1)/etc/qosify \
54 $(1)/etc/hotplug.d/net \
55 $(1)/etc/hotplug.d/iface
56 $(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
57 $(INSTALL_BIN) \
58 $(PKG_INSTALL_DIR)/usr/bin/qosify \
59 ./files/qosify-status \
60 $(1)/usr/sbin/
61 $(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
62 $(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify/00-defaults.conf
63 $(INSTALL_DATA) ./files/qosify.conf $(1)/etc/config/qosify
64 $(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/net/10-qosify
65 $(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/iface/10-qosify
66 endef
67
68 $(eval $(call BuildPackage,qosify))