DEFAULTBACKEND ??= ""
DEFAULTBACKEND:qemuall ?= "drm"
+WESTON_USER ??= "weston"
+WESTON_USER_HOME ??= "/home/${WESTON_USER}"
do_install() {
# Install weston-start script
install -D -p -m0644 ${S}/weston.service ${D}${systemd_system_unitdir}/weston.service
install -D -p -m0644 ${S}/weston.socket ${D}${systemd_system_unitdir}/weston.socket
install -D -p -m0644 ${S}/weston-socket.sh ${D}${sysconfdir}/profile.d/weston-socket.sh
- sed -i -e s:/etc:${sysconfdir}:g \
- -e s:/usr/bin:${bindir}:g \
- -e s:/var:${localstatedir}:g \
- ${D}${systemd_system_unitdir}/weston.service
+ sed -i -e s:@sysconfdir@:${sysconfdir}:g \
+ -e s:@bindir@:${bindir}:g \
+ -e s:@localstatedir@:${localstatedir}:g \
+ -e s:@runtimedir@:${runtimedir}:g \
+ -e s:@WESTON_USER@:${WESTON_USER}:g \
+ -e s:@WESTON_USER_HOME@:${WESTON_USER_HOME}:g \
+ ${D}${systemd_system_unitdir}/weston.service \
+ ${D}${systemd_system_unitdir}/weston.socket \
+ ${D}${sysconfdir}/profile.d/weston-socket.sh
fi
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
sed -i -e "/^\[core\]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini
fi
- install -dm 755 -o weston -g weston ${D}/home/weston
+ install -dm 755 -o ${WESTON_USER} -g ${WESTON_USER} ${D}/${WESTON_USER_HOME}
}
INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"
${systemd_system_unitdir}/weston.socket \
${sysconfdir}/default/weston \
${sysconfdir}/pam.d/ \
- /home/weston \
+ ${WESTON_USER_HOME} \
"
CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
SYSTEMD_SERVICE:${PN} = "weston.service weston.socket"
-USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,seat,wayland weston"
+USERADD_PARAM:${PN} = "--home ${WESTON_USER_HOME} --shell /bin/sh --user-group -G video,input,render,seat,wayland ${WESTON_USER}"
GROUPADD_PARAM:${PN} = "-r wayland; -r render; -r seat"
[Service]
# Requires systemd-notify.so Weston plugin.
Type=notify
-EnvironmentFile=/etc/default/weston
-ExecStart=/usr/bin/weston --modules=systemd-notify.so
+EnvironmentFile=@sysconfdir@/default/weston
+ExecStart=@bindir@/weston --modules=systemd-notify.so
# Optional watchdog setup
#TimeoutStartSec=60
#WatchdogSec=20
# The user to run Weston as.
-User=weston
-Group=weston
+User=@WESTON_USER@
+Group=@WESTON_USER@
# Make sure the working directory is the users home directory
-WorkingDirectory=/home/weston
+WorkingDirectory=@WESTON_USER_HOME@
# Set up a full user session for the user, required by Weston.
PAMName=weston-autologin