From 46f5bb3017234c8936cb9dcf5ee19a916eaebd01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 22 Mar 2018 13:16:55 +0100 Subject: Update updater-ng package --- updater-ng/Makefile | 55 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 7 deletions(-) (limited to 'updater-ng/Makefile') diff --git a/updater-ng/Makefile b/updater-ng/Makefile index a154661..be5b4ff 100644 --- a/updater-ng/Makefile +++ b/updater-ng/Makefile @@ -13,10 +13,13 @@ PKG_SOURCE_URL:=https://gitlab.labs.nic.cz/turris/updater.git PKG_SOURCE_BRANCH:=master PKG_MAINTAINER:=CZ.NIC HOST_BUILD_DEPENDS:=curl/host libevent2/host lua/host +PKG_BUILD_DEPENDS+=busybox-static include $(INCLUDE_DIR)/pkgauto.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk +$(call include_mk, python-package.mk) +$(call include_mk, python3-package.mk) define Package/$(PKG_NAME) TITLE:=The next generation updater @@ -30,9 +33,6 @@ define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/opkg-trans $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/pkgupdate $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/updater.sh $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/updater-unstuck.sh $(1)/usr/bin/ - $(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/entry.lua $(1)/etc/updater @@ -57,9 +57,6 @@ endif $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pkgupdate/init $(1)/etc/init.d/updater - - $(INSTALL_DIR) $(1)/etc/cron.d - $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/pkgupdate/cron $(1)/etc/cron.d/updater endef define Package/$(PKG_NAME)/conffiles @@ -99,7 +96,9 @@ conf_move auto.lua opkg-auto.lua endef define Build/Compile - $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) NO_DOC=1 LUA_COMPILE:=no UPDATER_VERSION:=$(PKG_VERSION) + $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) NO_DOC=1 LUA_COMPILE:=no UPDATER_VERSION:=$(PKG_VERSION) BUSYBOX_EXEC=$(STAGING_DIR)/bin/busybox-static + $(call Build/Compile/PyMod,src/supervisor,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py2) + $(call Build/Compile/Py3Mod,src/supervisor,install --prefix="/usr" --root=$(PKG_INSTALL_DIR)/py3) endef define Host/Compile @@ -116,6 +115,38 @@ define Host/Install endef +define Package/$(PKG_NAME)-supervisor + TITLE:=Next generation updater supervisor + DEPENDS:=+updater-ng-py2-supervisor +endef + +define Package/$(PKG_NAME)-supervisor/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/updater-supervisor $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/updater.sh $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/cron.d + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/supervisor/cron $(1)/etc/cron.d/updater + + $(INSTALL_DIR) $(1)/etc/updater/hook_postupdate + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/supervisor/hook_postupdate $(1)/etc/updater/hook_postupdate/99_approvals_cleanup +endef + + +define Package/$(PKG_NAME)-py2-supervisor + TITLE:=Next generation updater supervisor Python 2 library + DEPENDS:=+updater-ng +python-light +python-uci +userlists +l10n_supported + EXTRA_DEPENDS:=userlists (>=11) +endef + + +define Package/$(PKG_NAME)-py3-supervisor + TITLE:=Next generation updater supervisor Python3 library + DEPENDS:=+updater-ng +python3-light python3-uci +userlists +l10n_supported + EXTRA_DEPENDS:=userlists (>=11) +endef + + define Package/$(PKG_NAME)-localrepo TITLE:=Next generation updater local repository manager DEPENDS:=+python-light @@ -190,7 +221,17 @@ define Package/updater/install true endef +PKG_INSTALL_DIR_ORIG:="$(PKG_INSTALL_DIR)" +PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py2" +$(eval $(call PyPackage,updater-ng-py2-supervisor)) +PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)/py3" +$(eval $(call Py3Package,updater-ng-py3-supervisor)) +PKG_INSTALL_DIR:="$(PKG_INSTALL_DIR_ORIG)" + $(eval $(call BuildPackage,updater-ng)) +$(eval $(call BuildPackage,updater-ng-supervisor)) +$(eval $(call BuildPackage,updater-ng-py2-supervisor)) +$(eval $(call BuildPackage,updater-ng-py3-supervisor)) $(eval $(call BuildPackage,updater-ng-localrepo)) $(eval $(call BuildPackage,updater-ng-opkg)) $(eval $(call BuildPackage,opkg-trans)) -- cgit v1.2.3