flutter-cluster-dashboard: remove warning
[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-debug.json \
14     file://flutter_cluster_dashboard_on_bg-profile.json \
15     file://flutter_cluster_dashboard_on_bg-release.json \
16     file://flutter-cluster-dashboard.yaml \
17     file://flutter-cluster-dashboard.yaml.demo \
18 "
19
20 PV = "1.0+git${SRCPV}"
21 SRCREV = "e440ec331e7d55cdf2e666d45f63c05571ecc609"
22
23 S = "${WORKDIR}/git"
24
25 PUBSPEC_APPNAME = "flutter_cluster_dashboard"
26
27 FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
28
29 OPENROUTE_API_KEY ??= "YOU_NEED_TO_SET_IT_IN_LOCAL_CONF"
30
31 inherit flutter-app update-alternatives
32
33 APP_CONFIG = "flutter_cluster_dashboard_on_bg-release.json"
34 APP_CONFIG:class-runtimedebug = "flutter_cluster_dashboard_on_bg-debug.json"
35 APP_CONFIG:class-runtimeprofile = "flutter_cluster_dashboard_on_bg-profile.json"
36
37 do_install:append() {
38     install -D -m 0644 ${WORKDIR}/flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/flutter-cluster-dashboard.service
39     install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
40     ln -s ../flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/agl-session.target.wants/flutter-cluster-dashboard.service
41
42     install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/default.json
43
44     install -d ${D}${sysconfdir}/xdg/AGL
45     install -m 0644 ${WORKDIR}/flutter-cluster-dashboard.yaml \
46         ${D}${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default
47     install -m 0644 ${WORKDIR}/flutter-cluster-dashboard.yaml.demo ${D}${sysconfdir}/xdg/AGL/
48
49     install -m 0755 -d ${D}${sysconfdir}/default/ 
50     echo 'OPENROUTE_API_KEY:${OPENROUTE_API_KEY}' >> ${D}${sysconfdir}/default/openroutekey
51 }
52
53 ALTERNATIVE_LINK_NAME[flutter-cluster-dashboard.yaml] = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml"
54
55 FILES:${PN} += "${datadir} ${systemd_user_unitdir} ${sysconfdir}/default/"
56
57 PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-demo"
58
59 FILES:${PN}-conf += "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default"
60 RDEPENDS:${PN}-conf = "${PN}"
61 RPROVIDES:${PN}-conf = "flutter-cluster-dashboard.yaml"
62 RCONFLICTS:${PN}-conf = "${PN}-conf-demo"
63 ALTERNATIVE:${PN}-conf = "flutter-cluster-dashboard.yaml"
64 ALTERNATIVE_TARGET_${PN}-conf = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default"
65
66 FILES:${PN}-conf-demo += "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.demo"
67 RDEPENDS:${PN}-conf-demo = "${PN}"
68 RPROVIDES:${PN}-conf-demo = "flutter-cluster-dashboard.yaml"
69 RCONFLICTS:${PN}-conf-demo = "${PN}-conf"
70 ALTERNATIVE:${PN}-conf-demo = "flutter-cluster-dashboard.yaml"
71 ALTERNATIVE_TARGET_${PN}-conf-demo = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.demo"