aboutsummaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-config-agl_git.bb
blob: 22ffe5bf38cc2025ee1af1860eba26cdc51b25c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
SUMMARY     = "AGL configuration file for wireplumber"
HOMEPAGE    = "https://gitlab.freedesktop.org/gkiagia/wireplumber"
BUGTRACKER  = "https://jira.automotivelinux.org"
AUTHOR      = "George Kiagiadakis <george.kiagiadakis@collabora.com>"
SECTION     = "multimedia"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
    file://bluetooth.lua.d/ \
    file://host.lua.d/ \
    file://00-functions.lua \
    file://alsa-suspend.lua \
    file://bluetooth.conf \
    file://wireplumber.conf \
    file://wireplumber-bluetooth.conf \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"

do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install:append() {
    config_dir="${D}${sysconfdir}/wireplumber/"
    scripts_dir="${D}${datadir}/wireplumber/scripts/"
    dbus_config_dir="${D}${sysconfdir}/dbus-1/system.d/"
    systemd_dir="${D}${sysconfdir}/systemd/system/pipewire.service.wants/"

    install -d ${config_dir}
    install -m 0644 ${WORKDIR}/00-functions.lua ${config_dir}

    # config of the main (host) instance
    install -d ${config_dir}/host.lua.d/
    ln -s ../00-functions.lua ${config_dir}/host.lua.d/00-functions.lua
    install -m 0644 ${WORKDIR}/host.lua.d/*.lua ${config_dir}/host.lua.d/
    install -m 0644 ${WORKDIR}/wireplumber.conf ${config_dir}

    # config of the bluetooth instance
    install -d ${config_dir}/bluetooth.lua.d/
    ln -s ../00-functions.lua ${config_dir}/bluetooth.lua.d/00-functions.lua
    install -m 0644 ${WORKDIR}/bluetooth.lua.d/*.lua ${config_dir}/bluetooth.lua.d/
    install -m 0644 ${WORKDIR}/bluetooth.conf ${config_dir}

    # install the alsa-suspend script, loaded by the main instance
    install -d ${scripts_dir}
    install -m 0644 ${WORKDIR}/alsa-suspend.lua ${scripts_dir}

    # install dbus daemon configuration
    install -d ${dbus_config_dir}
    install -m 0644 ${WORKDIR}/wireplumber-bluetooth.conf ${dbus_config_dir}

    # enable additional systemd services
    install -d ${systemd_dir}
    ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@bluetooth.service
}

FILES:${PN} += "\
    ${sysconfdir}/* \
    ${datadir}/wireplumber/* \
"
CONFFILES:${PN} += "\
    ${sysconfdir}/* \
"