summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-graphics/wayland/weston-init.bb
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-graphics/wayland/weston-init.bb')
-rw-r--r--poky/meta/recipes-graphics/wayland/weston-init.bb25
1 files changed, 16 insertions, 9 deletions
diff --git a/poky/meta/recipes-graphics/wayland/weston-init.bb b/poky/meta/recipes-graphics/wayland/weston-init.bb
index 40aa76295..07cec75fb 100644
--- a/poky/meta/recipes-graphics/wayland/weston-init.bb
+++ b/poky/meta/recipes-graphics/wayland/weston-init.bb
@@ -8,11 +8,19 @@ SRC_URI = "file://init \
file://weston.env \
file://weston.ini \
file://weston@.service \
+ file://weston@.socket \
file://71-weston-drm.rules \
+ file://weston-autologin \
file://weston-start"
S = "${WORKDIR}"
+DEFAULTBACKEND ??= ""
+DEFAULTBACKEND_qemuall ?= "fbdev"
+DEFAULTBACKEND_qemuarm64 = "drm"
+DEFAULTBACKEND_qemux86 = "drm"
+DEFAULTBACKEND_qemux86-64 = "drm"
+
do_install() {
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
@@ -20,6 +28,10 @@ do_install() {
# Install Weston systemd service and accompanying udev rule
install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service
+ install -D -p -m0644 ${WORKDIR}/weston@.socket ${D}${systemd_system_unitdir}/weston@.socket
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+ install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin
+ fi
sed -i -e s:/etc:${sysconfdir}:g \
-e s:/usr/bin:${bindir}:g \
-e s:/var:${localstatedir}:g \
@@ -30,14 +42,9 @@ do_install() {
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
-}
-
-do_install_append_libc-musl_qemux86() {
- echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
-}
-
-do_install_append_libc-musl_qemux86-64() {
- echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
+ if [ -n "${DEFAULTBACKEND}" ]; then
+ sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
+ fi
}
inherit update-rc.d features_check systemd
@@ -50,7 +57,7 @@ RDEPENDS_${PN} = "weston kbd"
INITSCRIPT_NAME = "weston"
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
-FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${sysconfdir}/default/weston"
+FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${systemd_system_unitdir}/weston@.socket ${sysconfdir}/default/weston ${sysconfdir}/pam.d/"
CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"