Accepting request 461317 from home:scarabeus_iv:branches:Base:System

- Set the cupsdir directly with patch instead of mv and seds:
  * bluez-cups-libexec.patch
- Replace requirements by the pkgconfig counterparts
  * this should solve out the problem with builcycle on Factory
- Ran over with spec-cleaner

OBS-URL: https://build.opensuse.org/request/show/461317
OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=220
This commit is contained in:
Stefan Seyfried 2017-03-01 20:50:58 +00:00 committed by Git OBS Bridge
parent f0193b4342
commit ea3fc75a76
3 changed files with 74 additions and 54 deletions

26
bluez-cups-libexec.patch Normal file
View File

@ -0,0 +1,26 @@
Index: bluez-5.43/Makefile.in
===================================================================
--- bluez-5.43.orig/Makefile.in
+++ bluez-5.43/Makefile.in
@@ -2689,7 +2689,7 @@ unit_tests = $(am__append_33) unit/test-
@EXPERIMENTAL_TRUE@tools_gatt_service_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ gdbus/libgdbus-internal.la
@EXPERIMENTAL_TRUE@profiles_iap_iapd_SOURCES = profiles/iap/main.c
@EXPERIMENTAL_TRUE@profiles_iap_iapd_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
-@CUPS_TRUE@cupsdir = $(libdir)/cups/backend
+@CUPS_TRUE@cupsdir = $(libexecdir)/../cups/backend
@CUPS_TRUE@profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
@CUPS_TRUE@ profiles/cups/cups.h \
@CUPS_TRUE@ profiles/cups/sdp.c \
Index: bluez-5.43/Makefile.tools
===================================================================
--- bluez-5.43.orig/Makefile.tools
+++ bluez-5.43/Makefile.tools
@@ -392,7 +392,7 @@ profiles_iap_iapd_LDADD = gdbus/libgdbus
endif
if CUPS
-cupsdir = $(libdir)/cups/backend
+cupsdir = $(libexecdir)/../cups/backend
cups_PROGRAMS = profiles/cups/bluetooth

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Mar 1 11:39:56 UTC 2017 - tchvatal@suse.com
- Set the cupsdir directly with patch instead of mv and seds:
* bluez-cups-libexec.patch
- Replace requirements by the pkgconfig counterparts
* this should solve out the problem with builcycle on Factory
- Ran over with spec-cleaner
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Oct 29 09:23:59 UTC 2016 - seife+obs@b1-systems.com Sat Oct 29 09:23:59 UTC 2016 - seife+obs@b1-systems.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package bluez # spec file for package bluez
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2016 B1 Systems GmbH, Vohburg, Germany # Copyright (c) 2010-2016 B1 Systems GmbH, Vohburg, Germany
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -18,12 +18,6 @@
Name: bluez Name: bluez
# FIXME: Do not mangle dbus service / systemd service once we support systemd user services
BuildRequires: flex
BuildRequires: libcap-ng-devel
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(dbus-1) >= 1.6
%{?systemd_requires}
Version: 5.43 Version: 5.43
Release: 0 Release: 0
Summary: Bluetooth Stack for Linux Summary: Bluetooth Stack for Linux
@ -36,17 +30,23 @@ Source7: bluetooth.modprobe
# fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com # fix some logitech HID devices, bnc#681049, bnc#850478 --seife+obs@b1-systems.com
Patch1: bluez-5.11-logitech-hid2hci.patch Patch1: bluez-5.11-logitech-hid2hci.patch
Patch2: bluez-sdp-unix-path.patch Patch2: bluez-sdp-unix-path.patch
BuildRequires: alsa-devel # PATCH-FIX-UPSTREAM: find the cups dir in libexec not in libdir
Patch3: bluez-cups-libexec.patch
BuildRequires: automake BuildRequires: automake
BuildRequires: check-devel BuildRequires: flex
BuildRequires: libical-devel
BuildRequires: libsndfile-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libudev-devel BuildRequires: pkgconfig
BuildRequires: pkg-config
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: udev BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(check)
BuildRequires: pkgconfig(dbus-1) >= 1.6
BuildRequires: pkgconfig(glib-2.0) >= 2.28 BuildRequires: pkgconfig(glib-2.0) >= 2.28
BuildRequires: pkgconfig(libcap-ng)
BuildRequires: pkgconfig(libical)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(udev)
Recommends: sbc Recommends: sbc
Provides: bluez-utils = 3.36 Provides: bluez-utils = 3.36
Obsoletes: bluez-utils <= 3.36 Obsoletes: bluez-utils <= 3.36
@ -57,14 +57,7 @@ Provides: bluez-hcidump = %{version}
Obsoletes: obexd-client < 5.0 Obsoletes: obexd-client < 5.0
Provides: obexd-client = %{version} Provides: obexd-client = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
# In openSUSE 11.3 there is upstream compliant CUPS 1.4
# which means to have a fixed "/usr/lib/cups/" directory
# on all platforms (see Novell/Suse Bugzilla bnc#575544):
%define cups_lib_dir %{_prefix}/lib/cups
# we want to be able to build with older distros, too...
%{!?_userunitdir: %define _userunitdir %{_prefix}/lib/systemd/user}
%description %description
BlueZ provides support for the core Bluetooth layers and protocols. BlueZ provides support for the core Bluetooth layers and protocols.
@ -105,7 +98,6 @@ Group: Hardware/Printing
Contains the files required by CUPS for printing to Bluetooth-connected Contains the files required by CUPS for printing to Bluetooth-connected
printers. printers.
# disabled for now
%package test %package test
Summary: Tools for testing of various Bluetooth-functions Summary: Tools for testing of various Bluetooth-functions
License: GPL-2.0+ and MIT License: GPL-2.0+ and MIT
@ -121,6 +113,7 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
mkdir dbus-apis mkdir dbus-apis
cp -a doc/*.txt dbus-apis/ cp -a doc/*.txt dbus-apis/
# FIXME: Change the dbus service to be a real service, not systemd launched # FIXME: Change the dbus service to be a real service, not systemd launched
@ -131,6 +124,7 @@ sed -i "/SystemdService=.*/d" obexd/src/org.bluez.obex.service
%build %build
# --enable-experimental is needed or btattach does not build (bug?) # --enable-experimental is needed or btattach does not build (bug?)
%configure \ %configure \
--disable-silent-rules \
--enable-pie \ --enable-pie \
--enable-library \ --enable-library \
--enable-tools \ --enable-tools \
@ -141,21 +135,12 @@ sed -i "/SystemdService=.*/d" obexd/src/org.bluez.obex.service
--with-systemdsystemunitdir=%{_unitdir} \ --with-systemdsystemunitdir=%{_unitdir} \
--with-systemduserunitdir=%{_userunitdir} --with-systemduserunitdir=%{_userunitdir}
make %{?_smp_mflags} all V=1 make %{?_smp_mflags} all
%install %install
%make_install %make_install
rm -v %{buildroot}/%{_libdir}/*.la find %{buildroot} -type f -name "*.la" -delete -print
install --mode=0644 -D %{SOURCE7} %{buildroot}/%{_sysconfdir}/modprobe.d/50-bluetooth.conf install --mode=0644 -D %{SOURCE7} %{buildroot}/%{_sysconfdir}/modprobe.d/50-bluetooth.conf
# In openSUSE 11.3 there is upstream compliant CUPS 1.4
# which means to have a fixed "/usr/lib/cups/" directory
# on all platforms (see Novell/Suse Bugzilla bnc#575544):
if ! test -e %{buildroot}%{cups_lib_dir}/backend/bluetooth
then if test -e %{buildroot}%{_libdir}/cups/backend/bluetooth
then mkdir -p %{buildroot}%{cups_lib_dir}/backend
mv %{buildroot}%{_libdir}/cups/backend/bluetooth %{buildroot}%{cups_lib_dir}/backend/bluetooth
fi
fi
# no idea why this is suddenly necessary... # no idea why this is suddenly necessary...
install --mode 0755 -d %{buildroot}%{_localstatedir}/lib/bluetooth install --mode 0755 -d %{buildroot}%{_localstatedir}/lib/bluetooth
@ -212,27 +197,27 @@ make %{?_smp_mflags} check
%{_bindir}/hciconfig %{_bindir}/hciconfig
%{_bindir}/hex2hcd %{_bindir}/hex2hcd
%{_bindir}/mpris-proxy %{_bindir}/mpris-proxy
%dir /usr/lib/bluetooth %dir %{_libexecdir}/bluetooth
/usr/lib/bluetooth/bluetoothd %{_libexecdir}/bluetooth/bluetoothd
/usr/lib/bluetooth/obexd %{_libexecdir}/bluetooth/obexd
%{_bindir}/bluetoothctl %{_bindir}/bluetoothctl
%{_bindir}/btmon %{_bindir}/btmon
%{_bindir}/hcidump %{_bindir}/hcidump
%{_bindir}/bccmd %{_bindir}/bccmd
%{_prefix}/lib/udev/ %{_libexecdir}/udev/
%doc %{_mandir}/man1/btattach.1.gz %{_mandir}/man1/btattach.1%{ext_man}
%doc %{_mandir}/man1/hcidump.1.gz %{_mandir}/man1/hcidump.1%{ext_man}
%doc %{_mandir}/man1/hciattach.1.gz %{_mandir}/man1/hciattach.1%{ext_man}
%doc %{_mandir}/man1/hciconfig.1.gz %{_mandir}/man1/hciconfig.1%{ext_man}
%doc %{_mandir}/man8/bluetoothd.8.gz %{_mandir}/man8/bluetoothd.8%{ext_man}
%doc %{_mandir}/man1/hid2hci.1.gz %{_mandir}/man1/hid2hci.1%{ext_man}
%doc %{_mandir}/man1/bccmd.1.gz %{_mandir}/man1/bccmd.1%{ext_man}
%doc %{_mandir}/man1/l2ping.1.gz %{_mandir}/man1/l2ping.1%{ext_man}
%doc %{_mandir}/man1/hcitool.1.gz %{_mandir}/man1/hcitool.1%{ext_man}
%doc %{_mandir}/man1/sdptool.1.gz %{_mandir}/man1/sdptool.1%{ext_man}
%doc %{_mandir}/man1/ciptool.1.gz %{_mandir}/man1/ciptool.1%{ext_man}
%doc %{_mandir}/man1/rfcomm.1.gz %{_mandir}/man1/rfcomm.1%{ext_man}
%doc %{_mandir}/man1/rctest.1.gz %{_mandir}/man1/rctest.1%{ext_man}
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%dir %{_localstatedir}/lib/bluetooth %dir %{_localstatedir}/lib/bluetooth
%dir %{_sysconfdir}/modprobe.d %dir %{_sysconfdir}/modprobe.d
@ -254,9 +239,9 @@ make %{?_smp_mflags} check
%files cups %files cups
%defattr(-,root,root) %defattr(-,root,root)
%dir %{cups_lib_dir} %dir %{_libexecdir}/cups
%dir %{cups_lib_dir}/backend %dir %{_libexecdir}/cups/backend
%{cups_lib_dir}/backend/bluetooth %{_libexecdir}/cups/backend/bluetooth
%files test %files test
%defattr(-,root,root) %defattr(-,root,root)