From 72d12dac06bf7b06a8d25fafe0a5c9cdb644a4b3 Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Fri, 17 Jul 2020 17:41:16 +0200 Subject: wayland-app-launch: add possibility to set environment for app Related-to: ELB-2838 Signed-off-by: Philippe Schenker --- recipes-graphics/wayland-app-launch/wayland-app-launch.inc | 5 ++++- .../wayland-app-launch/wayland-app-launch.service | 12 ------------ .../wayland-app-launch/wayland-app-launch.service.in | 13 +++++++++++++ 3 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service create mode 100644 recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc index 20a6c25..cd72391 100644 --- a/recipes-graphics/wayland-app-launch/wayland-app-launch.inc +++ b/recipes-graphics/wayland-app-launch/wayland-app-launch.inc @@ -10,13 +10,16 @@ RDEPENDS_${PN} += "weston-init ${INITIAL_APP_PKGS}" S = "${WORKDIR}" SRC_URI = " \ - file://wayland-app-launch.service \ + file://wayland-app-launch.service.in \ file://wayland-app-launch.sh.in \ " FILESEXTRAPATHS_prepend := "${THISDIR}/wayland-app-launch:" +APPLICATION_ENVIRONMENT ??= "" + do_compile () { sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" wayland-app-launch.sh.in > wayland-app-launch.sh + sed -e "s:@@application-environment@@:${APPLICATION_ENVIRONMENT}:" wayland-app-launch.service.in > wayland-app-launch.service } do_install () { diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service deleted file mode 100644 index d4b1008..0000000 --- a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Start a wayland application -After=weston@root.service -Requires=weston@root.service - -[Service] -Restart=always -Type=forking -ExecStart=/usr/bin/wayland-app-launch.sh - -[Install] -WantedBy=multi-user.target diff --git a/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in new file mode 100644 index 0000000..c0f15b1 --- /dev/null +++ b/recipes-graphics/wayland-app-launch/wayland-app-launch/wayland-app-launch.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Start a wayland application +After=weston@root.service +Requires=weston@root.service + +[Service] +Restart=always +Type=forking +Environment=@@application-environment@@ +ExecStart=/usr/bin/wayland-app-launch.sh + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3