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>
--- /dev/null
+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
+}