aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Proca <florentin.proca@windriver.com>2012-05-16 16:41:56 +0300
committerFlorin Sarbu <florin.sarbu@windriver.com>2012-05-16 16:45:10 +0300
commit95cd0c312c6045005dbb45da984b374094b4e3cc (patch)
treec10f23e81296438ff379cefc6c506d87667cfc96
parentb8e8c65c7ebcc998a834028405e282c10badfd55 (diff)
downloadmeta-ivi-95cd0c312c6045005dbb45da984b374094b4e3cc.tar.gz
meta-ivi-95cd0c312c6045005dbb45da984b374094b4e3cc.tar.bz2
meta-ivi-95cd0c312c6045005dbb45da984b374094b4e3cc.zip
AudioManager: add service file for systemd and setup script
Systemd service file for AudioManager was missing. An AudioManager setup script for dbus-dameon is also installed. Signed-off-by: Sebastian Proca <Florentin.Proca@windriver.com>
-rw-r--r--recipes-multimedia/AudioManager/AudioManager-1.0/AudioManager.service17
-rw-r--r--recipes-multimedia/AudioManager/AudioManager-1.0/setup_amgr.sh7
-rw-r--r--recipes-multimedia/AudioManager/AudioManager_1.0.bb30
3 files changed, 46 insertions, 8 deletions
diff --git a/recipes-multimedia/AudioManager/AudioManager-1.0/AudioManager.service b/recipes-multimedia/AudioManager/AudioManager-1.0/AudioManager.service
new file mode 100644
index 0000000..9653b48
--- /dev/null
+++ b/recipes-multimedia/AudioManager/AudioManager-1.0/AudioManager.service
@@ -0,0 +1,17 @@
+# Copyright (c) 2012 Wind River Systems, Inc.
+# AudioManager systemd service file
+
+[Unit]
+Description=AudioManager
+Requires=dbus.service
+After=dbus.service
+
+[Service]
+Type=simple
+RemainAfterExit=true
+ExecStart=/lib/systemd/scripts/setup_amgr.sh
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/recipes-multimedia/AudioManager/AudioManager-1.0/setup_amgr.sh b/recipes-multimedia/AudioManager/AudioManager-1.0/setup_amgr.sh
new file mode 100644
index 0000000..034de50
--- /dev/null
+++ b/recipes-multimedia/AudioManager/AudioManager-1.0/setup_amgr.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+rm /tmp/session_amgr
+dbus-daemon --session --print-address --fork > /tmp/session_amgr
+export DBUS_SESSION_BUS_ADDRESS=`cat /tmp/session_amgr`
+AudioManager -c/usr/lib/audioManager/control/libPluginControlInterface.so -l/usr/lib/audioManager/command/ -r/usr/lib/audioManager/routing/
+
diff --git a/recipes-multimedia/AudioManager/AudioManager_1.0.bb b/recipes-multimedia/AudioManager/AudioManager_1.0.bb
index 5a54e94..3a26d49 100644
--- a/recipes-multimedia/AudioManager/AudioManager_1.0.bb
+++ b/recipes-multimedia/AudioManager/AudioManager_1.0.bb
@@ -1,3 +1,6 @@
+
+ERROR_QA = "debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
+
SUMMARY = "Genivi AudioManager"
HOMEPAGE = "https://www.genivi.org/"
@@ -9,22 +12,33 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=815ca599c9df247a0c7f619bab123dad"
DEPENDS = "DLT-daemon sqlite3 dbus"
SRC_URI = "git://git.genivi.org/srv/git/AudioManager;protocol=git;tag=3c4baa71a0c3176dad0c2dcdafbf802fd28a7200 \
- "
+ file://AudioManager.service file://setup_amgr.sh"
+
S = "${WORKDIR}/git"
inherit autotools gettext cmake pkgconfig
EXTRA_OECMAKE += "-DWITH_TESTS=OFF"
OECMAKE_CXX_FLAGS +="-ldl"
-FILES_${PN} += "${libdir}/audioManager/command/*.so.* \
- ${libdir}/audioManager/control/*.so.* \
- ${libdir}/audioManager/routing/*.so.* \
-"
-FILES_${PN}-dev += "${libdir}/audioManager/command/*.so \
- ${libdir}/audioManager/control/*.so \
- ${libdir}/audioManager/routing/*.so \
+FILES_${PN} += "${libdir}/audioManager/command/*.so* \
+ ${libdir}/audioManager/control/*.so* \
+ ${libdir}/audioManager/routing/*.so* \
"
+
+FILES_${PN}-systemd += "/lib/systemd/"
+
FILES_${PN}-dbg += "${libdir}/audioManager/command/.debug/* \
${libdir}/audioManager/control/.debug/* \
${libdir}/audioManager/routing/.debug/* \
"
+
+PACKAGES =+ "${PN}-systemd"
+
+do_install_append() {
+ mkdir -p ${D}/lib/systemd/system/ ${D}/lib/systemd/scripts/
+ install -m 0755 ${WORKDIR}/AudioManager.service ${D}/lib/systemd/system/AudioManager.service
+ install -m 0755 ${WORKDIR}/setup_amgr.sh ${D}/lib/systemd/scripts/setup_amgr.sh
+ mkdir -p ${D}/lib/systemd/system/multi-user.target.wants
+ ln -s ../AudioManager.service ${D}/lib/systemd/system/multi-user.target.wants/AudioManager.service
+}
+