[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH v4] seatd: add seatd recipe
From:       "Randy Li" <ayaka () soulik ! info>
Date:       2021-04-29 17:40:27
Message-ID: 20210429174028.58294-1-ayaka () soulik ! info
[Download RAW message or body]

Content-Transfer-Encoding: quoted-printable

Seat management takes care of mediating access to shared
devices (graphics, input), without requiring the applications
needing access to be root.

Signed-off-by: ayaka <ayaka@soulik.info>
---
 meta/recipes-core/seatd/libseat/init     | 50 ++++++++++++++++++++++++
 meta/recipes-core/seatd/libseat_0.5.0.bb | 42 ++++++++++++++++++++
 2 files changed, 92 insertions(+)
 create mode 100644 meta/recipes-core/seatd/libseat/init
 create mode 100644 meta/recipes-core/seatd/libseat_0.5.0.bb

diff --git a/meta/recipes-core/seatd/libseat/init \
b/meta/recipes-core/seatd/libseat/init new file mode 100644
index 0000000000..8c9d77255d
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat/init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides:          seatd
+# Short-Description: Start seat management daemon
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:     $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+test -x /usr/bin/seatd || exit 0
+
+# For configuration of the init script use the file
+# /etc/default/seatd, do not edit this init script.
+
+seatd_group="seatd"
+
+[ -e /etc/default/seatd ] && . /etc/default/seatd
+
+NAME=seatd
+DAEMON=/usr/bin/seatd
+STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1'
+
+. /etc/init.d/functions
+
+case "$1" in
+  start)
+    start-stop-daemon --start --backgroud --quiet --pidfile /var/run/$NAME.pid \
+	    --exec $DAEMON -- -g $seatd_group
+    ;;
+
+  stop)
+    killproc $NAME
+    ;;
+
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
+
+esac
+
+exit 0
diff --git a/meta/recipes-core/seatd/libseat_0.5.0.bb \
b/meta/recipes-core/seatd/libseat_0.5.0.bb new file mode 100644
index 0000000000..fb637d5ca7
--- /dev/null
+++ b/meta/recipes-core/seatd/libseat_0.5.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Seat management daemon and library"
+HOMEPAGE = "https://git.sr.ht/~kennylevinsen/seatd"
+SECTION = "base"
+
+DESCRIPTION = "A minimal seat management daemon, and a universal seat management \
+library. Seat management takes care of mediating access to shared devices \
+(graphics, input), without requiring the applications needing access to be root."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=3;md5=6a01e8ccc65bea4e8bfa79b09ea1444c"
+
+SRCREV = "355cc9c944a29d29736de84e782a2e91168f1a59"
+SRCBRANCH = "master"
+SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=http;branch=${SRCBRANCH} \
+           file://init"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson useradd update-rc.d
+
+PACKAGECONFIG ??= "${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager', 'systemd', \
'systemd', 'seatd', d)}" +
+PACKAGECONFIG[seatd] = "-Dseatd=enabled -Dserver=enabled, -Dseatd=disabled \
-Dserver=disabled" +PACKAGECONFIG[systemd] = "-Dlogind=systemd, -Dlogind=disabled, \
systemd dbus" +
+PACKAGES += "seatd"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_seatd = "${bindir}/seatd ${sysconfdir}"
+
+do_install_append() {
+	if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
+		install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/seatd
+	fi
+}
+
+INITSCRIPT_NAME = "seatd"
+INITSCRIPT_PARAMS = "start 8 5 2 . stop 21 0 1 6 ."
+
+USERADD_PACKAGES = "seatd"
+
+GROUPADD_PARAM_seatd = "-r seatd"
-- 
2.30.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151113): https://lists.openembedded.org/g/openembedded-core/message/151113
Mute This Topic: https://lists.openembedded.org/mt/82461979/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic