weston-ini-conf: Rework to use fragments to construct weston.ini
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / weston-ini-conf.bb
1 SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
4
5 SRC_URI = "file://core.cfg \
6            file://ivishell.cfg \
7            file://shell.cfg \
8            file://hdmi-a-1-270.cfg \
9           "
10
11 S = "${WORKDIR}"
12
13 PACKAGE_ARCH = "${MACHINE_ARCH}"
14
15 do_compile() {
16     # Put all of our cfg files together.
17     rm -f ${WORKDIR}/weston.ini
18     for F in ${WORKDIR}/*.cfg; do
19         cat $F >> ${WORKDIR}/weston.ini
20         echo >> ${WORKDIR}/weston.ini
21     done
22     sed -i -e '$ d' ${WORKDIR}/weston.ini
23 }
24
25 do_install_append() {
26     WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
27     install -d ${D}${WESTON_INI_CONFIG}
28     install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
29 }