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/Makefile29
1 files changed, 22 insertions, 7 deletions
diff --git a/updater-ng-auto/Makefile b/updater-ng-auto/Makefile
index 8ea0c76..051d04c 100644
--- a/updater-ng-auto/Makefile
+++ b/updater-ng-auto/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=updater-ng
-PKG_VERSION:=59.3
+PKG_VERSION:=60.0.2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater.git
@@ -64,14 +64,13 @@ endif
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/init $(1)/etc/init.d/updater
$(INSTALL_DIR) $(1)/etc/cron.d
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/cron $(1)/etc/cron.d/updater
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/cron $(1)/etc/cron.d/updater
$(INSTALL_DIR) $(1)/etc/ssl
$(INSTALL_DATA) $(PKG_BUILD_DIR)/updater.pem $(1)/etc/ssl/updater.pem
endef
define Package/$(PKG_NAME)/conffiles
-/etc/updater/conf.d/base.lua
/etc/updater/conf.d/example.lua
/etc/config/updater
endef
@@ -93,10 +92,11 @@ sed -E '/^(Install|Package) +[^(]/{
# 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/
+# With updater version 60.0 all configurations were moved to /etc/updater/conf.d/
conf_move() {
- [ ! -f "$$IPKG_INSTROOT/etc/updater/$$1" ] || \
+ if [ -f "$$IPKG_INSTROOT/etc/updater/$$1" -a ! -f "$$IPKG_INSTROOT/etc/updater/conf.d/$$2" ]; then
mv "$$IPKG_INSTROOT/etc/updater/$$1" "$$IPKG_INSTROOT/etc/updater/conf.d/$$2"
+ fi
}
conf_move user.lua user.lua
conf_move auto.lua opkg-auto.lua
@@ -141,14 +141,18 @@ endef
define Package/$(PKG_NAME)-opkg/install
$(INSTALL_DIR) $(1)/usr/bin
$(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)/usr/share/updater
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/localrepo/content2localrepo $(1)/usr/share/updater/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
+# We are calling migration to localrepo from updater-ng-opkg package posinst as
+# this one is called after updater-ng-localrepo one and script expect both of
+# these packages.
define Package/$(PKG_NAME)-opkg/postinst
[ -n "$$IPKG_INSTROOT" ] || {
- /usr/bin/updater-ng-opkg-content2localrepo.sh
+ /usr/share/updater/opkg-content2localrepo.sh
}
endef
@@ -171,8 +175,19 @@ define Package/opkg-trans/install
true
endef
+# This is same case as opkg-trans. Updater is package with originally obsolete
+# updater version.
+define Package/updater
+ TITLE:=Dummy updater package
+endef
+
+define Package/updater/install
+ true
+endef
+
$(eval $(call BuildPackage,updater-ng))
$(eval $(call BuildPackage,updater-ng-localrepo))
$(eval $(call BuildPackage,updater-ng-opkg))
$(eval $(call BuildPackage,opkg-trans))
+$(eval $(call BuildPackage,updater))
$(eval $(call HostBuild))