aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager_7.3.bb
blob: 5255f11e62bc8e44054af36f53da19f38bbbc97d (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
SUMMARY = "Genivi AudioManager"
HOMEPAGE = "https://www.genivi.org/"
SECTION = "multimedia"

LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://LICENCE;md5=f164349b56ed530a6642e9b9f244eec5"
PR = "r1"

DEPENDS = "dlt-daemon dbus"

BRANCH = "master"

SRC_URI = " \
    git://git.projects.genivi.org/AudioManager.git;branch=${BRANCH};tag=${PV} \
    file://0001-Fix-duplicated-command-line-arg-t.patch \
    file://AudioManager.service \
    "

S = "${WORKDIR}/git"
inherit autotools gettext cmake pkgconfig systemd

EXTRA_OECMAKE += "-DWITH_TESTS=OFF -DUSE_BUILD_LIBS=OFF -DWITH_SYSTEMD_WATCHDOG=ON \
    -DWITH_DBUS_WRAPPER=ON"
OECMAKE_CXX_FLAGS +="-ldl"

PACKAGECONFIG ??= ""

# With CommonAPI support
PACKAGECONFIG[capi] = "-DWITH_CAPI_WRAPPER=ON,-DWITH_CAPI_WRAPPER=OFF,common-api-c++-dbus"

FILES_${PN} += " \
    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/AudioManager.service', '', d)} \
    "

do_install_append() {
    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
        install -m 644 -p -D ${WORKDIR}/AudioManager.service ${D}${systemd_user_unitdir}/AudioManager.service

        mkdir -p ${D}/etc/systemd/user/default.target.wants/
        ln -sf ${systemd_user_unitdir}/AudioManager.service ${D}/etc/systemd/user/dbus-org.genivi.AudioManager.service
        ln -sf ${systemd_user_unitdir}/AudioManager.service ${D}/etc/systemd/user/default.target.wants/AudioManager.service
    fi
}