2014-05-13 18:09:28 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2015-03-19 19:14:40 +00:00
|
|
|
PKG_NAME:=gluon-site
|
2015-03-21 17:26:54 +00:00
|
|
|
PKG_VERSION:=$(if $(GLUON_SITE_CODE),$(GLUON_SITE_CODE),1)
|
|
|
|
PKG_RELEASE:=$(GLUON_RELEASE)
|
2015-03-19 02:54:12 +00:00
|
|
|
|
2015-11-18 01:36:29 +00:00
|
|
|
PKG_FILE_DEPENDS := $(GLUON_SITEDIR)/site.conf $(GLUON_SITEDIR)/i18n/
|
2015-12-30 02:35:17 +00:00
|
|
|
PKG_BUILD_DEPENDS := luci-base/host lua-cjson/host
|
2014-05-13 18:09:28 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
|
|
|
|
2015-03-19 20:31:44 +00:00
|
|
|
include $(GLUONDIR)/include/package.mk
|
|
|
|
|
|
|
|
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
|
|
|
|
|
2014-05-13 18:09:28 +00:00
|
|
|
|
2015-03-19 19:14:40 +00:00
|
|
|
define Package/gluon-site
|
2014-05-13 18:09:28 +00:00
|
|
|
SECTION:=gluon
|
|
|
|
CATEGORY:=Gluon
|
2015-03-19 20:31:44 +00:00
|
|
|
TITLE:=Site-specific files of Gluon
|
2014-05-13 18:09:28 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2016-09-24 00:05:01 +00:00
|
|
|
lua -e 'print(require("cjson").encode(assert(dofile("$(GLUONDIR)/scripts/site_config.lua"))))' > $(PKG_BUILD_DIR)/site.json
|
2015-03-19 20:31:44 +00:00
|
|
|
$(call GluonBuildI18N,gluon-site,$(GLUON_SITEDIR)/i18n)
|
2014-05-13 18:09:28 +00:00
|
|
|
endef
|
|
|
|
|
2015-03-19 19:14:40 +00:00
|
|
|
define Package/gluon-site/install
|
2014-05-13 18:09:28 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/gluon
|
2016-09-24 00:05:01 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/site.json $(1)/lib/gluon/
|
2014-05-18 22:09:14 +00:00
|
|
|
echo "$(GLUON_RELEASE)" > $(1)/lib/gluon/release
|
2015-03-19 20:31:44 +00:00
|
|
|
|
|
|
|
$(call GluonInstallI18N,gluon-site,$(1))
|
2014-05-13 18:09:28 +00:00
|
|
|
endef
|
|
|
|
|
2015-03-19 19:14:40 +00:00
|
|
|
$(eval $(call BuildPackage,gluon-site))
|