luci.mk: automatically depend on luci-lua-runtime

Make packages having a non-empty luasrc/ directory automatically depend
on the LuCI Lua runtime package.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2022-09-14 14:17:03 +02:00
parent 673f38246a
commit b15d768c9a
2 changed files with 7 additions and 0 deletions

View File

@ -138,6 +138,12 @@ include $(INCLUDE_DIR)/package.mk
LUCI_SUBMENU_DEFAULT=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app))
LUCI_SUBMENU=$(if $(LUCI_SUBMENU_FORCED),$(LUCI_SUBMENU_FORCED),$(LUCI_SUBMENU_DEFAULT))
ifneq ($(wildcard ${CURDIR}/luasrc/*),)
ifneq ($(filter-out luci-lib-base luci-lua-runtime,$(PKG_NAME)),)
LUCI_DEPENDS += +luci-lua-runtime
endif
endif
define Package/$(PKG_NAME)
SECTION:=$(LUCI_SECTION)
CATEGORY:=$(LUCI_CATEGORY)

View File

@ -15,6 +15,7 @@ LUCI_TITLE:=LuCI Lua runtime libraries
LUCI_DEPENDS:= \
+luci-base \
+lua \
+luci-lib-base \
+luci-lib-nixio \
+luci-lib-ip \
+luci-lib-jsonc \