diff --git a/pulseaudio.changes b/pulseaudio.changes index feeeaa9..dba64b4 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Oct 20 20:52:41 UTC 2013 - oholecek@suse.com + +- enable bluez4 support for older openSUSE releases + ------------------------------------------------------------------- Fri Oct 18 17:49:24 UTC 2013 - dimstar@opensuse.org diff --git a/pulseaudio.spec b/pulseaudio.spec index 1216eb9..f5395d0 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -24,6 +24,11 @@ Release: 0 %define soname 0 %define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services +# store bluez version from bluez-devel and check for bluez4/5 +# _bluezVersion is than also used in requires for bluetooth subpackage +# once oS 12.3 is EOL, this can be removed as there will probably be nothing providing bluez4 +%define _bluezVersion %(LC_ALL="C" rpm --qf '%%{VERSION}' -q bluez-devel | grep -v 'not installed') +%define _bluez5used 0%(echo "%{_bluezVersion}" | grep -q '^5' && echo 1) Summary: A Networked Sound Server License: GPL-2.0+ and LGPL-2.1+ Group: System/Sound Daemons @@ -40,7 +45,8 @@ Patch0: disabled-start.diff Patch1: suppress-socket-error-msg.diff Patch2: pulseaudio-wrong-memset.patch BuildRequires: alsa-devel >= 1.0.24 -BuildRequires: bluez-devel >= 5 +# require only minimal bluez, if we are on bluez 5 we will determine in %build phase +BuildRequires: bluez-devel >= 4.99 BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ @@ -182,7 +188,7 @@ This package includes support for Jack-based applications. Summary: Bluetooth support for the PulseAudio sound server Group: System/Sound Daemons Requires: %{name} = %{version} -Requires: bluez >= 5 +Requires: bluez = %{_bluezVersion} %description module-bluetooth pulseaudio is a networked sound server for Linux and other Unix like @@ -301,7 +307,11 @@ NOCONFIGURE=1 ./bootstrap.sh --with-system-group=pulse \ --with-access-group=pulse-access \ --disable-hal-compat \ +%if 0%{?_bluez5used} --disable-bluez4 \ +%else + --disable-bluez5 \ +%endif --with-udev-rules-dir=%{_udevrulesdir} make %{?_smp_mflags} V=1 make doxygen @@ -539,10 +549,16 @@ exit 0 %files module-bluetooth %defattr(-,root,root) %{_libdir}/pulse-%{drvver}/modules/module-bluetooth-policy.so -%{_libdir}/pulse-%{drvver}/modules/libbluez5-util.so %{_libdir}/pulse-%{drvver}/modules/module-bluetooth-discover.so +%if 0%{?_bluez5used} +%{_libdir}/pulse-%{drvver}/modules/libbluez5-util.so %{_libdir}/pulse-%{drvver}/modules/module-bluez5-device.so %{_libdir}/pulse-%{drvver}/modules/module-bluez5-discover.so +%else +%{_libdir}/pulse-%{drvver}/modules/libbluez4-util.so +%{_libdir}/pulse-%{drvver}/modules/module-bluez4-device.so +%{_libdir}/pulse-%{drvver}/modules/module-bluez4-discover.so +%endif %files module-gconf %defattr(-,root,root)