%define major 3 %define libname %mklibname %{name} %{major} %define devname %mklibname -d %{name} Name: bluez Summary: Official Linux Bluetooth protocol stack Version: 5.44 Release: %mkrel 2 License: GPLv2+ Group: Communications URL: http://bluez.org/ Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz Source1: 97-bluetooth.rules Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch Patch4: 0002-autopair-Don-t-handle-the-iCade.patch Patch5: 0004-agent-Assert-possible-infinite-loop.patch BuildRequires: flex BuildRequires: bison BuildRequires: dbus-devel BuildRequires: glib2-devel BuildRequires: libcap-ng-devel BuildRequires: libical-devel BuildRequires: readline-devel BuildRequires: udev-devel Requires(pre): filesystem Requires(post): rpm-helper Requires(preun): rpm-helper Requires: bluez-firmware Conflicts: bluez-alsa Conflicts: bluez-gstreamer %description These are the official Bluetooth communication libraries for Linux. %post update-alternatives --remove bluepin /usr/bin/bluepin update-alternatives --install /bin/bluepin bluepin /usr/bin/bluepin 5 #migrate old configuration if [ "$1" = "2" -a -d /var/lib/lib/bluetooth ]; then mv -f /var/lib/lib/bluetooth/* /var}/lib/bluetooth/ > /dev/null 2>&1 || exit 0 rmdir /var/lib/lib/bluetooth/ > /dev/null 2>&1 || exit 0 rmdir /var/lib/lib/ > /dev/null 2>&1 || exit 0 fi %files %{_bindir}/bluetoothd %{_bindir}/obexd %{_bindir}/ciptool %{_bindir}/hcitool %{_bindir}/l2ping %{_bindir}/rfcomm %{_bindir}/sdptool %{_bindir}/bccmd %{_bindir}/bluetoothctl %{_bindir}/bluemoon %{_bindir}/btmon %{_bindir}/hciattach %{_bindir}/hciconfig %{_bindir}/hcidump %{_bindir}/hex2hcd %{_bindir}/l2test %{_bindir}/mpris-proxy %{_bindir}/rctest %{_bindir}/btattach %{_mandir}/man1/btattach.1.* %{_mandir}/man1/ciptool.1.* %{_mandir}/man1/hcitool.1.* %{_mandir}/man1/rfcomm.1.* %{_mandir}/man1/sdptool.1.* %{_mandir}/man1/bccmd.1.* %{_mandir}/man1/hciattach.1.* %{_mandir}/man1/hciconfig.1.* %{_mandir}/man1/hcidump.1.* %{_mandir}/man1/l2ping.1.* %{_mandir}/man1/rctest.1.* %{_mandir}/man8/* %exclude %{_mandir}/man1/hid2hci.1* %config(noreplace) %{_sysconfdir}/dbus-1/system.d/*.conf %config(noreplace) %{_sysconfdir}/bluetooth %{_localstatedir}/lib/bluetooth %{_datadir}/dbus-1/system-services/org.bluez.service %{_datadir}/dbus-1/services/org.bluez.obex.service /lib/udev/rules.d/97-bluetooth.rules /usr/libexec/bluetooth/bluetoothd /usr/libexec/bluetooth/obexd #-------------------------------------------------------------------- %package cups Summary: CUPS printer backend for Bluetooth printers Group: System/Printing BuildRequires: cups-devel %description cups This package contains the CUPS backend for Bluetooth printers. %files cups %{_prefix}/lib/cups/backend/bluetooth #-------------------------------------------------------------------- %package hid2hci Summary: Put HID proxying bluetooth HCI's into HCI mode Group: Communications Requires(post): filesystem %description hid2hci Most allinone PC's and bluetooth keyboard / mouse sets which include a bluetooth dongle, ship with a so called HID proxying bluetooth HCI. The HID proxying makes the keyboard / mouse show up as regular USB HID devices (after connecting using the connect button on the device + keyboard), which makes them work without requiring any manual configuration. The bluez-hid2hci package contains the hid2hci utility and udev rules to automatically switch supported Bluetooth devices into regular HCI mode. Install this package if you want to use the bluetooth function of the HCI with other bluetooth devices like for example a mobile phone. Note that after installing this package you will first need to pair your bluetooth keyboard and mouse with the bluetooth adapter before you can use them again. Since you cannot use your bluetooth keyboard and mouse until they are paired, this will require the use of a regular (wired) USB keyboard and mouse. %files hid2hci /lib/udev/hid2hci %{_mandir}/man1/hid2hci.1* /lib/udev/rules.d/97-hid2hci.rules %post hid2hci /sbin/udevadm trigger --subsystem-match=usb #-------------------------------------------------------------------- %package -n %{libname} Summary: Official Linux Bluetooth protocol stack Group: System/Libraries Requires(pre): filesystem %description -n %{libname} These are the official Bluetooth communication libraries for Linux. %files -n %{libname} %{_libdir}/lib*.so.%{major}* #-------------------------------------------------------------------- %package -n %{devname} Summary: Headers for developing programs that will use %{name} Group: Development/Libraries Requires(pre): filesystem Requires: %{libname} = %{version} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{devname} This package contains the headers that programmers will need to develop applications which will use libraries from %{name}. %files -n %{devname} %doc AUTHORS ChangeLog README %{_includedir}/bluetooth %{_libdir}/*.so %{_libdir}/pkgconfig/bluez.pc #-------------------------------------------------------------------- %prep %setup -q %apply_patches %build autoreconf -fi %define _localstatedir /var %define _libexecdir /usr/libexec %configure2_5x \ --enable-cups \ --enable-tools \ --enable-library \ --disable-systemd \ --enable-deprecated ### --enable-nfc \ # --enable-udev \ # --enable-network \ # --enable-hid \ # --enable-obex \ %make %install rm -rf %buildroot %makeinstall_std # Remove the cups backend from libdir, and install it in /usr/lib whatever the install %ifarch x86_64 if test -d %{buildroot}%{_libdir}/cups ; then install -D -m0755 %{buildroot}%{_libdir}/cups/backend/bluetooth %{buildroot}/usr/lib/cups/backend/bluetooth rm -rf %{buildroot}%{_libdir}/cups fi %endif mkdir -p %{buildroot}/%{_datadir}/dbus-1/system-services install -m 0644 src/org.bluez.service \ %{buildroot}/%{_datadir}/dbus-1/system-services/org.bluez.service ln -fs %{_libexecdir}/bluetooth/bluetoothd %{buildroot}/%{_bindir}/bluetoothd ln -fs %{_libexecdir}/bluetooth/obexd %{buildroot}/%{_bindir}/obexd # install udev rules while we still use udev install -D -p -m0644 tools/hid2hci.rules \ %{buildroot}/lib/udev/rules.d/97-hid2hci.rules install -m 0644 %{SOURCE1} %{buildroot}/lib/udev/rules.d/97-bluetooth.rules #install more config files install -d -m 755 %{buildroot}%{_sysconfdir}/bluetooth echo "1234" > %{buildroot}%{_sysconfdir}/bluetooth/pin chmod 600 %{buildroot}%{_sysconfdir}/bluetooth/pin install -m 644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/ install -m 644 profiles/input/input.conf %{buildroot}%{_sysconfdir}/bluetooth/ install -m 644 profiles/proximity/proximity.conf %{buildroot}%{_sysconfdir}/bluetooth/ # remove unpackaged files find %{buildroot} -name '*.la' -delete install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth %changelog * Mon Mar 27 2017 onkelho 5.44-2pclos2017 - update --gited--99 min. tools: Add hw_variant for Intel Bluetooth 9160/9260 * Wed Mar 22 2017 onkelho 5.44-1pclos2017 - update --rebuild * Thu Feb 23 2017 bb 5.43-2pclos2017 - rebuild for new ical libs * Sun Nov 13 2016 bb 5.43-1pclos2016 - update * Thu Jul 14 2016 bb 5.40-1pclos2016 - update * Sat Apr 02 2016 bb 5.37-1pclos2016 - import into pclos for KDE5 - fix udev rule for bluetoothd