aboutsummaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bbappend
blob: 31253d03c3e88a306390463581b25231f720ba45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SRC_URI += "\
    file://pipewire@.service \
    file://pipewire@.socket \
    "

do_install_append() {
    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
        # remote the original user unit files shipped by pipewire
        rm -rf ${D}${systemd_unitdir}

        # install our own system-level templates
        mkdir -p ${D}${systemd_system_unitdir}/
        install -m 0644 ${WORKDIR}/pipewire@.service ${D}${systemd_system_unitdir}/pipewire@.service
        install -m 0644 ${WORKDIR}/pipewire@.socket ${D}${systemd_system_unitdir}/pipewire@.socket

        # enable the socket to start together with afm-user-session
        mkdir -p ${D}${systemd_system_unitdir}/afm-user-session@.target.wants
        ln -sf ../pipewire@.socket ${D}${systemd_system_unitdir}/afm-user-session@.target.wants/pipewire@.socket
    fi
}

FILES_${PN} += "${systemd_system_unitdir}/*"