# SPDX-License-Identifier: GPL-2.0-only

include $(TOPDIR)/rules.mk

PKG_NAME:=uniberg-wifi-mesh-qos
PKG_VERSION:=$(shell date +%Y-%m-%d)
PKG_RELEASE:=1

PKG_MAINTAINER:=David Bauer <david.bauer@uniberg.com>
PKG_LICENSE:=GPL-2.0-only

include $(INCLUDE_DIR)/package.mk

# Prefix with uniberg in order to avoid potential future conflicts with upstream
define Package/uniberg-wifi-mesh-qos
  SECTION:=net
  CATEGORY:=Network
  DEPENDS:=+sqm-scripts
  TITLE:=WiFi mesh QoS scripts
endef

define Build/Compile
	# No compilation needed, just install the scripts
endef

# ToDo: Check if we need setup.sh and uninstall.sh
define Package/uniberg-wifi-mesh-qos/install
	$(INSTALL_DIR) $(1)/etc/hotplug.d/iface

	$(CP) ./files/55-uniberg-wifi-qos $(1)/etc/hotplug.d/iface/55-uniberg-wifi-qos
endef

$(eval $(call BuildPackage,uniberg-wifi-mesh-qos))
