The new options are CONFIG_GLUON_AUTOUPDATER_BRANCH and CONFIG_GLUON_AUTOUPDATER_ENABLED and allow to control the default branch and default enable status separately. The `or ''` fallback in targets/generic is removed, as GLUON_ENV will set all variables in GLUON_VARS, making previously non-existing variables exist with an empty value.
		
			
				
	
	
		
			32 lines
		
	
	
		
			827 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			827 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
include $(TOPDIR)/rules.mk
 | 
						|
 | 
						|
PKG_NAME:=gluon-autoupdater
 | 
						|
PKG_VERSION:=4
 | 
						|
 | 
						|
PKG_CONFIG_DEPENDS := CONFIG_GLUON_AUTOUPDATER_BRANCH CONFIG_GLUON_AUTOUPDATER_ENABLED
 | 
						|
 | 
						|
include ../gluon.mk
 | 
						|
 | 
						|
define Package/gluon-autoupdater
 | 
						|
  DEPENDS:=+gluon-core +libgluonutil +micrond +autoupdater
 | 
						|
  TITLE:=Automatically update firmware
 | 
						|
endef
 | 
						|
 | 
						|
define Package/gluon-autoupdater/config
 | 
						|
	source "$(SOURCE)/Config.in"
 | 
						|
endef
 | 
						|
 | 
						|
define Package/gluon-autoupdater/install
 | 
						|
	$(Gluon/Build/Install)
 | 
						|
 | 
						|
	$(INSTALL_DIR) $(1)/lib/gluon/autoupdater
 | 
						|
  ifneq ($(CONFIG_GLUON_AUTOUPDATER_BRANCH),"")
 | 
						|
	echo '$(call qstrip,$(CONFIG_GLUON_AUTOUPDATER_BRANCH))' > $(1)/lib/gluon/autoupdater/default_branch
 | 
						|
  endif
 | 
						|
  ifneq ($(CONFIG_GLUON_AUTOUPDATER_ENABLED),)
 | 
						|
	touch $(1)/lib/gluon/autoupdater/default_enabled
 | 
						|
  endif
 | 
						|
endef
 | 
						|
 | 
						|
$(eval $(call BuildPackageGluon,gluon-autoupdater))
 |