Skip to content

Commit f149a64

Browse files
committed
Add core::seatd v0.8.0
1 parent 226c397 commit f149a64

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

recipes/core/seatd.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
inherit: [meson, init]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "0.8.0"
5+
PKG_LICENSE: "MIT"
6+
7+
checkoutSCM:
8+
scm: url
9+
url: https://git.sr.ht/~kennylevinsen/seatd/archive/${PKG_VERSION}.tar.gz
10+
digestSHA1: e33c99d9b0dce48f82618de2849ef3128305d28a
11+
stripComponents: 1
12+
13+
buildScript: |
14+
mesonBuild $1 \
15+
-Dman-pages=disabled \
16+
-Dexamples=disabled \
17+
-Dwerror=false \
18+
-Dlibseat-logind=disabled \
19+
-Dlibseat-builtin=enabled
20+
21+
# add init script
22+
if initIsAnySysvinit; then
23+
install -D -m 0755 $<@seatd/S70seatd.sh@> \
24+
install/etc/init.d/S70seatd.sh
25+
fi
26+
27+
multiPackage:
28+
"":
29+
depends:
30+
- name: core::seatd-tgt
31+
use: []
32+
packageScript: mesonPackageBin
33+
provideDeps: [ "*-tgt" ]
34+
35+
dev:
36+
packageScript: mesonPackageDev
37+
38+
tgt:
39+
packageScript: mesonPackageLib

recipes/core/seatd/S70seatd.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#! /bin/sh
2+
3+
# This file comes from buildroot and is licensed under GPLv2.
4+
5+
DAEMON="seatd"
6+
DAEMON_EXE="/usr/bin/${DAEMON}"
7+
PIDFILE="/run/${DAEMON}.pid"
8+
9+
start() {
10+
printf 'Starting %s: ' "${DAEMON}"
11+
start-stop-daemon -S -x "${DAEMON_EXE}" -p "${PIDFILE}" -m -b -- -g video
12+
status=$?
13+
if [ "$status" -eq 0 ]; then
14+
echo OK
15+
else
16+
echo FAIL
17+
fi
18+
return "$status"
19+
}
20+
21+
stop() {
22+
printf 'Stopping %s: ' "${DAEMON}"
23+
start-stop-daemon -K -x "${DAEMON_EXE}" -p "${PIDFILE}"
24+
status=$?
25+
if [ "$status" -eq 0 ]; then
26+
echo OK
27+
else
28+
echo FAIL
29+
fi
30+
return "$status"
31+
}
32+
33+
restart() {
34+
stop
35+
sleep 1
36+
start
37+
}
38+
39+
case "${1}" in
40+
start|stop|restart)
41+
"${1}";;
42+
reload)
43+
restart;;
44+
*)
45+
echo "Usage: $0 {start|stop|restart}"
46+
exit 1
47+
;;
48+
esac

0 commit comments

Comments
 (0)