Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 Package/ffho-autoupdater/install
  22. $(CP) ./files/* $(1)/
  23. $(INSTALL_DIR) $(1)/lib/gluon/respondd
  24. $(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so
  25. if [ '$(GLUON_BRANCH)' ]; then \
  26. $(INSTALL_DIR) $(1)/lib/gluon/autoupdater; \
  27. echo '$(GLUON_BRANCH)' > $(1)/lib/gluon/autoupdater/default_branch; \
  28. fi
  29. endef
  30. define Package/ffho-autoupdater/postinst
  31. #!/bin/sh
  32. $(call GluonCheckSite,check_site.lua)
  33. endef
  34. $(eval $(call BuildPackage,ffho-autoupdater))