gluon-core, gluon-site: get version numbers from .config
Calling git describe directly breaks isolation between the build system and packages. Replace this with proper .config variables, like we already do for GLUON_RELEASE. Also replace the PKG_VERSION hack with a static '1', as we do for other packages - while having those version numbers in opkg was cute, it was also entirely useless. Having a fixed PKG_VERSION allows us to remove the PKG_BUILD_DIR override as well.
This commit is contained in:
parent
531937cf6f
commit
a6187cce70
@ -1,11 +1,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=gluon-core
|
PKG_NAME:=gluon-core
|
||||||
|
PKG_VERSION:=1
|
||||||
|
|
||||||
GLUON_VERSION = $(shell git describe --always --dirty=+ 2>/dev/null || echo unknown)
|
PKG_CONFIG_DEPENDS := CONFIG_GLUON_VERSION
|
||||||
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_VERSION))
|
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|
||||||
|
|
||||||
include ../gluon.mk
|
include ../gluon.mk
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
@ -22,6 +20,11 @@ define Package/gluon-core/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/gluon-core/config
|
define Package/gluon-core/config
|
||||||
|
config GLUON_VERSION
|
||||||
|
string "Gluon version number"
|
||||||
|
depends on PACKAGE_gluon-core
|
||||||
|
default ""
|
||||||
|
|
||||||
config GLUON_MINIFY
|
config GLUON_MINIFY
|
||||||
bool "Minify Gluon scripts"
|
bool "Minify Gluon scripts"
|
||||||
default y
|
default y
|
||||||
@ -36,7 +39,7 @@ define Package/gluon-core/install
|
|||||||
$(Gluon/Build/Install)
|
$(Gluon/Build/Install)
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/lib/gluon
|
$(INSTALL_DIR) $(1)/lib/gluon
|
||||||
echo '$(GLUON_VERSION)' > $(1)/lib/gluon/gluon-version
|
echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackageGluon,gluon-core))
|
$(eval $(call BuildPackageGluon,gluon-core))
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=gluon-site
|
PKG_NAME:=gluon-site
|
||||||
|
PKG_VERSION:=1
|
||||||
|
|
||||||
GLUON_SITEDIR = $(call qstrip,$(CONFIG_GLUON_SITEDIR))
|
GLUON_SITEDIR = $(call qstrip,$(CONFIG_GLUON_SITEDIR))
|
||||||
GLUON_SITE_VERSION = $(shell ( cd '$(GLUON_SITEDIR)' && git --git-dir=.git describe --always --dirty=+ ) 2>/dev/null || echo unknown)
|
|
||||||
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_SITE_VERSION))
|
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS := CONFIG_GLUON_RELEASE CONFIG_GLUON_SITEDIR CONFIG_GLUON_MULTIDOMAIN
|
PKG_CONFIG_DEPENDS := CONFIG_GLUON_SITE_VERSION 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-jsonc/host gluon-web/host
|
PKG_BUILD_DEPENDS := lua-jsonc/host gluon-web/host
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|
||||||
|
|
||||||
include ../gluon.mk
|
include ../gluon.mk
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
||||||
@ -21,6 +18,11 @@ define Package/gluon-site
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/gluon-site/config
|
define Package/gluon-site/config
|
||||||
|
config GLUON_SITE_VERSION
|
||||||
|
string "Gluon site version number"
|
||||||
|
depends on PACKAGE_gluon-site
|
||||||
|
default ""
|
||||||
|
|
||||||
config GLUON_RELEASE
|
config GLUON_RELEASE
|
||||||
string "Gluon release number"
|
string "Gluon release number"
|
||||||
depends on PACKAGE_gluon-site
|
depends on PACKAGE_gluon-site
|
||||||
@ -83,7 +85,7 @@ define Package/gluon-site/install
|
|||||||
$(CP) $(PKG_BUILD_DIR)/domains $(1)/lib/gluon/
|
$(CP) $(PKG_BUILD_DIR)/domains $(1)/lib/gluon/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
echo '$(GLUON_SITE_VERSION)' > $(1)/lib/gluon/site-version
|
echo '$(call qstrip,$(CONFIG_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
|
||||||
|
|
||||||
$(GluonInstallI18N)
|
$(GluonInstallI18N)
|
||||||
|
Loading…
Reference in New Issue
Block a user