fix weston start for display
[scm/bb/meta-tizen.git] / recipes-tizen / weston-common / weston-common-extraconf.inc
1 inherit useradd
2
3 FILESEXTRAPATHS_append := "${THISDIR}/weston-common"
4
5 SRC_URI += "file://0001-Fix-path-to-binary-ln-and-chmod.patch"
6 SRC_URI += "file://0001-Add-a-script-to-export-UID.patch"
7 SRC_URI += "file://0001-Automatically-restart-display-manager.patch"
8 SRC_URI += "file://0001-Modifications-for-yocto-build.patch"
9 SRC_URI += "file://0001-fix_weston_start.patch"
10
11 USERADD_PACKAGES = "${PN}"
12
13 GROUPADD_PARAM_${PN} = "-g 191 display;-g 100 users;-g 1004 input;-g 190 systemd-journal;-g 54 lock"
14
15 USERADD_PARAM_${PN} = "  -d /run/display -m  -u 115  -g display -G users,input,tty,display  -s /bin/sh display; "
16 USERADD_PARAM_${PN} += " -d /home/alice -m -u 5001   -g users   -G display -r -s /bin/sh alice; "
17 USERADD_PARAM_${PN} += " -d /home/bob   -m -u 5002   -g users   -G display -r -s /bin/sh bob; "
18 USERADD_PARAM_${PN} += " -d /home/carole -m -u 5003   -g users   -G display -r -s /bin/sh carole; "
19 USERADD_PARAM_${PN} += " -d /home/guest -m -u 9999   -g users   -G display -r -s /bin/sh guest "
20
21 do_install_append() {
22     install -m 755 uid.sh ${D}/etc/profile.d
23
24     mkdir -p ${D}/lib/systemd/user/default.target.wants
25     ln -sf ../weston-user.service ${D}/lib/systemd/user/default.target.wants/weston-user.service
26 }
27
28 pkg_postinst_${PN} () {
29 for user in alice bob carol app guest; do
30         for appdir in desktop manifest dbspace; do
31                 mkdir -p ${D}/home/$user/.applications/$appdir
32         done
33         find ${D}/home/$user/ -type d -exec chsmack -a User {} \;
34         chown -R $user:users ${D}/home/$user/
35 done
36 }
37
38 weston-common_files += "/lib/systemd/user/default.target.wants/weston-user.service"