Makefile 993 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. $(call GluonBuildI18N,gluon-site,$(GLUON_SITEDIR)/i18n)
  22. endef
  23. define Package/gluon-site/install
  24. $(INSTALL_DIR) $(1)/lib/gluon
  25. lua -e 'print(require("cjson").encode(assert(dofile("$(GLUONDIR)/scripts/site_config.lua"))))' > $(1)/lib/gluon/site.json
  26. echo "$(GLUON_RELEASE)" > $(1)/lib/gluon/release
  27. $(call GluonInstallI18N,gluon-site,$(1))
  28. endef
  29. $(eval $(call BuildPackage,gluon-site))