Add support for GENIVI Audio Manager. 17/5617/6
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
Wed, 13 Apr 2016 02:13:40 +0000 (23:13 -0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 6 May 2016 21:45:35 +0000 (21:45 +0000)
More info at http://projects.genivi.org/audio-manager/.

Change-Id: I557a6f69e80e5d3a784d89dbb0584c925ce47545
Signed-off-by: Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch [new file with mode: 0644]
meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/AudioManager.service [new file with mode: 0644]
meta-ivi-common/recipes-multimedia/audiomanager/audiomanager_7.3.bb [new file with mode: 0644]

diff --git a/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch b/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/0001-Fix-duplicated-command-line-arg-t.patch
new file mode 100644 (file)
index 0000000..fcdf9c5
--- /dev/null
@@ -0,0 +1,25 @@
+From c4b6030f575e38dfc9cca7dfd029d207f3af6a13 Mon Sep 17 00:00:00 2001
+From: "Andre Moreira Magalhaes (andrunko)" <andre.magalhaes@collabora.co.uk>
+Date: Thu, 5 May 2016 00:01:19 -0300
+Subject: [PATCH] Fix duplicated command line arg -t.
+
+---
+ AudioManagerDaemon/src/main.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
+index 795795d..67c0977 100755
+--- a/AudioManagerDaemon/src/main.cpp
++++ b/AudioManagerDaemon/src/main.cpp
+@@ -87,7 +87,7 @@ TCLAP::ValueArg<std::string> commandPluginDir("l","CommandPluginDir","path for l
+ TCLAP::ValueArg<std::string> databasePath ("p","databasePath","path for sqlite database (default is in memory)",false,":memory:","string");
+ TCLAP::ValueArg<unsigned int> telnetPort ("t","telnetport","The port that is used for telnet",false,DEFAULT_TELNETPORT,"int");
+ TCLAP::ValueArg<unsigned int> maxConnections ("m","maxConnections","Maximal number of connections for telnet",false,MAX_TELNETCONNECTIONS,"int");
+-TCLAP::SwitchArg dbusWrapperTypeBool ("t","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false);
++TCLAP::SwitchArg dbusWrapperTypeBool ("T","dbusType","DbusType to be used by CAmDbusWrapper: if option is selected, DBUS_SYSTEM is used otherwise DBUS_SESSION",false);
+ TCLAP::SwitchArg enableNoDLTDebug ("V","logDlt","print DLT logs to stdout",false);
+ TCLAP::SwitchArg currentSettings("i","currentSettings","print current settings and exit",false);
+ TCLAP::SwitchArg daemonizeAM("d","daemonize","daemonize Audiomanager. Better use systemd...",false);
+-- 
+2.5.0
+
diff --git a/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/AudioManager.service b/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager/AudioManager.service
new file mode 100644 (file)
index 0000000..12aefad
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2012 Wind River Systems, Inc.
+# Copyright (c) 2016 Collabora Limited
+# AudioManager systemd service file
+
+[Unit]
+Description=GENIVI AudioManager
+
+[Service]
+Type=dbus
+BusName=org.genivi.audiomanager
+ExecStart=/usr/bin/AudioManager
+
+[Install]
+WantedBy=default.target
+Alias=dbus-org.genivi.AudioManager.service
diff --git a/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager_7.3.bb b/meta-ivi-common/recipes-multimedia/audiomanager/audiomanager_7.3.bb
new file mode 100644 (file)
index 0000000..5255f11
--- /dev/null
@@ -0,0 +1,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
+}