meta-agl-core: Update weston/agl-compositor init
[AGL/meta-agl.git] / meta-agl-core / recipes-graphics / wayland / agl-compositor-init.bb
1 SUMMARY = "Startup systemd unit drop-in file for the AGL Wayland compositor"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5 PACKAGE_ARCH = "${MACHINE_ARCH}"
6
7 SRC_URI = "file://agl-compositor.conf.in"
8
9 S = "${WORKDIR}"
10
11 AGL_COMPOSITOR_ARGS ?= " --config ${sysconfdir}/xdg/weston/weston.ini --idle-time=0"
12 AGL_COMPOSITOR_USE_PIXMAN ??= "0"
13
14 AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("DISTRO_FEATURES", "agl-devel", " --debug", "",d)}"
15 AGL_COMPOSITOR_ARGS:append = " ${@bb.utils.contains("WESTON_USE_PIXMAN", "1", " --use-pixman", "",d)}"
16
17 do_install() {
18     # Process ".in" files
19     files=agl-compositor.conf.in
20     for f in ${files}; do
21         g=${f%.in}
22         if [ "${f}" != "${g}" ]; then
23             sed -e "s,@AGL_COMPOSITOR_ARGS@,${AGL_COMPOSITOR_ARGS},g" \
24                 ${WORKDIR}/${f} > ${WORKDIR}/${g}
25         fi
26     done
27
28     # Install Weston systemd service drop-in
29     install -d ${D}${systemd_system_unitdir}/weston.service.d
30     install -m644 ${WORKDIR}/agl-compositor.conf ${D}/${systemd_system_unitdir}/weston.service.d/agl-compositor.conf
31 }
32
33 FILES:${PN} += "\
34     ${systemd_system_unitdir}/weston.service.d \
35     "
36
37 RDEPENDS:${PN} = " \
38     agl-compositor \
39     weston-init \
40 "