--- /dev/null
+[Unit]
+Description=Lightmediascanner (LMS)
+
+[Service]
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket
+User=root
+ExecStart=/usr/bin/dbus-launch --auto-syntax /usr/bin/lightmediascannerd --startup-scan --directory=/usr/share/media
+
+[Install]
+WantedBy=multi-user.target
# Disable everything but the roygalty-free formats
PACKAGECONFIG = "ogg flac wave m3u pls jpeg png"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://lightmediascanner.service"
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = ""
+SYSTEMD_SERVICE_${PN} += "lightmediascanner.service"
+
+do_install_append() {
+ # Install LMS systemd service
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -p -D ${WORKDIR}/lightmediascanner.service ${D}${systemd_unitdir}/system/lightmediascanner.service
+ fi
+}