Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-web
  3. PKG_VERSION:=1
  4. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  5. include ../gluon.mk
  6. PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
  7. PKG_INSTALL:=1
  8. define Package/gluon-web
  9. SECTION:=gluon
  10. CATEGORY:=Gluon
  11. TITLE:=Minimal Lua web framework derived from LuCI
  12. DEPENDS:=+lua-jsonc +luci-lib-nixio
  13. endef
  14. define lang-config
  15. config GLUON_WEB_LANG_$(1)
  16. bool "$(GLUON_LANG_$(1)) language support for gluon-web"
  17. depends on PACKAGE_gluon-web
  18. endef
  19. define Package/gluon-web/config
  20. $(foreach lang,$(GLUON_SUPPORTED_LANGS),$(call lang-config,$(lang)))
  21. endef
  22. define Build/Prepare
  23. mkdir -p $(PKG_BUILD_DIR)
  24. $(CP) ./src/* $(PKG_BUILD_DIR)/
  25. endef
  26. define Build/Compile
  27. $(call Build/Compile/Default)
  28. $(call GluonBuildI18N,gluon-web,i18n)
  29. $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
  30. endef
  31. define Package/gluon-web/install
  32. $(CP) ./files/* $(1)/
  33. $(CP) $(PKG_INSTALL_DIR)/* $(1)/
  34. $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
  35. $(call GluonInstallI18N,gluon-web,$(1))
  36. endef
  37. $(eval $(call BuildPackage,gluon-web))