summaryrefslogtreecommitdiffstats
path: root/recipes-demo/flutter-cluster-dashboard
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-12-07 19:21:16 +0900
committerScott Murray <scott.murray@konsulko.com>2022-12-07 19:27:09 +0900
commit87e5b7ee347eb4f226eb3f281463b6ad5fd2f1c6 (patch)
tree56034fafb0b176974ef5abdf4676e3a24ac8d629 /recipes-demo/flutter-cluster-dashboard
parent3c4657edcf2591936ad05b42b9bf372347db27b8 (diff)
flutter-cluster-dashboard: Add demo configuration
Add a demo configuration yaml file to point at the KUKSA.val server on the IVI board that can be installed as an alternative to the default. Bug-AGL: SPEC-4636 Change-Id: I75f91ad620e33ef7cbd7c6de4ef7ccae9b17cdf4 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'recipes-demo/flutter-cluster-dashboard')
-rw-r--r--recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml.demo6
-rw-r--r--recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb27
2 files changed, 29 insertions, 4 deletions
diff --git a/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml.demo b/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml.demo
new file mode 100644
index 000000000..2b01da660
--- /dev/null
+++ b/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml.demo
@@ -0,0 +1,6 @@
+hostname: 192.168.10.2
+port: 8090
+homeLat: 31.708643
+homeLng: 76.931882
+orsPathParam: driving-car
+kuskaAuthToken: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJrdWtzYS52YWwiLCJpc3MiOiJFY2xpcHNlIEtVS1NBIERldiIsImFkbWluIjp0cnVlLCJpYXQiOjE1MTYyMzkwMjIsImV4cCI6MTc2NzIyNTU5OSwia3Vrc2EtdnNzIjp7IioiOiJydyJ9fQ.QQcVR0RuRJIoasPXYsMGZhdvhLjUalk4GcRaxhh3-0_j3CtVSZ0lTbv_Z3As5BfIYzaMlwUzFGvCVOq2MXVjRK81XOAZ6wIsyKOxva16zjbZryr2V_m3yZ4twI3CPEzJch11_qnhInirHltej-tGg6ySfLaTYeAkw4xYGwENMBBhN5t9odANpScZP_xx5bNfwdW1so6FkV1WhpKlCywoxk_vYZxo187d89bbiu-xOZUa5D-ycFkd1-1rjPXLGE_g5bc4jcQBvNBc-5FDbvt4aJlTQqjpdeppxhxn_gjkPGIAacYDI7szOLC-WYajTStbksUju1iQCyli11kPx0E66me_ZVwOX07f1lRF6D2brWm1LcMAHM3bQUK0LuyVwWPxld64uSAEsvSKsRyJERc7nZUgLf7COnUrrkxgIUNjukbdT2JVN_I-3l3b4YXg6JVD7Y5g0QYBKgXEFpZrDbBVhzo7PXPAhJD6-c3DcUQyRZExbrnFV56RwWuExphw8lYnbMvxPWImiVmB9nRVgFKD0TYaw1sidPSSlZt8Uw34VZzHWIZQAQY0BMjR33fefg42XQ1YzIwPmDx4GYXLl7HNIIVbsRsibKaJnf49mz2qnLC1K272zXSPljO11Ke1MNnsnKyUH7mcwEs9nhTsnMgEOx_TyMLRYo-VEHBDLuEOiBo
diff --git a/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb b/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb
index aa5343da9..6bd797a9a 100644
--- a/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb
+++ b/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/flutter-instrument-clust
file://flutter_cluster_dashboard_on_bg-profile.json \
file://flutter_cluster_dashboard_on_bg-release.json \
file://flutter-cluster-dashboard.yaml \
+ file://flutter-cluster-dashboard.yaml.demo \
"
PV = "1.0+git${SRCPV}"
@@ -27,13 +28,12 @@ FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
OPENROUTE_API_KEY ??= "YOU_NEED_TO_SET_IT_IN_LOCAL_CONF"
-inherit flutter-app
+inherit flutter-app update-alternatives
APP_CONFIG = "flutter_cluster_dashboard_on_bg-release.json"
APP_CONFIG:class-runtimedebug = "flutter_cluster_dashboard_on_bg-debug.json"
APP_CONFIG:class-runtimeprofile = "flutter_cluster_dashboard_on_bg-profile.json"
-
do_configure:prepend() {
if [ "${OPENROUTE_API_KEY}" = "YOU_NEED_TO_SET_IT_IN_LOCAL_CONF" ]; then
bbwarn "WARNING: You should set openrouteservice API key to OPENROUTE_API_KEY variable in local.conf."
@@ -48,11 +48,30 @@ do_install:append() {
install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/default.json
install -d ${D}${sysconfdir}/xdg/AGL
- install -m 0644 ${WORKDIR}/flutter-cluster-dashboard.yaml ${D}${sysconfdir}/xdg/AGL/
+ install -m 0644 ${WORKDIR}/flutter-cluster-dashboard.yaml \
+ ${D}${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default
+ install -m 0644 ${WORKDIR}/flutter-cluster-dashboard.yaml.demo ${D}${sysconfdir}/xdg/AGL/
install -m 0755 -d ${D}${sysconfdir}/default/
echo 'OPENROUTE_API_KEY:${OPENROUTE_API_KEY}' >> ${D}${sysconfdir}/default/openroutekey
}
+ALTERNATIVE_LINK_NAME[flutter-cluster-dashboard.yaml] = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml"
+
+FILES:${PN} += "${datadir} ${systemd_user_unitdir} ${sysconfdir}/default/"
+
+PACKAGE_BEFORE_PN += "${PN}-conf ${PN}-conf-demo"
+
+FILES:${PN}-conf += "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default"
+RDEPENDS:${PN}-conf = "${PN}"
+RPROVIDES:${PN}-conf = "flutter-cluster-dashboard.yaml"
+RCONFLICTS:${PN}-conf = "${PN}-conf-demo"
+ALTERNATIVE:${PN}-conf = "flutter-cluster-dashboard.yaml"
+ALTERNATIVE_TARGET_${PN}-conf = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.default"
-FILES:${PN} += "${datadir} ${systemd_user_unitdir} ${sysconfdir}/xdg/AGL ${sysconfdir}/default/"
+FILES:${PN}-conf-demo += "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.demo"
+RDEPENDS:${PN}-conf-demo = "${PN}"
+RPROVIDES:${PN}-conf-demo = "flutter-cluster-dashboard.yaml"
+RCONFLICTS:${PN}-conf-demo = "${PN}-conf"
+ALTERNATIVE:${PN}-conf-demo = "flutter-cluster-dashboard.yaml"
+ALTERNATIVE_TARGET_${PN}-conf-demo = "${sysconfdir}/xdg/AGL/flutter-cluster-dashboard.yaml.demo"