gluon/package/gluon-site/Makefile

44 lines
1.0 KiB
Makefile
Raw Normal View History

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