Remove Yocto 1.7 compatibility crufts
[AGL/meta-agl.git] / meta-agl / recipes-connectivity / rygel / rygel_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3 # Disable everything but the media-export plugin, add the lms plugin
4 PACKAGECONFIG = "media-export lms"
5 PACKAGECONFIG[lms] = "--enable-lms-plugin,--disable-lms-plugin,sqlite3"
6
7 # LightMediaScanner plugin patches
8 SRC_URI += "file://0001-Add-LightMediaScanner-plugin.patch \
9             file://0002-lms-add-C-source-files.patch \
10             file://rygel.service \
11             "
12
13 inherit systemd
14
15 do_install_append() {
16        # Install rygel systemd service
17        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
18               install -m 644 -p -D ${WORKDIR}/rygel.service ${D}${systemd_user_unitdir}/rygel.service
19
20               # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
21               # because it does not support systemd's user mode.
22               # However, systemctl --global should be checked
23               mkdir -p ${D}/etc/systemd/user/default.target.wants/
24               ln -sf ${systemd_user_unitdir}/rygel.service ${D}/etc/systemd/user/dbus-org.gnome.Rygel1.service
25               ln -sf ${systemd_user_unitdir}/rygel.service ${D}/etc/systemd/user/default.target.wants/rygel.service
26        fi
27 }
28
29 FILES_${PN} += " \
30     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/rygel.service', '', d)} \
31     "