Use ROOT_HOME variable, not /home/root
[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     sed -i "s:/home/root:${ROOT_HOME}:" ${D}${systemd_system_unitdir}/weston-mapviewer-demo.service
30 }
31
32 ## DO NOT ENABLE 'weston-mapviewer-demo.service' BY DEFAULT
33 ##
34 ## The 'weston-mapviewer-demo.service' is exclusive of default 'weston.ini',
35 ## it should be enabled/disabled by 'switch_on_mapviewer-demo.sh'/'switch_off_mapviewer-demo.sh'.
36 ##
37 #SYSTEMD_SERVICE_${PN} = "weston-mapviewer-demo.service"
38
39 FILES_${PN} += " \
40     ${systemd_system_unitdir} \
41     /usr/AGL/${PN}/ \
42     ${sysconfdir}/xdg/weston/${PN} \
43     "