Remove systemd user session and clean up packagegroups and images
[AGL/meta-agl.git] / meta-agl-core / recipes-graphics / wayland / agl-compositor-init.bb
1 SUMMARY = "Startup systemd unit for the AGL Wayland compositor"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5 inherit systemd
6
7 PACKAGE_ARCH = "${MACHINE_ARCH}"
8
9 SRC_URI = "file://agl-compositor.service \
10            file://agl-compositor.socket \
11            file://agl-compositor-autologin \
12            file://agl-compositor.conf.in \
13 "
14
15 S = "${WORKDIR}"
16
17 AGL_COMPOSITOR_ARGS ?= " --config ${sysconfdir}/xdg/weston/weston.ini --idle-time=0"
18 AGL_COMPOSITOR_USE_PIXMAN ??= "0"
19
20 AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}"
21 AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}"
22
23 do_install() {
24     # Install systemd service
25     install -D -p -m0644 ${WORKDIR}/agl-compositor.service ${D}${systemd_system_unitdir}/agl-compositor.service
26     install -D -p -m0644 ${WORKDIR}/agl-compositor.socket ${D}${systemd_system_unitdir}/agl-compositor.socket
27     if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
28         install -D -p -m0644 ${WORKDIR}/agl-compositor-autologin ${D}${sysconfdir}/pam.d/agl-compositor-autologin
29     fi
30
31     # Install systemd service drop-in with extra configuration
32     files=agl-compositor.conf.in
33     for f in ${files}; do
34         g=${f%.in}
35         if [ "${f}" != "${g}" ]; then
36             sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \
37                 ${WORKDIR}/${f} > ${WORKDIR}/${g}
38         fi
39     done
40     install -d ${D}${systemd_system_unitdir}/agl-compositor.service.d
41     install -m644 ${WORKDIR}/agl-compositor.conf ${D}/${systemd_system_unitdir}/agl-compositor.service.d/agl-compositor.conf
42 }
43
44 FILES:${PN} += "\
45     ${systemd_system_unitdir}/agl-compositor.service \
46     ${systemd_system_unitdir}/agl-compositor.socket \
47     ${systemd_system_unitdir}/agl-compositor.service.d \
48     ${sysconfdir}/default/agl-compositor \
49     ${sysconfdir}/pam.d/ \
50     "
51
52 CONFFILES:${PN} += "${sysconfdir}/default/agl-compositor"
53
54 RDEPENDS:${PN} = "agl-users agl-compositor weston-ini"
55
56 RCONFLICTS:${PN} = "weston-init"
57
58 SYSTEMD_SERVICE:${PN} = "agl-compositor.service agl-compositor.socket"