From 5f116f84a26092185960f87028dfe363e4ea3faf Mon Sep 17 00:00:00 2001 From: vdutta Date: Thu, 2 Mar 2023 13:30:43 +0530 Subject: [PATCH] sulu: 2.0.4 --- sulu/Readme.md | 43 ++++++++++++++++++++++++++++++++------ sulu/sulu-builder/Makefile | 2 +- sulu/sulu-builder/sulu.mk | 7 +++++-- sulu/sulu-lcm/Makefile | 7 +++++-- 4 files changed, 48 insertions(+), 11 deletions(-) diff --git a/sulu/Readme.md b/sulu/Readme.md index 21a3631e7..a87a1bfbf 100644 --- a/sulu/Readme.md +++ b/sulu/Readme.md @@ -1,9 +1,13 @@ # SULU-CE SULU is a ReactJS based USP controller, for more details please check sulu [documentation](https://dev.iopsys.eu/websdk/sulu/-/blob/devel/README.md). This directory contains the recipes to build sulu for IOWRT. -SULU has two variants -1. sulu - This package usages the prebuilt distribution, so it faster but only include iopsys default packages -2. sulu-builder - This package builds the sulu along with selected plugins from source +There are two ways to include SULU in iowrt, by + 1. Adding a pre-build sulu distribution with all the plugins + 2. Compile sulu at the iowrt build time, which then include all the selected plugins + +Align with above two ways, SULU has two variants + 1. sulu - This package usages the pre-built distribution, so it faster but only include iopsys default sulu plugins + 2. sulu-builder - This package builds the sulu along with selected plugins from sources, so user can include their sulu-plugins # Directory structure This directory contains iowrt sulu plugins packages along with sulu builder. @@ -15,7 +19,13 @@ This directory contains iowrt sulu plugins packages along with sulu builder. - sulu-parental-control - Sulu plugin for Parental control, can be used with sulu-builder - sulu-theme-iopsys - Sulu example theme plugin, can be used with sulu-builder -User can select 'CONFIG_PACKAGE_sulu=y' to use the sulu prebuilt distribution, or can select 'CONFIG_PACKAGE_sulu-builder=y' to build sulu along with customized plugins. +# Packages + - Select 'CONFIG_PACKAGE_sulu=y' to use pre-build sulu distribution binaries, OR + - Select 'CONFIG_PACKAGE_sulu-builder=y' to build sulu along with customized plugins from their source code, this is the preferred way if user wants to include/exclude more/default plugins in sulu. + - CONFIG_PACKAGE_sulu-lcm=y, handles life-cycle-management, should only be used with sulu-builder + - CONFIG_PACKAGE_sulu-multi-ap=y, handles easy-mesh, should only be used with sulu-builder + - CONFIG_PACKAGE_sulu-parental-control=y, Provides access-control and url-filter, should only be used with sulu-builder + - CONFIG_PACKAGE_sulu-theme-iopsys=y, Provides an example theme, should only be used with sulu-builder # How to select a sulu plugins While building sulu from source, user has to select the all plugins they want to include in sulu, which can be done with 'make menuconfig', below are the list of sulu plugins available currently. @@ -41,14 +51,35 @@ PKG_MIRROR_HASH:=skip include ../sulu-builder/sulu.mk +# call BuildPackage - OpenWrt buildroot signature +``` + +# How to add a new sulu plugin with additional install requirements +Sometimes it is required to install additional config files along with the package, to do so such sulu plugins need to have below syntax in Makefile +```bash +include $(TOPDIR)/rules.mk +PKG_NAME:=sulu-lcm +PKG_VERSION:=2.0.0 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-lcm.git +PKG_SOURCE_VERSION:=b3f6028fd168e58b93ae56f616e96712849c656a +PKG_MIRROR_HASH:=skip + +SULU_PLUGIN_INSTALL:=1 + define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/sulu/config/widgets + $(INSTALL_DIR) $(1)/sulu/config/widgets + $(CP) $(PKG_BUILD_DIR)/src/config/widgets/lcm-store.json $(1)/sulu/config/widgets/ endef +include ../sulu-builder/sulu.mk + + # call BuildPackage - OpenWrt buildroot signature ``` -In the above example makefile, if user need to install any plugin specific component, that can be added inside 'Package/$(PKG_NAME)/install' definition. +In the above example Makefile, if user need to install any plugin specific component, that can be added inside 'Package/$(PKG_NAME)/install' definition. After adding the makefile, user need to specify the list of plugins in below config option, so that sulu-builder selects them and build them along with it. ```bash diff --git a/sulu/sulu-builder/Makefile b/sulu/sulu-builder/Makefile index b4c3711a7..cf55e1cb0 100644 --- a/sulu/sulu-builder/Makefile +++ b/sulu/sulu-builder/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sulu-builder -PKG_VERSION:=2.0.3 +PKG_VERSION:=2.0.4 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git diff --git a/sulu/sulu-builder/sulu.mk b/sulu/sulu-builder/sulu.mk index c18f0fe6e..334d6d5f2 100644 --- a/sulu/sulu-builder/sulu.mk +++ b/sulu/sulu-builder/sulu.mk @@ -7,6 +7,7 @@ SULU_NAME?=$(notdir $(CURDIR)) SULU_URL?=https://dev.iopsys.eu/websdk SULU_MAINTAINER?=IOPSYS SuLu team +SULU_PLUGIN_INSTALL?=0 SULU_MOD?=plugins PKG_NAME?=$(SULU_NAME) @@ -37,11 +38,13 @@ endef endif define Build/Compile - # Pass + # Skip compilation, will be build with sulu-builder endef +ifeq ($(SULU_PLUGIN_INSTALL),0) define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/sulu/config/ + # Nothing to be install endef +endif $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/sulu/sulu-lcm/Makefile b/sulu/sulu-lcm/Makefile index 7ef9a3dd5..87dcef9cf 100644 --- a/sulu/sulu-lcm/Makefile +++ b/sulu/sulu-lcm/Makefile @@ -4,14 +4,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sulu-lcm -PKG_VERSION:=2.0.0 +PKG_VERSION:=2.0.4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-lcm.git PKG_SOURCE_VERSION:=b3f6028fd168e58b93ae56f616e96712849c656a PKG_MIRROR_HASH:=skip -include ../sulu-builder/sulu.mk +SULU_PLUGIN_INSTALL:=1 define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/sulu/config/widgets @@ -20,4 +20,7 @@ ifeq ($(CONFIG_PACKAGE_skopeo)$(CONFIG_PACKAGE_umoci),yy) endif endef +include ../sulu-builder/sulu.mk + + # call BuildPackage - OpenWrt buildroot signature