summaryrefslogtreecommitdiffstats
path: root/meta-agl-flutter/dynamic-layers/flutter-apps-layer
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-flutter/dynamic-layers/flutter-apps-layer')
-rw-r--r--meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service13
-rw-r--r--meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend1
-rw-r--r--meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc13
3 files changed, 27 insertions, 0 deletions
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service
new file mode 100644
index 000000000..28b967866
--- /dev/null
+++ b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery/flutter-gallery.service
@@ -0,0 +1,13 @@
+[Unit]
+Requires=agl-compositor.service
+After=agl-compositor.service
+
+[Service]
+User=agl-driver
+EnvironmentFile=/etc/default/flutter
+EnvironmentFile=-/etc/default/flutter-gallery
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/flutter-gallery/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --f --window-type=BG
+
+[Install]
+WantedBy=graphical.target
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend
new file mode 100644
index 000000000..835e86e66
--- /dev/null
+++ b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'flutter-gallery_aglflutter.inc', '', d)}
diff --git a/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc
new file mode 100644
index 000000000..68c07f188
--- /dev/null
+++ b/meta-agl-flutter/dynamic-layers/flutter-apps-layer/recipes-graphics/flutter-apps/first-party/flutter-gallery_aglflutter.inc
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/flutter-gallery:"
+
+SRC_URI += "file://flutter-gallery.service"
+
+inherit systemd
+
+do_install:append() {
+ install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
+}
+
+RDEPENDS:${PN} += "agl-flutter-env"
+
+SYSTEMD_SERVICE:${PN} = "flutter-gallery.service"