summaryrefslogtreecommitdiffstats
path: root/recipes-demo/flutter-cluster-dashboard
diff options
context:
space:
mode:
authorAakash Solanki <tech2aks@gmail.com>2022-09-14 11:23:42 +0200
committerAakash Solanki <tech2aks@gmail.com>2022-09-15 20:46:08 +0200
commit54198c1a074575366f2c81bf2140620212108a58 (patch)
treeb5d89f504c09bde1bfd781be93c90e4615f94eea /recipes-demo/flutter-cluster-dashboard
parent8179bd7ee0c907ea2ee6e7c4fda7a0251fa6434f (diff)
Add config file for flutter-cluster-dashboard
- Add 'flutter-cluster-dashboard.yaml' file, which contains KUKSA.VAL auth token and few other paramenters. - Set openrouteservice API Key in local.conf to the variable `OPENROUTE_API_KEY`. - Change SRCREV Bug-AGL: SPEC-4508 Change-Id: I9a225013e18b65626b391258445ec0f6acf1a970 Signed-off-by: Aakash Solanki <tech2aks@gmail.com>
Diffstat (limited to 'recipes-demo/flutter-cluster-dashboard')
-rw-r--r--recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml6
-rw-r--r--recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb19
2 files changed, 23 insertions, 2 deletions
diff --git a/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml b/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml
new file mode 100644
index 00000000..35f5bdfd
--- /dev/null
+++ b/recipes-demo/flutter-cluster-dashboard/files/flutter-cluster-dashboard.yaml
@@ -0,0 +1,6 @@
+hostname: localhost
+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 4647f20b..0c304ac7 100644
--- a/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb
+++ b/recipes-demo/flutter-cluster-dashboard/flutter-cluster-dashboard_git.bb
@@ -13,10 +13,11 @@ SRC_URI = "git://github.com/aakash-s45/ic;protocol=https;branch=master \
file://flutter_cluster_dashboard_on_bg-debug.json \
file://flutter_cluster_dashboard_on_bg-profile.json \
file://flutter_cluster_dashboard_on_bg-release.json \
+ file://flutter-cluster-dashboard.yaml \
"
PV = "1.0+git${SRCPV}"
-SRCREV = "798851a33bb614fb1e5473a8046e63cd9b9026f4"
+SRCREV = "e7099bd763ba5612d0613b9ee43679cb2a9f7610"
S = "${WORKDIR}/git"
@@ -24,6 +25,8 @@ PUBSPEC_APPNAME = "flutter_cluster_dashboard"
FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
+OPENROUTE_API_KEY ??= "YOU_NEED_TO_SET_IT_IN_LOCAL_CONF"
+
inherit flutter-app
APP_CONFIG = "flutter_cluster_dashboard_on_bg-release.json"
@@ -31,13 +34,25 @@ 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."
+ fi
+}
+
do_install:append() {
install -D -m 0644 ${WORKDIR}/flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/flutter-cluster-dashboard.service
install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
ln -s ../flutter-cluster-dashboard.service ${D}${systemd_user_unitdir}/agl-session.target.wants/flutter-cluster-dashboard.service
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 0755 -d ${D}${sysconfdir}/default/
+ echo 'OPENROUTE_API_KEY:${OPENROUTE_API_KEY}' >> ${D}${sysconfdir}/default/openroutekey
}
-FILES:${PN} += "${datadir} ${systemd_user_unitdir}"
+FILES:${PN} += "${datadir} ${systemd_user_unitdir} ${sysconfdir}/xdg/AGL ${sysconfdir}/default/"