[ALL] Only install GUI container quadlet when GUI is selected

This commit is contained in:
j1nx 2023-12-28 10:37:43 +00:00
parent 3c911b941b
commit 622b4d24a0
1 changed files with 9 additions and 7 deletions

View File

@ -21,6 +21,15 @@ OVOS_CONTAINERS_IMAGES = ovos-messagebus \
ifeq ($(BR2_PACKAGE_OVOS_CONTAINERS_GUI),y)
OVOS_CONTAINERS_IMAGES += ovos-gui-websocket \
ovos-gui-shell
define OVOS_CONTAINERS_INSTALL_GUI_SERVICES
$(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-containers/ovos_gui_websocket.container \
$(TARGET_DIR)/home/ovos/.config/containers/systemd/ovos_gui_websocket.container
$(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-containers/ovos_gui.container \
$(TARGET_DIR)/home/ovos/.config/containers/systemd/ovos_gui.container
OVOS_CONTAINERS_POST_INSTALL_TARGET_HOOKS += OVOS_CONTAINERS_INSTALL_GUI_SERVICES
endef
endif
define OVOS_CONTAINERS_BUILD_CMDS
@ -39,13 +48,6 @@ define OVOS_CONTAINERS_INSTALL_IMAGES_CMDS
rm -rf $(TARGET_DIR)/home/ovos/.local/share/containers/storage/storage.lock
rm -rf $(TARGET_DIR)/home/ovos/.local/share/containers/storage/userns.lock
rm -rf $(TARGET_DIR)/home/ovos/.local/share/containers/storage/libpod
$(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-containers/ovos_gui_websocket.container \
$(TARGET_DIR)/home/ovos/.config/containers/systemd/ovos_gui_websocket.container
$(INSTALL) -D -m 644 $(BR2_EXTERNAL_OPENVOICEOS_PATH)/package/ovos-containers/ovos_gui.container \
$(TARGET_DIR)/home/ovos/.config/containers/systemd/ovos_gui.container
endef
$(eval $(generic-package))