Remove systemd user session and clean up packagegroups and images
[AGL/meta-agl-demo.git] / recipes-demo / flutter-cluster-dashboard / flutter-cluster-dashboard_git.bb
1 SUMMARY = "Flutter Instrument Cluster "
2 DESCRIPTION = "An instrument cluster app written in dart for the flutter runtime"
3 AUTHOR = "Aakash Solanki"
4 HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/flutter-instrument-cluster"
5
6 SECTION = "graphics"
7
8 LICENSE = "Apache-2.0"
9 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0c52b0e4b5f0dbf57ea7d44bebb2e29d"
10
11 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/flutter-instrument-cluster;protocol=https;branch=${AGL_BRANCH} \
12     file://flutter-cluster-dashboard.service \
13     file://flutter_cluster_dashboard_on_bg.json \
14     file://flutter-cluster-dashboard.yaml \
15     file://flutter-cluster-dashboard.yaml.demo \
16 "
17
18 PV = "1.0+git${SRCPV}"
19 SRCREV = "9bc83e64c508ad8c69a3950d5421774f9b53a31f"
20
21 S = "${WORKDIR}/git"
22
23 PUBSPEC_APPNAME = "flutter_cluster_dashboard"
24
25 FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
26
27 OPENROUTE_API_KEY ??= "YOU_NEED_TO_SET_IT_IN_LOCAL_CONF"
28
29 inherit flutter-app update-alternatives systemd
30
31 CLUSTER_DEMO_VISS_HOSTNAME ??= "192.168.10.2"
32
33 APP_CONFIG = "flutter_cluster_dashboard_on_bg.json"
34
35 SYSTEMD_SERVICE:${PN} = "flutter-cluster-dashboard.service"
36
37 do_install:append() {
38     install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
39
40     install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/${BPN}.json
41
42     install -d ${D}${sysconfdir}/xdg/AGL
43     install -m 0644 ${WORKDIR}/${BPN}.yaml ${D}${sysconfdir}/xdg/AGL/${BPN}.yaml.default
44     install -m 0644 ${WORKDIR}/${BPN}.yaml.demo ${D}${sysconfdir}/xdg/AGL/
45     sed -i "s/^hostname: .*/hostname: ${CLUSTER_DEMO_VISS_HOSTNAME}/" ${D}${sysconfdir}/xdg/AGL/${BPN}.yaml.demo
46
47     install -m 0755 -d ${D}${sysconfdir}/default/ 
48     echo 'OPENROUTE_API_KEY:${OPENROUTE_API_KEY}' >> ${D}${sysconfdir}/default/openroutekey
49 }
50
51 ALTERNATIVE_LINK_NAME[flutter-cluster-dashboard.yaml] = "${sysconfdir}/xdg/AGL/${BPN}.yaml"
52
53 FILES:${PN} += "${datadir} ${sysconfdir}/default/"
54
55 RDEPENDS:${PN} += "flutter-auto agl-flutter-env liberation-fonts"
56
57 PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-demo"
58
59 FILES:${PN}-conf += "${sysconfdir}/xdg/AGL/${BPN}.yaml.default"
60 RDEPENDS:${PN}-conf = "${PN}"
61 RPROVIDES:${PN}-conf = "${BPN}.yaml"
62 RCONFLICTS:${PN}-conf = "${PN}-conf-demo"
63 ALTERNATIVE:${PN}-conf = "${BPN}.yaml"
64 ALTERNATIVE_TARGET_${PN}-conf = "${sysconfdir}/xdg/AGL/${BPN}.yaml.default"
65
66 FILES:${PN}-conf-demo += "${sysconfdir}/xdg/AGL/${BPN}.yaml.demo"
67 RDEPENDS:${PN}-conf-demo = "${PN}"
68 RPROVIDES:${PN}-conf-demo = "${BPN}.yaml"
69 RCONFLICTS:${PN}-conf-demo = "${PN}-conf"
70 ALTERNATIVE:${PN}-conf-demo = "${BPN}.yaml"
71 ALTERNATIVE_TARGET_${PN}-conf-demo = "${sysconfdir}/xdg/AGL/${BPN}.yaml.demo"