gluon-site: disable multidomain support by default

This commit is contained in:
Matthias Schiffer 2018-01-26 00:13:37 +01:00
parent faceb3932c
commit 07dbfea617
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
3 changed files with 28 additions and 5 deletions

View File

@ -37,10 +37,11 @@ include $(GLUON_SITEDIR)/site.mk
GLUON_RELEASE ?= $(error GLUON_RELEASE not set. GLUON_RELEASE can be set in site.mk or on the command line) GLUON_RELEASE ?= $(error GLUON_RELEASE not set. GLUON_RELEASE can be set in site.mk or on the command line)
GLUON_MULTIDOMAIN ?= 0
GLUON_WLAN_MESH ?= 11s GLUON_WLAN_MESH ?= 11s
GLUON_DEBUG ?= 0 GLUON_DEBUG ?= 0
export GLUON_RELEASE GLUON_REGION GLUON_WLAN_MESH GLUON_DEBUG export GLUON_RELEASE GLUON_REGION GLUON_MULTIDOMAIN GLUON_WLAN_MESH GLUON_DEBUG
show-release: show-release:
@echo '$(GLUON_RELEASE)' @echo '$(GLUON_RELEASE)'

View File

@ -7,7 +7,7 @@ GLUON_SITE_VERSION = $(shell ( cd '$(GLUON_SITEDIR)' && git --git-dir=.git descr
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_SITE_VERSION)) PKG_VERSION:=$(if $(DUMP),x,$(GLUON_SITE_VERSION))
PKG_CONFIG_DEPENDS := CONFIG_GLUON_RELEASE CONFIG_GLUON_SITEDIR PKG_CONFIG_DEPENDS := CONFIG_GLUON_RELEASE CONFIG_GLUON_SITEDIR CONFIG_GLUON_MULTIDOMAIN
PKG_FILE_DEPENDS := $(GLUON_SITEDIR)/site.conf $(GLUON_SITEDIR)/domains/ $(GLUON_SITEDIR)/i18n/ PKG_FILE_DEPENDS := $(GLUON_SITEDIR)/site.conf $(GLUON_SITEDIR)/domains/ $(GLUON_SITEDIR)/i18n/
PKG_BUILD_DEPENDS := lua-cjson/host PKG_BUILD_DEPENDS := lua-cjson/host
@ -34,24 +34,42 @@ config GLUON_SITEDIR
string "Gluon site configuration directory" string "Gluon site configuration directory"
depends on PACKAGE_gluon-site depends on PACKAGE_gluon-site
default "" default ""
config GLUON_MULTIDOMAIN
bool "Gluon site configuration directory"
depends on PACKAGE_gluon-site
endef endef
define Build/Prepare define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)/domains mkdir -p $(PKG_BUILD_DIR)
endef
define GenerateJSON
GLUON_SITEDIR='$$(GLUON_SITEDIR)' GLUON_SITE_CONFIG='$(1).conf' lua -e 'print(require("cjson").encode(assert(dofile("../../scripts/site_config.lua"))))' > '$$(PKG_BUILD_DIR)/$(1).json'
endef endef
define Build/Compile define Build/Compile
$(foreach conf,site $(patsubst $(GLUON_SITEDIR)/%.conf,%,$(wildcard $(GLUON_SITEDIR)/domains/*.conf)), $(call GenerateJSON,site)
GLUON_SITEDIR='$(GLUON_SITEDIR)' GLUON_SITE_CONFIG='$(conf).conf' lua -e 'print(require("cjson").encode(assert(dofile("../../scripts/site_config.lua"))))' > '$(PKG_BUILD_DIR)/$(conf).json'
ifdef CONFIG_GLUON_MULTIDOMAIN
mkdir -p $(PKG_BUILD_DIR)/domains
$(foreach domain,$(patsubst $(GLUON_SITEDIR)/domains/%.conf,%,$(wildcard $(GLUON_SITEDIR)/domains/*.conf)),
$(call GenerateJSON,domains/$(domain))
) )
endif
$(call GluonBuildI18N,gluon-site,$(GLUON_SITEDIR)/i18n) $(call GluonBuildI18N,gluon-site,$(GLUON_SITEDIR)/i18n)
endef endef
define Package/gluon-site/install define Package/gluon-site/install
$(INSTALL_DIR) $(1)/lib/gluon $(INSTALL_DIR) $(1)/lib/gluon
$(INSTALL_DATA) $(PKG_BUILD_DIR)/site.json $(1)/lib/gluon/ $(INSTALL_DATA) $(PKG_BUILD_DIR)/site.json $(1)/lib/gluon/
ifdef CONFIG_GLUON_MULTIDOMAIN
$(CP) $(PKG_BUILD_DIR)/domains $(1)/lib/gluon/ $(CP) $(PKG_BUILD_DIR)/domains $(1)/lib/gluon/
endif
echo '$(GLUON_SITE_VERSION)' > $(1)/lib/gluon/site-version echo '$(GLUON_SITE_VERSION)' > $(1)/lib/gluon/site-version
echo '$(call qstrip,$(CONFIG_GLUON_RELEASE))' > $(1)/lib/gluon/release echo '$(call qstrip,$(CONFIG_GLUON_RELEASE))' > $(1)/lib/gluon/release

View File

@ -24,6 +24,10 @@ config 'CONFIG_PACKAGE_ATH_DEBUG=y'
try_config 'CONFIG_TARGET_MULTI_PROFILE=y' try_config 'CONFIG_TARGET_MULTI_PROFILE=y'
try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y'
if [ "$GLUON_MULTIDOMAIN" = 1 ]; then
config 'CONFIG_GLUON_MULTIDOMAIN=y'
fi
if [ "$GLUON_DEBUG" = 1 ]; then if [ "$GLUON_DEBUG" = 1 ]; then
config 'CONFIG_DEBUG=y' config 'CONFIG_DEBUG=y'
config 'CONFIG_NO_STRIP=y' config 'CONFIG_NO_STRIP=y'