contrib/package: move remote-update to own package
This commit is contained in:
parent
601c020b4e
commit
96a8d3d0d8
2 changed files with 45 additions and 1 deletions
43
contrib/package/remote-update/Makefile
Normal file
43
contrib/package/remote-update/Makefile
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the Apache 2.0 license.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=remote-update
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/remote-update
|
||||||
|
SECTION:=luci
|
||||||
|
CATEGORY:=LuCI
|
||||||
|
SUBMENU:=Freifunk
|
||||||
|
TITLE:=Freifunk remote update utility.
|
||||||
|
DEPENDS:=@TARGET_atheros||@TARGET_ar71xx||@TARGET_brcm-2.4
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/remote-update/description
|
||||||
|
The freifunk remote-update utility uses sysupgrade to reflash the currently
|
||||||
|
running firmware while keeping most of the existing configuratio.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/remote-update/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,remote-update))
|
|
@ -174,6 +174,7 @@ local image_name="${image_url##*/}"
|
||||||
local arch=$(find_architecture)
|
local arch=$(find_architecture)
|
||||||
local image=$(find_image "$arch")
|
local image=$(find_image "$arch")
|
||||||
local repo=$(uci get freifunk.upgrade.repository 2>/dev/null)
|
local repo=$(uci get freifunk.upgrade.repository 2>/dev/null)
|
||||||
|
repo=${repo:-$(uci get system.upgrade.repository 2>/dev/null)}
|
||||||
|
|
||||||
[ -z "$arch" ] && {
|
[ -z "$arch" ] && {
|
||||||
echo "Can not determine the current architecture."
|
echo "Can not determine the current architecture."
|
||||||
|
@ -181,7 +182,7 @@ local image_name="${image_url##*/}"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$repo" ] && {
|
[ -z "$repo" ] && {
|
||||||
echo "No repository configured in 'freifunk.upgrade.repository'."
|
echo "No repository configured in 'system.upgrade.repository'."
|
||||||
echo "Use the '-u' flag to specify an image location."
|
echo "Use the '-u' flag to specify an image location."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
Loading…
Reference in a new issue