Add switch on/off script for cluster demo
[AGL/meta-agl-demo.git] / recipes-demo-hmi / navigation / mapviewer-demo.bb
1 SUMMARY     = "Setting files of mapviewer for the AGL Demonstrator @ CES2017"
2 DESCRIPTION = "Setting files of mapviewer for the AGL Demonstrator @ CES2017"
3 LICENSE     = "MIT"
4 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
5                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6
7 SECTION     = "apps"
8
9 inherit systemd
10
11 SRC_URI = " \
12         file://switch_off_mapviewer-demo.sh \
13         file://switch_on_mapviewer-demo.sh \
14         file://weston-mapviewer-demo.ini \
15         file://weston-mapviewer-demo.service \
16         "
17
18 do_install() {
19     # Map viewer demo
20     install -d ${D}/usr/AGL/${PN}
21     install -m 0755 ${WORKDIR}/switch_off_${PN}.sh ${D}/usr/AGL/${PN}
22     install -m 0755 ${WORKDIR}/switch_on_${PN}.sh ${D}/usr/AGL/${PN}
23
24     install -d ${D}${sysconfdir}/xdg/weston
25     install -m 0644 ${WORKDIR}/weston-${PN}.ini ${D}${sysconfdir}/xdg/weston/weston-${PN}.ini
26
27     install -d ${D}${systemd_system_unitdir}
28     install -m 0644 ${WORKDIR}/weston-mapviewer-demo.service ${D}${systemd_system_unitdir}
29 }
30
31 ## DO NOT ENABLE 'weston-mapviewer-demo.service' BY DEFAULT
32 ##
33 ## The 'weston-mapviewer-demo.service' is exclusive of default 'weston.ini',
34 ## it should be enabled/disabled by 'switch_on_mapviewer-demo.sh'/'switch_off_mapviewer-demo.sh'.
35 ##
36 #SYSTEMD_SERVICE_${PN} = "weston-mapviewer-demo.service"
37
38 FILES_${PN} += " \
39     ${systemd_system_unitdir} \
40     /usr/AGL/${PN}/ \
41     ${sysconfdir}/xdg/weston/${PN} \
42     "