Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffho-autoupdater
  3. PKG_VERSION:=1
  4. PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
  5. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  6. PKG_BUILD_DEPENDS := respondd
  7. include $(GLUONDIR)/include/package.mk
  8. define Package/ffho-autoupdater
  9. SECTION:=ffho
  10. CATEGORY:=Gluon
  11. TITLE:=Automatically update firmware
  12. DEPENDS:=+gluon-core +libgluonutil +micrond +autoupdater
  13. PROVIDES:=gluon-autoupdater
  14. MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net>
  15. URL:=https://git.c3pb.de/freifunk-pb/ffho-packages
  16. endef
  17. define Build/Prepare
  18. mkdir -p $(PKG_BUILD_DIR)
  19. $(CP) ./src/* $(PKG_BUILD_DIR)/
  20. endef
  21. define Build/Compile
  22. $(call Build/Compile/Default)
  23. $(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
  24. endef
  25. define Package/ffho-autoupdater/install
  26. $(CP) ./files/* $(1)/
  27. $(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
  28. $(INSTALL_DIR) $(1)/lib/gluon/respondd
  29. $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so
  30. if [ '$(GLUON_BRANCH)' ]; then \
  31. $(INSTALL_DIR) $(1)/lib/gluon/autoupdater; \
  32. echo '$(GLUON_BRANCH)' > $(1)/lib/gluon/autoupdater/default_branch; \
  33. fi
  34. endef
  35. define Package/ffho-autoupdater/postinst
  36. #!/bin/sh
  37. $(call GluonCheckSite,check_site.lua)
  38. endef
  39. $(eval $(call BuildPackage,ffho-autoupdater))