f9c269d2ed4a39304d41943b2c51cc2a5bf83c3f
[AGL/meta-agl.git] / meta-agl / recipes-multimedia / lightmediascanner / lightmediascanner_%.bbappend
1 # Disable everything but the roygalty-free formats
2 PACKAGECONFIG = "ogg flac wave m3u pls jpeg png"
3
4 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
5
6 SRC_URI += "file://lightmediascanner.service"
7
8 inherit systemd
9
10 do_install_append() {
11        # Install LMS systemd service
12        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
13               install -p -D ${WORKDIR}/lightmediascanner.service ${D}${systemd_user_unitdir}/lightmediascanner.service
14
15               # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
16               # because it does not support systemd's user mode.
17               mkdir -p ${D}/etc/systemd/user/default.target.wants/
18               ln -sf ${systemd_user_unitdir}/lightmediascanner.service ${D}/etc/systemd/user/dbus-org.lightmediascanner.service
19               ln -sf ${systemd_user_unitdir}/lightmediascanner.service ${D}/etc/systemd/user/default.target.wants/lightmediascanner.service
20        fi
21 }
22
23 FILES_${PN} += " \
24     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/lightmediascanner.service', '', d)} \
25     "