Accepting request 114487 from home:jeff_mahoney:branches:Base:System

- Make libsbc installable; Required by update to Opal.

OBS-URL: https://build.opensuse.org/request/show/114487
OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=117
This commit is contained in:
Andreas Jaeger 2012-04-20 08:23:38 +00:00 committed by Git OBS Bridge
parent 656034330e
commit 01f662b6da
3 changed files with 135 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Apr 18 22:09:48 UTC 2012 - jeffm@suse.com
- Make libsbc installable; Required by update to Opal.
-------------------------------------------------------------------
Thu Mar 8 21:06:29 UTC 2012 - seife+obs@b1-systems.com

View File

@ -57,6 +57,7 @@ Source7: bluetooth.modprobe
Patch1: bluez-4.75-udev-use-helperscript.diff
Patch2: 001-remove-rule-dell-mouse.patch
# needed until next upstream release --seife
Patch3: libsbc-make-it-installable
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: bluez-utils = 3.36
Obsoletes: bluez-utils <= 3.36
@ -153,6 +154,43 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
Authors:
--------
Marcel Holtmann <marcel@holtmann.org>
and others, see AUTHORS in the documentation of the "bluez" package.
%package sbc
Summary: Bluetooth Low-Complexity, Sub-Band Codec Utilities
License: GPL-2.0+
Group: Hardware/Mobile
Requires: libbluetooth3 = %{version}
Requires: libsbc0 = %{version}
%description sbc
The package contains utilities for using the SBC codec.
The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., USA.
Authors:
--------
Marcel Holtmann <marcel@holtmann.org>
and others, see AUTHORS in the documentation of the "bluez" package.
%package -n libsbc0
Summary: Bluetooth Low-Complexity, Sub-Band Codec Library
License: GPL-2.0+
Group: Hardware/Mobile
Requires: libbluetooth3 = %{version}
%description -n libsbc0
The package contains libraries for using the SBC codec.
The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., USA.
Authors:
--------
Marcel Holtmann <marcel@holtmann.org>
@ -197,6 +235,7 @@ Authors:
%prep
%setup -q
%patch1 -p1
%patch3 -p1
# disabled the patch because it does no longer cleanly apply and the rule has
# changed significantly anyway. I'll keep it until i get confirmation in bugzilla.
##%%patch2 -p1
@ -251,7 +290,7 @@ install --mode=0755 \
test-telephony \
$RPM_BUILD_ROOT/%{_bindir}/
cd ..
rm -v $RPM_BUILD_ROOT/%{_libdir}/libbluetooth.la
rm -v $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -rvf $RPM_BUILD_ROOT/%{_libdir}/gstreamer-*
rm -v $RPM_BUILD_ROOT/%{_libdir}/alsa-lib/*.la
install --mode=0755 -D %{S:2} $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/bluez-coldplug
@ -298,6 +337,10 @@ rm -rf $RPM_BUILD_ROOT
%service_del_postun bluetooth.service
%endif
%post -n libsbc0 -p /sbin/ldconfig
%postun -n libsbc0 -p /sbin/ldconfig
%post -n libbluetooth3 -p /sbin/ldconfig
%postun -n libbluetooth3 -p /sbin/ldconfig
@ -354,6 +397,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/include/bluetooth
%{_libdir}/libbluetooth.so
%{_libdir}/pkgconfig/bluez.pc
%{_libdir}/libsbc.so
%{_libdir}/pkgconfig/libsbc.pc
%files -n libbluetooth3
%defattr(-, root, root)
@ -392,6 +437,16 @@ rm -rf $RPM_BUILD_ROOT
%config /usr/share/alsa/bluetooth.conf
%{_libdir}/alsa-lib/*.so
%files sbc
%defattr(-, root, root)
%{_bindir}/sbcdec
%{_bindir}/sbcenc
%{_bindir}/sbcinfo
%files -n libsbc0
%defattr(-,root,root)
%{_libdir}/libsbc.so.*
%files compat
%defattr(-,root,root)
%{_bindir}/dund

View File

@ -0,0 +1,74 @@
From: Jeff Mahoney <jeffm@suse.com>
Subject: libsbc: Make it installable
While rebuilding Opal, I found that the SBC plugin no longer ships with
the SBC code. This patch allows other projects to use the SBC code
without having to duplicate it.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
Makefile.am | 8 ++++----
configure.ac | 3 ++-
libsbc.pc.in | 10 ++++++++++
3 files changed, 16 insertions(+), 5 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,7 +64,7 @@ local_headers = $(foreach file,$(lib_hea
BUILT_SOURCES = $(local_headers) src/builtin.h
-include_HEADERS += $(lib_headers)
+include_HEADERS += $(lib_headers) sbc/sbc.h
lib_LTLIBRARIES += lib/libbluetooth.la
@@ -78,7 +78,7 @@ noinst_LTLIBRARIES += lib/libbluetooth-p
lib_libbluetooth_private_la_SOURCES = $(lib_libbluetooth_la_SOURCES)
if SBC
-noinst_LTLIBRARIES += sbc/libsbc.la
+lib_LTLIBRARIES += sbc/libsbc.la
sbc_libsbc_la_SOURCES = sbc/sbc.h sbc/sbc.c sbc/sbc_math.h sbc/sbc_tables.h \
sbc/sbc_primitives.h sbc/sbc_primitives.c \
@@ -90,7 +90,7 @@ sbc_libsbc_la_SOURCES = sbc/sbc.h sbc/sb
sbc_libsbc_la_CFLAGS = $(AM_CFLAGS) -finline-functions -fgcse-after-reload \
-funswitch-loops -funroll-loops
-noinst_PROGRAMS += sbc/sbcinfo sbc/sbcdec sbc/sbcenc
+bin_PROGRAMS += sbc/sbcinfo sbc/sbcdec sbc/sbcenc
sbc_sbcdec_SOURCES = sbc/sbcdec.c sbc/formats.h
sbc_sbcdec_LDADD = sbc/libsbc.la
@@ -462,7 +462,7 @@ TESTS = $(unit_tests)
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = bluez.pc
+pkgconfig_DATA = bluez.pc libsbc.pc
DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles
--- a/configure.ac
+++ b/configure.ac
@@ -72,4 +72,5 @@ fi
AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
- src/bluetoothd.8 src/bluetooth.service bluez.pc)
+ src/bluetoothd.8 src/bluetooth.service bluez.pc
+ libsbc.pc)
--- /dev/null
+++ b/libsbc.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: BlueZ libsbc
+Description: Bluetooth low-complexity SubBand Codec
+Version: @VERSION@
+Libs: -L${libdir} -lsbc
+Cflags: -I${includedir}