sulu: 2.0.4

This commit is contained in:
vdutta 2023-03-02 13:30:43 +05:30
parent e16f723dd0
commit 5f116f84a2
4 changed files with 48 additions and 11 deletions

View file

@ -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

View file

@ -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

View file

@ -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)))

View file

@ -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