Use new weston-ini-conf scheme and remove old per-machine files
[AGL/meta-agl.git] / meta-app-framework / recipes-graphics / wayland / agl-compositor-init_agl-app-fw.inc
1 FILESEXTRAPATHS:prepend := "${THISDIR}/agl-compositor-init:"
2
3 SRC_URI = " \
4     file://agl-compositor.conf \
5     file://agl-compositor.service.in \
6     file://agl-compositor.socket \
7     "
8
9 # Reset systemd services list
10 SYSTEMD_SERVICE:${PN} = ""
11
12 do_install() {
13     # Process ".in" files
14     files=agl-compositor.service.in
15     for f in ${files}; do
16         g=${f%.in}
17         if [ "${f}" != "${g}" ]; then
18             sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \
19                 ${WORKDIR}/${f} > ${WORKDIR}/${g}
20         fi
21     done
22
23     install -d ${D}${systemd_system_unitdir}/agl-session@agl-driver.service.d
24     install -m 0644 ${WORKDIR}/agl-compositor.conf \
25         ${D}${systemd_system_unitdir}/agl-session@agl-driver.service.d/agl-compositor.conf
26
27     install -D -p -m0644 ${WORKDIR}/agl-compositor.service ${D}${systemd_user_unitdir}/agl-compositor.service
28     install -D -p -m0644 ${WORKDIR}/agl-compositor.socket ${D}${systemd_user_unitdir}/agl-compositor.socket
29
30     # Enable the compositor as part of the user session
31     install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
32     ln -s ../agl-compositor.service ${D}${systemd_user_unitdir}/agl-session.target.wants/agl-compositor.service
33 }
34
35 FILES:${PN} = "\
36     ${systemd_system_unitdir} \
37     ${systemd_user_unitdir} \
38 "
39
40 RDEPENDS:${PN} = " \
41     agl-compositor \
42     agl-shell-activator \
43     agl-session \
44     weston-ini \
45 "
46
47 RCONFLICTS:${PN} = "weston-init"