diff --git a/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application/vending-machine-control-application.service b/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application/vending-machine-control-application.service new file mode 100644 index 0000000000000000000000000000000000000000..a62cb54f9ea8e4292303c6034a464e98efd74dd0 --- /dev/null +++ b/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application/vending-machine-control-application.service @@ -0,0 +1,17 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +[Unit] +Description=Vending Machine Control Application +Requires=weston@root.service +After=weston@root.service + +[Service] +Environment="WAYLAND_DISPLAY=wayland-0" +Environment="XDG_RUNTIME_DIR=/run/user/0" +ExecStart=/usr/bin/vending-machine-control-application +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application_git.bb b/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application_git.bb index cb69e7752d4323b1ba58e32ba86d75976efa552d..c46275d9940fc8e5dd84149f62e0514950f58dff 100644 --- a/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application_git.bb +++ b/meta-oniro-blueprints/recipes-apps/vending-machine/vending-machine-control-application_git.bb @@ -10,14 +10,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ba963850f6731c74878fe839d227e675" SRC_URI = "git://git.ostc-eu.org/distro/components/${BPN};protocol=https;branch=main;" SRCREV = "e21c34cdd9b554978a80699f44fe35077b0dbb90" +SRC_URI += "file://${BPN}.service" S = "${WORKDIR}/git" DEPENDS="json-c libwebsockets" -inherit pkgconfig features_check +inherit pkgconfig features_check systemd + +SYSTEMD_SERVICE_${PN} = "${BPN}.service" + +REQUIRED_DISTRO_FEATURES = "systemd" EXTRA_OEMAKE += "DESTDIR=${D}" do_install() { oe_runmake install + install -d "${D}${systemd_system_unitdir}/" + install -m 0644 "${WORKDIR}/${BPN}.service" "${D}${systemd_system_unitdir}/" }