Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-site
  3. PKG_VERSION:=$(if $(GLUON_SITE_CODE),$(GLUON_SITE_CODE),1)
  4. PKG_RELEASE:=$(GLUON_RELEASE)
  5. PKG_FILE_DEPENDS := $(GLUON_SITEDIR)/site.conf $(GLUON_SITEDIR)/i18n/
  6. PKG_BUILD_DEPENDS := luci-base/host lua-cjson/host
  7. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  8. include $(GLUONDIR)/include/package.mk
  9. PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
  10. define Package/gluon-site
  11. SECTION:=gluon
  12. CATEGORY:=Gluon
  13. TITLE:=Site-specific files of Gluon
  14. endef
  15. define Build/Prepare
  16. mkdir -p $(PKG_BUILD_DIR)
  17. endef
  18. define Build/Configure
  19. endef
  20. define Build/Compile
  21. lua -e 'print(require("cjson").encode(assert(dofile("$(GLUONDIR)/scripts/site_config.lua"))))' > $(PKG_BUILD_DIR)/site.json
  22. $(call GluonBuildI18N,gluon-site,$(GLUON_SITEDIR)/i18n)
  23. endef
  24. define Package/gluon-site/install
  25. $(INSTALL_DIR) $(1)/lib/gluon
  26. $(INSTALL_DATA) $(PKG_BUILD_DIR)/site.json $(1)/lib/gluon/
  27. echo "$(GLUON_RELEASE)" > $(1)/lib/gluon/release
  28. $(call GluonInstallI18N,gluon-site,$(1))
  29. endef
  30. $(eval $(call BuildPackage,gluon-site))