# # Copyright (C) 2019 Santiago Piccinini # # This is free software, licensed under the GNU General Public License v3. # include $(TOPDIR)/rules.mk GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) PKG_NAME:=safe-upgrade PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME) SECTION:=utils CATEGORY:=Utilities TITLE:=$(PKG_NAME) provides safe firmware upgrades using two partitions. MAINTAINER:=Santiago Piccinini DEPENDS:=+lua-argparse +luci-lib-jsonc +lime-system PKGARCH:=all endef define Package/$(PKG_NAME)/description $(PKG_NAME) provides safe firmware upgrades using two partitions and a confirmation step. See $(PKG_NAME)/Readme.md for more details. endef define Build/Configure endef define Build/Compile endef define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) ./files/usr/sbin/safe-upgrade $(1)/usr/sbin/ endef $(eval $(call BuildPackage,$(PKG_NAME)))