aboutsummaryrefslogtreecommitdiff
path: root/updater-ng-auto/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'updater-ng-auto/Makefile')
-rw-r--r--updater-ng-auto/Makefile31
1 files changed, 21 insertions, 10 deletions
diff --git a/updater-ng-auto/Makefile b/updater-ng-auto/Makefile
index 4c1935a..21243c5 100644
--- a/updater-ng-auto/Makefile
+++ b/updater-ng-auto/Makefile
@@ -12,11 +12,10 @@ PKG_VERSION:=59.3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater.git
-PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
-PKG_MAINTAINER:=Michal Vaner <michal.vaner@nic.cz>
+PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)
HOST_BUILD_DEPENDS:=curl/host libevent2/host lua/host
@@ -41,10 +40,10 @@ define Package/$(PKG_NAME)/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/updater-wipe.sh $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/updater
- $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/* $(1)/etc/updater
-
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/entry.lua $(1)/etc/updater
$(INSTALL_DIR) $(1)/etc/updater/conf.d
- touch $(1)/etc/updater/conf.d/.keep
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/base.lua $(1)/etc/updater/conf.d/base.lua
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/configs/example.lua $(1)/etc/updater/conf.d/example.lua
$(INSTALL_DIR) $(1)/etc/updater/hook_preupdate
$(INSTALL_DIR) $(1)/etc/updater/hook_postupdate
@@ -72,8 +71,8 @@ endif
endef
define Package/$(PKG_NAME)/conffiles
-/etc/updater/auto.lua
-/etc/updater/user.lua
+/etc/updater/conf.d/base.lua
+/etc/updater/conf.d/example.lua
/etc/config/updater
endef
@@ -93,6 +92,14 @@ sed -E '/^(Install|Package) +[^(]/{
}' "$$IPKG_INSTROOT/etc/updater/auto.lua" > "$$AUTOTMP"
# Note: Edit in place in busybox limits regexp syntax so we are using our temporally file
mv "$$AUTOTMP" "$$IPKG_INSTROOT/etc/updater/auto.lua"
+
+# With updater version 60 all configurations were moved to /etc/updater/conf.d/
+conf_move() {
+ [ ! -f "$$IPKG_INSTROOT/etc/updater/$$1" ] || \
+ mv "$$IPKG_INSTROOT/etc/updater/$$1" "$$IPKG_INSTROOT/etc/updater/conf.d/$$2"
+}
+conf_move user.lua user.lua
+conf_move auto.lua opkg-auto.lua
endef
define Build/Compile
@@ -120,7 +127,9 @@ endef
define Package/$(PKG_NAME)-localrepo/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/localrepo $(1)/usr/bin/localrepo
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/localrepo $(1)/usr/bin/localrepo
+ $(INSTALL_DIR) $(1)/etc/updater/conf.d
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/opkg-wrapper/opkg.lua $(1)/etc/updater/conf.d/opkg.lua
endef
@@ -131,8 +140,10 @@ endef
define Package/$(PKG_NAME)-opkg/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/opkg $(1)/usr/bin/opkg-pkgupdate-wrapper.sh
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/content2localrepo $(1)/usr/bin/updater-ng-opkg-content2localrepo.sh
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/opkg-wrapper/opkg $(1)/usr/bin/opkg-pkgupdate-wrapper.sh
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/content2localrepo $(1)/usr/bin/updater-ng-opkg-content2localrepo.sh
+ $(INSTALL_DIR) $(1)/etc/updater/conf.d
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/opkg-wrapper/opkg.lua $(1)/etc/updater/conf.d/opkg.lua
endef
define Package/$(PKG_NAME)-opkg/postinst