2013-09-29 20:38:12 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2013-09-29 22:12:45 +00:00
|
|
|
PKG_NAME:=gluon-autoupdater
|
2014-07-11 12:06:42 +00:00
|
|
|
PKG_VERSION:=4
|
2013-09-29 20:38:12 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
2017-01-18 16:21:43 +00:00
|
|
|
|
|
|
|
PKG_CONFIG_DEPENDS := CONFIG_GLUON_BRANCH
|
2016-02-02 05:38:03 +00:00
|
|
|
PKG_BUILD_DEPENDS := respondd
|
2013-09-29 20:38:12 +00:00
|
|
|
|
2017-01-18 16:21:43 +00:00
|
|
|
|
2016-10-08 22:18:45 +00:00
|
|
|
include ../gluon.mk
|
2013-09-29 20:38:12 +00:00
|
|
|
|
2016-07-10 18:08:44 +00:00
|
|
|
|
2013-09-29 22:12:45 +00:00
|
|
|
define Package/gluon-autoupdater
|
|
|
|
SECTION:=gluon
|
|
|
|
CATEGORY:=Gluon
|
2016-02-02 05:38:03 +00:00
|
|
|
DEPENDS:=+gluon-core +libgluonutil +micrond +autoupdater
|
2013-09-29 20:38:12 +00:00
|
|
|
TITLE:=Automatically update firmware
|
|
|
|
endef
|
|
|
|
|
2017-01-18 16:21:43 +00:00
|
|
|
define Package/gluon-autoupdater/config
|
|
|
|
config GLUON_BRANCH
|
|
|
|
string "Gluon autoupdater branch"
|
|
|
|
depends on PACKAGE_gluon-autoupdater
|
|
|
|
default ""
|
|
|
|
endef
|
|
|
|
|
2013-09-29 20:38:12 +00:00
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
2016-02-02 05:38:03 +00:00
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
2013-09-29 20:38:12 +00:00
|
|
|
endef
|
|
|
|
|
2016-07-10 18:08:44 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(call Build/Compile/Default)
|
|
|
|
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
|
|
|
|
endef
|
|
|
|
|
2013-09-29 22:12:45 +00:00
|
|
|
define Package/gluon-autoupdater/install
|
2013-09-29 20:38:12 +00:00
|
|
|
$(CP) ./files/* $(1)/
|
2016-07-10 18:08:44 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
|
2014-02-06 18:57:39 +00:00
|
|
|
|
2016-02-02 05:38:03 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/gluon/respondd
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/respondd.so $(1)/lib/gluon/respondd/autoupdater.so
|
|
|
|
|
2017-01-18 16:21:43 +00:00
|
|
|
ifneq ($(CONFIG_GLUON_BRANCH),"")
|
|
|
|
$(INSTALL_DIR) $(1)/lib/gluon/autoupdater
|
|
|
|
echo '$(call qstrip,$(CONFIG_GLUON_BRANCH))' > $(1)/lib/gluon/autoupdater/default_branch
|
|
|
|
endif
|
2013-09-29 20:38:12 +00:00
|
|
|
endef
|
|
|
|
|
2014-07-05 00:48:56 +00:00
|
|
|
define Package/gluon-autoupdater/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
$(call GluonCheckSite,check_site.lua)
|
|
|
|
endef
|
|
|
|
|
2013-09-29 22:12:45 +00:00
|
|
|
$(eval $(call BuildPackage,gluon-autoupdater))
|