Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-autoupdater
  3. PKG_VERSION:=4
  4. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  5. PKG_CONFIG_DEPENDS := CONFIG_GLUON_BRANCH
  6. PKG_BUILD_DEPENDS := respondd
  7. include ../gluon.mk
  8. define Package/gluon-autoupdater
  9. SECTION:=gluon
  10. CATEGORY:=Gluon
  11. DEPENDS:=+gluon-core +libgluonutil +micrond +autoupdater
  12. TITLE:=Automatically update firmware
  13. endef
  14. define Package/gluon-autoupdater/config
  15. config GLUON_BRANCH
  16. string "Gluon autoupdater branch"
  17. depends on PACKAGE_gluon-autoupdater
  18. default ""
  19. endef
  20. define Build/Prepare
  21. mkdir -p $(PKG_BUILD_DIR)
  22. $(CP) ./src/* $(PKG_BUILD_DIR)/
  23. endef
  24. define Build/Compile
  25. $(call Build/Compile/Default)
  26. $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
  27. endef
  28. define Package/gluon-autoupdater/install
  29. $(CP) ./files/* $(1)/
  30. $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
  31. $(INSTALL_DIR) $(1)/lib/gluon/respondd
  32. $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so
  33. ifneq ($(CONFIG_GLUON_BRANCH),"")
  34. $(INSTALL_DIR) $(1)/lib/gluon/autoupdater
  35. echo '$(call qstrip,$(CONFIG_GLUON_BRANCH))' > $(1)/lib/gluon/autoupdater/default_branch
  36. endif
  37. endef
  38. define Package/gluon-autoupdater/postinst
  39. #!/bin/sh
  40. $(call GluonCheckSite,check_site.lua)
  41. endef
  42. $(eval $(call BuildPackage,gluon-autoupdater))