summaryrefslogtreecommitdiffstats
path: root/meta-app-framework/recipes-core/applaunchd
diff options
context:
space:
mode:
Diffstat (limited to 'meta-app-framework/recipes-core/applaunchd')
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-flutter@.service12
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-web@.service11
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app@.service8
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/applaunchd.service13
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/no-network.conf2
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd/private-tmp.conf2
-rw-r--r--meta-app-framework/recipes-core/applaunchd/applaunchd_git.bb78
7 files changed, 126 insertions, 0 deletions
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-flutter@.service b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-flutter@.service
new file mode 100644
index 000000000..a9a2527e0
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-flutter@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=%I
+
+[Service]
+Type=simple
+User=agl-driver
+Environment=FLUTTER_VERSION=3.3.7
+Environment=FLUTTER_RUNTIME=release
+EnvironmentFile=-/etc/default/flutter
+EnvironmentFile=-/etc/default/%I
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/%I/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --xdg-shell-app-id=%I
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-web@.service b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-web@.service
new file mode 100644
index 000000000..e0353b6ae
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app-web@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=%I
+
+[Service]
+Type=simple
+User=agl-driver
+EnvironmentFile=-/etc/default/WebAppMgr.env
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+Environment=AGL_APP_WAM_DIR=%I
+ExecStart=/usr/bin/WebAppMgrCli --appid=%I --app-install-dir=/usr/lib/wam_apps/${AGL_APP_WAM_DIR}/
+
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app@.service b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app@.service
new file mode 100644
index 000000000..234348846
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/agl-app@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=%I
+
+[Service]
+Type=simple
+User=agl-driver
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=%i
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/applaunchd.service b/meta-app-framework/recipes-core/applaunchd/applaunchd/applaunchd.service
new file mode 100644
index 000000000..73d36bd0c
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/applaunchd.service
@@ -0,0 +1,13 @@
+[Unit]
+Wants=network.target polkit.service
+After=network.target polkit.service
+
+[Service]
+Type=notify
+User=applaunchd
+Environment=XDG_DATA_DIRS=/usr/share
+ExecStart=/usr/bin/applaunchd
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/no-network.conf b/meta-app-framework/recipes-core/applaunchd/applaunchd/no-network.conf
new file mode 100644
index 000000000..c7c4f8a31
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/no-network.conf
@@ -0,0 +1,2 @@
+[Service]
+PrivateNetwork=true
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd/private-tmp.conf b/meta-app-framework/recipes-core/applaunchd/applaunchd/private-tmp.conf
new file mode 100644
index 000000000..0bdba7c99
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd/private-tmp.conf
@@ -0,0 +1,2 @@
+[Service]
+PrivateTmp=yes
diff --git a/meta-app-framework/recipes-core/applaunchd/applaunchd_git.bb b/meta-app-framework/recipes-core/applaunchd/applaunchd_git.bb
new file mode 100644
index 000000000..c1bafad8e
--- /dev/null
+++ b/meta-app-framework/recipes-core/applaunchd/applaunchd_git.bb
@@ -0,0 +1,78 @@
+SUMMARY = "AGL Application Launcher service"
+DESCRIPTION = "AGL Application Launcher service build with recipe method"
+HOMEPAGE = "https://git.automotivelinux.org/src/applaunchd"
+SECTION = "apps"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984"
+
+DEPENDS = " \
+ glib-2.0 \
+ glib-2.0-native \
+ protobuf-native \
+ grpc-native \
+ grpc \
+ systemd \
+"
+
+PV = "2.0+git${SRCPV}"
+
+SRC_URI = " \
+ git://gerrit.automotivelinux.org/gerrit/src/applaunchd;protocol=https;branch=${AGL_BRANCH} \
+ file://applaunchd.service \
+ file://agl-app@.service \
+ file://agl-app-web@.service \
+ file://agl-app-flutter@.service \
+ file://no-network.conf \
+ file://private-tmp.conf \
+"
+SRCREV = "c32fe42f40d0af8b31b6113a3140f52b83be7769"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig systemd useradd features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd polkit"
+
+USERADD_PACKAGES = "${PN}"
+USERADDEXTENSION = "useradd-staticids"
+GROUPADD_PARAM:${PN} = "-g 1003 applaunchd ; "
+USERADD_PARAM:${PN} = "\
+ -g 1003 -u 1003 -o -d / -K PASS_MAX_DAYS=-1 applaunchd ; \
+"
+
+SYSTEMD_SERVICE:${PN} = "applaunchd.service"
+
+do_install:append() {
+ # Install generic template for all agl-app services
+ install -d ${D}${systemd_system_unitdir}
+ install -m 644 ${WORKDIR}/applaunchd.service ${D}${systemd_system_unitdir}/
+ install -m 644 ${WORKDIR}/agl-app@.service ${D}${systemd_system_unitdir}/
+ install -m 644 ${WORKDIR}/agl-app-web@.service ${D}${systemd_system_unitdir}/
+ install -m 644 ${WORKDIR}/agl-app-flutter@.service ${D}${systemd_system_unitdir}/
+
+ # Install individual sandboxing overrides/drop-ins to be used by apps
+ install -d ${D}${systemd_system_unitdir}/sandboxing
+ install -m 644 ${WORKDIR}/no-network.conf ${D}${systemd_system_unitdir}/sandboxing/
+ install -m 644 ${WORKDIR}/private-tmp.conf ${D}${systemd_system_unitdir}/sandboxing/
+}
+
+PACKAGE_BEFORE_PN += "${PN}-template-agl-app ${PN}-template-agl-app-web ${PN}-template-agl-app-flutter"
+
+FILES:${PN} += "${systemd_system_unitdir}"
+
+FILES:${PN}-template-agl-app = "${systemd_system_unitdir}/agl-app@.service"
+
+FILES:${PN}-template-agl-app-web = "${systemd_system_unitdir}/agl-app-web@.service"
+
+FILES:${PN}-template-agl-app-flutter = "${systemd_system_unitdir}/agl-app-flutter@.service"
+
+RDEPENDS:${PN} += " \
+ agl-users \
+ polkit-rule-agl-app \
+"
+
+RDEPENDS:${PN}-template-agl-app = "${PN}"
+
+RDEPENDS:${PN}-template-agl-app-web = "${PN}"
+
+RDEPENDS:${PN}-template-agl-app-flutter = "${PN}"