Add systemd configuration to launch weston automatically
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / weston_1.5.0.bbappend
diff --git a/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend
new file mode 100644 (file)
index 0000000..fd195e9
--- /dev/null
@@ -0,0 +1,25 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+SRC_URI_append = "\
+    file://weston.service \
+    file://weston.ini \
+    "
+
+inherit systemd
+DEPENDS_append = " systemd"
+
+do_install_append() {
+    mkdir -p ${D}${systemd_unitdir}/system/
+    cp ${WORKDIR}/weston.service ${D}${systemd_unitdir}/system/
+    mkdir -p ${D}${systemd_unitdir}/system/multi-user.target.wants/
+    ln -sf /lib/systemd/system/weston.service ${D}/${systemd_unitdir}/system/multi-user.target.wants/weston.service
+
+    WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+    install -d ${D}${WESTON_INI_CONFIG}
+    install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+}
+
+FILES_${PN} += " \
+    ${systemd_unitdir}/system/* \
+    ${sysconfdir}/xdg/weston/weston.ini \
+    "