+
+
+}
+
+pkg_preinst_${PN}() {
+ #!/bin/sh -e
+
+ # create groups 'display' and 'weston-launch'
+ getent group display >/dev/null || ${prefix}/sbin/groupadd -r -o display
+ getent group input >/dev/null || ${prefix}/sbin/groupadd -r -o input
+ getent group weston-launch >/dev/null || ${prefix}/sbin/groupadd -r -o weston-launch
+ # create user 'display'
+ getent passwd display >/dev/null || ${prefix}/sbin/useradd -r -g display -d /run/display -s /bin/false -c "Display daemon" display
+ # add user 'display' to groups 'weston-launch' and 'input'
+ groupmod -A display weston-launch
+ groupmod -A display input
+ # setup display manager service
+ mkdir -p /lib/systemd/system/graphical.target.wants/
+ ln -sf ../display-manager.path /lib/systemd/system/graphical.target.wants/
+ # setup display manager access (inside user session)
+ mkdir -p /lib/systemd/user/default.target.requires/
+ ln -sf ../weston-user.service /lib/systemd/user/default.target.requires/
+
+}
+
+pkg_postrm_${PN}() {
+ #!/bin/sh -e