mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
sqm-scripts: Bump to v1.0.3.
Backported changes from master. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
This commit is contained in:
+50
-22
@@ -8,11 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sqm-scripts
|
||||
PKG_VERSION:=8
|
||||
PKG_RELEASE:=4
|
||||
PKG_SOURCE_VERSION:=39005a11405ca68bb80d42855ff7ea641a9769b9
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
|
||||
PKG_SOURCE_URL:=git://github.com/tohojo/sqm-scripts.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -32,28 +37,51 @@ endef
|
||||
|
||||
define Package/sqm-scripts/conffiles
|
||||
/etc/config/sqm
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
/etc/sqm/sqm.conf
|
||||
endef
|
||||
|
||||
define Package/sqm-scripts/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/sqm $(1)/etc/init.d/sqm
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/11-sqm $(1)/etc/hotplug.d/iface/11-sqm
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DATA) ./files/etc/config/sqm $(1)/etc/config/sqm
|
||||
$(INSTALL_DIR) $(1)/usr/lib/sqm
|
||||
$(INSTALL_BIN) ./files/usr/lib/sqm/*.sh $(1)/usr/lib/sqm/
|
||||
$(INSTALL_BIN) ./files/usr/lib/sqm/*.qos $(1)/usr/lib/sqm/
|
||||
$(INSTALL_DATA) ./files/usr/lib/sqm/*.help $(1)/usr/lib/sqm/
|
||||
make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install
|
||||
endef
|
||||
|
||||
define Package/luci-app-sqm
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=SQM Scripts - LuCI interface
|
||||
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
PKGARCH:=all
|
||||
DEPENDS:= lua luci-base +sqm-scripts
|
||||
SUBMENU:=3. Applications
|
||||
endef
|
||||
|
||||
define Package/luci-app-sqm/description
|
||||
Control the simple_qos SQM script
|
||||
endef
|
||||
|
||||
define Package/luci-app-sqm/install
|
||||
make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install-luci
|
||||
endef
|
||||
|
||||
define Package/luci-app-sqm/postinst
|
||||
#!/bin/sh
|
||||
which uci > /dev/null || exit 0
|
||||
uci -q get ucitrack.@sqm[0] > /dev/null || {
|
||||
uci add ucitrack sqm > /dev/null
|
||||
uci set ucitrack.@sqm[0].init=sqm
|
||||
uci add_list ucitrack.@firewall[0].affects=sqm
|
||||
uci commit
|
||||
}
|
||||
endef
|
||||
|
||||
define Package/luci-app-sqm/postrm
|
||||
#!/bin/sh
|
||||
which uci > /dev/null || exit 0
|
||||
uci -q get ucitrack.@sqm[0] > /dev/null && {
|
||||
uci delete ucitrack.@sqm[0]
|
||||
uci del_list ucitrack.@firewall[0].affects=sqm
|
||||
uci commit
|
||||
}
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sqm-scripts))
|
||||
$(eval $(call BuildPackage,luci-app-sqm))
|
||||
|
||||
Reference in New Issue
Block a user