dc7b5bee7c9b39e1675f8603a647c792f73a1d2a
[AGL/meta-agl.git] / meta-app-framework / recipes-config / agl-session / agl-session_0.1.bb
1 SUMMARY = "AGL user session"
2 LICENSE = "Apache-2.0"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
4
5 SRC_URI = "\
6     file://agl-session@.service \
7     file://agl-session.target \
8     file://50-xdg-data-dirs.sh \
9 "
10
11 inherit systemd allarch useradd
12
13 USERADD_PACKAGES = "${PN}"
14 USERADDEXTENSION = "useradd-staticids"
15 GROUPADD_PARAM:${PN} = "\
16         --system display ; \
17         --system video ; \
18         -g 1001 agl-driver ; \
19 "
20 USERADD_PARAM:${PN} = "\
21   -g 1001 -u 1001 -G video,display -o -d /home/agl-driver -m -K PASS_MAX_DAYS=-1 agl-driver ; \
22 "
23
24 SYSTEMD_PACKAGES = "${PN}"
25 # Instantiate session for the 'agl-driver' user, so we don't have to hardcode
26 # the user name/ID in the service file itself
27 SYSTEMD_SERVICE:${PN} = "agl-session@agl-driver.service"
28 SYSTEMD_AUTO_ENABLE:${PN} = "enable"
29
30 do_install() {
31     install -d ${D}${systemd_system_unitdir}
32     install -m 0644 ${WORKDIR}/agl-session@.service ${D}${systemd_system_unitdir}
33
34     install -d ${D}${systemd_user_unitdir}
35     install -m 0644 ${WORKDIR}/agl-session.target ${D}${systemd_user_unitdir}
36
37     install -d ${D}${libdir}/systemd/user-environment-generators
38     install -m 0755 ${WORKDIR}/50-xdg-data-dirs.sh ${D}${libdir}/systemd/user-environment-generators/
39 }
40
41 FILES:${PN} += " \
42     ${systemd_system_unitdir} \
43     ${systemd_user_unitdir} \
44     ${libdir}/systemd/user-environment-generators/ \
45 "