bluez5: Only install .conf files if found

Submitted by Jukka Rissanen on July 29, 2013, 8:29 a.m.

Details

Message ID 1375086581-12129-1-git-send-email-jukka.rissanen@linux.intel.com
State Accepted
Commit ecdbaeeef11fd7732fffe992c7aa3cfa28eaabff
Headers show

Commit Message

Jukka Rissanen July 29, 2013, 8:29 a.m.
Bluez5 is migrating away from using separate .conf files
for different profiles. So only install profile configuration files
when they are found. This is needed so that the bluez5.inc file
can be used with latest bluez5 from git.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index fc78900..36a6061 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -39,9 +39,15 @@  EXTRA_OECONF = "\
 
 do_install_append() {
 	install -d ${D}${sysconfdir}/bluetooth/
-	install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
-	install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
-	install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
+	if [ -f ${S}/profiles/audio/audio.conf ]; then
+	    install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
+	fi
+	if [ -f ${S}/profiles/network/network.conf ]; then
+	    install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
+	fi
+	if [ -f ${S}/profiles/input/input.conf ]; then
+	    install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
+	fi
 	# at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
 	install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
 }