diff --git a/recipes-extended/rialto/files/rialto-servermanager.service b/recipes-extended/rialto/files/rialto-servermanager.service new file mode 100644 index 0000000..1b1cf32 --- /dev/null +++ b/recipes-extended/rialto/files/rialto-servermanager.service @@ -0,0 +1,8 @@ +[Unit] +Description=RialtoServerManager service +Documentation=https://github.com/rdkcentral/rialto +[Service] +Environment="RIALTO_SOCKET_PATH=/tmp/rialto-0" +ExecStart=/usr/bin/RialtoServer +[Install] +WantedBy=multi-user.target diff --git a/recipes-extended/rialto/files/rialto-tmpfiles.d-conf b/recipes-extended/rialto/files/rialto-tmpfiles.d-conf new file mode 100644 index 0000000..ca72984 --- /dev/null +++ b/recipes-extended/rialto/files/rialto-tmpfiles.d-conf @@ -0,0 +1,5 @@ +#Create a direcotry for rialto socket + +#Type Path Mode UID GID Age Argument + +d /run/rialto/ 0666 root root diff --git a/recipes-extended/rialto/files/rialto.default-env b/recipes-extended/rialto/files/rialto.default-env new file mode 100644 index 0000000..da13df6 --- /dev/null +++ b/recipes-extended/rialto/files/rialto.default-env @@ -0,0 +1,10 @@ +# Rialto socket path +# TODO: this should go to /run/rialto/rialto-0 +# but RialtoServerManager hardcoded it to /tmp. +RIALTO_SOCKET_PATH=/tmp/rialto-0 +# To enable debugging uncomment the following +# and restart rialto-servermanager.service. +#RIALTO_DEBUG=5 +#GST_DEBUG=4 + +SESSION_SERVER_ENV_VARS='XDG_RUNTIME_DIR=/run;RIALTO_SINKS_RANK=0;GST_REGISTRY=/tmp/rialto-server-gstreamer-cache.bin;WAYLAND_DISPLAY=wayland-0;FORCE_SAP=TRUE;FORCE_SVP=TRUE' diff --git a/recipes-extended/rialto/rialto_git.bbappend b/recipes-extended/rialto/rialto_git.bbappend new file mode 100644 index 0000000..5003c99 --- /dev/null +++ b/recipes-extended/rialto/rialto_git.bbappend @@ -0,0 +1,24 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://rialto-servermanager.service" +SRC_URI += "file://rialto-tmpfiles.d-conf" +SRC_URI += "file://rialto.default-env" + +inherit systemd +SYSTEMD_PACKAGES = '${@bb.utils.contains("PACKAGECONFIG", "servermanager", "${PN}-servermanager", "", d)}' +SYSTEMD_SERVICE_${PN}-servermanager = "rialto-servermanager.service" + +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'servermanager', 'true', 'false', d)}; then + # Install rialto server manager systemd service file + install -p -m 0644 -D ${WORKDIR}/rialto-servermanager.service ${D}${systemd_unitdir}/system/rialto-servermanager.service + # Install configuration for creating directory for rialto socket + install -p -m 0644 -D ${WORKDIR}/rialto-tmpfiles.d-conf ${D}${sysconfdir}/tmpfiles.d/rialto.conf + # Install rialto configuration file + install -p -m 0644 -D ${WORKDIR}/rialto.default-env ${D}${sysconfdir}/default/rialto + fi +} + +FILES_${PN}-servermanager += '${@bb.utils.contains("PACKAGECONFIG", "servermanager", "${systemd_unitdir}/system/rialto-servermanager.service", "", d)}' +FILES_${PN}-servermanager += '${@bb.utils.contains("PACKAGECONFIG", "servermanager", "${sysconfdir}/tmpfiles.d/rialto.conf", "", d)}' +FILES_${PN}-servermanager += '${@bb.utils.contains("PACKAGECONFIG", "servermanager", "${sysconfdir}/default/rialto", "", d)}'