From 94323a61e1934858db69ed43552edb97fc8e7adb Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 10 Oct 2018 13:17:20 +0200 Subject: [PATCH] luci-base: move luci.sys.iptparser into separate package Since commit f6bfac211 ("luci-mod-status: rework iptables status page"), nothing in luci-base depends on the iptparser class anymore, so fold it out into a separate package and let the few apps that require it depend on the new library package. Saves about 10K uncompressed in luci-base while the iptables status rework enlarged the markup by roughly 5KB, saving roughly 5KB of size overall. Signed-off-by: Jo-Philipp Wich --- applications/luci-app-splash/Makefile | 2 +- applications/luci-app-statistics/Makefile | 1 + libs/luci-lib-iptparser/Makefile | 14 ++++++++++++++ .../luci-lib-iptparser}/sys/iptparser.lua | 0 .../luci-lib-iptparser}/sys/iptparser.luadoc | 0 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 libs/luci-lib-iptparser/Makefile rename {modules/luci-base/luasrc => libs/luci-lib-iptparser}/sys/iptparser.lua (100%) rename {modules/luci-base/luasrc => libs/luci-lib-iptparser}/sys/iptparser.luadoc (100%) diff --git a/applications/luci-app-splash/Makefile b/applications/luci-app-splash/Makefile index 5740aa5f7..465372487 100644 --- a/applications/luci-app-splash/Makefile +++ b/applications/luci-app-splash/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Freifunk DHCP-Splash application -LUCI_DEPENDS:=+luci-lib-nixio +tc +kmod-sched +iptables-mod-nat-extra +iptables-mod-ipopt +LUCI_DEPENDS:=+luci-lib-nixio +luci-lib-iptparser +tc +kmod-sched +iptables-mod-nat-extra +iptables-mod-ipopt define Package/luci-app-splash/conffiles /etc/config/luci_splash diff --git a/applications/luci-app-statistics/Makefile b/applications/luci-app-statistics/Makefile index 008792a5d..b552400fe 100644 --- a/applications/luci-app-statistics/Makefile +++ b/applications/luci-app-statistics/Makefile @@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Statistics Application LUCI_DEPENDS:= \ + +luci-lib-iptparser \ +collectd +rrdtool1 +collectd-mod-rrdtool +collectd-mod-iwinfo \ +collectd-mod-cpu +collectd-mod-memory \ +collectd-mod-interface +collectd-mod-load +collectd-mod-network diff --git a/libs/luci-lib-iptparser/Makefile b/libs/luci-lib-iptparser/Makefile new file mode 100644 index 000000000..06748adbf --- /dev/null +++ b/libs/luci-lib-iptparser/Makefile @@ -0,0 +1,14 @@ +# +# Copyright (C) 2018 The LuCI Team +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=Iptables listing parser class +LUCI_DEPENDS:=+luci-base + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/modules/luci-base/luasrc/sys/iptparser.lua b/libs/luci-lib-iptparser/sys/iptparser.lua similarity index 100% rename from modules/luci-base/luasrc/sys/iptparser.lua rename to libs/luci-lib-iptparser/sys/iptparser.lua diff --git a/modules/luci-base/luasrc/sys/iptparser.luadoc b/libs/luci-lib-iptparser/sys/iptparser.luadoc similarity index 100% rename from modules/luci-base/luasrc/sys/iptparser.luadoc rename to libs/luci-lib-iptparser/sys/iptparser.luadoc -- 2.25.1