Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-autoupdater
  3. PKG_VERSION:=4
  4. PKG_RELEASE:=$(GLUON_BRANCH)
  5. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  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 Build/Prepare
  15. mkdir -p $(PKG_BUILD_DIR)
  16. $(CP) ./src/* $(PKG_BUILD_DIR)/
  17. endef
  18. define Build/Compile
  19. $(call Build/Compile/Default)
  20. $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
  21. endef
  22. define Package/gluon-autoupdater/install
  23. $(CP) ./files/* $(1)/
  24. $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
  25. $(INSTALL_DIR) $(1)/lib/gluon/respondd
  26. $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so
  27. if [ '$(GLUON_BRANCH)' ]; then \
  28. $(INSTALL_DIR) $(1)/lib/gluon/autoupdater; \
  29. echo '$(GLUON_BRANCH)' > $(1)/lib/gluon/autoupdater/default_branch; \
  30. fi
  31. endef
  32. define Package/gluon-autoupdater/postinst
  33. #!/bin/sh
  34. $(call GluonCheckSite,check_site.lua)
  35. endef
  36. $(eval $(call BuildPackage,gluon-autoupdater))