summaryrefslogtreecommitdiffstats
path: root/meta-agl-flutter
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2023-06-02 10:48:45 -0400
committerScott Murray <scott.murray@konsulko.com>2023-06-02 10:51:46 -0400
commit8f41dcb65f43b83d0bedce9fbe567e6ac95045f4 (patch)
tree99da22933077bc3e1118f1cfc8620e82da75d2f3 /meta-agl-flutter
parent882eeb6a44b443ef13a4b3111330cd0b603d3f1b (diff)
meta-agl-flutter: add agl-flutter-env
Add agl-flutter-env recipe that installs a /etc/default/flutter environment file that can be sourced to get the default Flutter version and runtime type. The variable AGL_FLUTTER_DEFAULT_RUNTIME can be overridden at build time to switch the default runtime from release to something else. Bug-AGL: SPEC-4819 Change-Id: I33ef50c932116aecddb746007722ce8163079389 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'meta-agl-flutter')
-rw-r--r--meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb b/meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb
new file mode 100644
index 00000000..aaff166b
--- /dev/null
+++ b/meta-agl-flutter/recipes-config/agl-flutter-env/agl-flutter-env_1.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "AGL Flutter environment file"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit allarch
+
+AGL_FLUTTER_DEFAULT_RUNTIME ?= "release"
+
+do_compile[noexec] = "1"
+
+do_install() {
+ install -d ${D}${sysconfdir}/default
+ echo "FLUTTER_VERSION=${FLUTTER_SDK_TAG}" > ${D}${sysconfdir}/default/flutter
+ echo "FLUTTER_RUNTIME=${AGL_FLUTTER_DEFAULT_RUNTIME}" >> ${D}${sysconfdir}/default/flutter
+}