2014-12-12 20:13:14 +10:00
|
|
|
%define major 3
|
|
|
|
%define libname %mklibname %{name} %{major}
|
|
|
|
%define devname %mklibname %{name} -d
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
Summary: Official Linux Bluetooth protocol stack
|
2014-12-12 20:13:14 +10:00
|
|
|
Name: bluez
|
2020-03-16 22:02:18 +03:00
|
|
|
Version: 5.54
|
|
|
|
Release: 1
|
2020-02-22 15:42:38 +03:00
|
|
|
Epoch: 1
|
2012-02-01 14:28:20 +04:00
|
|
|
License: GPLv2+
|
|
|
|
Group: Communications
|
2014-12-12 18:41:16 +04:00
|
|
|
Url: http://www.bluez.org/
|
2012-08-21 13:12:03 +04:00
|
|
|
Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
|
2020-03-12 00:34:24 +03:00
|
|
|
Source1: pand.conf
|
|
|
|
Source2: dund.conf
|
|
|
|
Source3: hidd.conf
|
|
|
|
Source4: rfcomm.conf
|
2018-07-11 13:48:05 +03:00
|
|
|
Source5: 97-bluetooth.rules
|
2012-08-21 13:12:03 +04:00
|
|
|
Source10: bluez-uinput.modules
|
2019-03-13 23:18:30 +03:00
|
|
|
# Revert this commit, it leads to huge delay on boot in Plasma 5
|
2020-03-12 00:34:24 +03:00
|
|
|
Patch0: bluez-5.36-systemd-conditional.patch
|
|
|
|
## Ubuntu patches
|
|
|
|
Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
|
|
|
|
# Non-upstream
|
|
|
|
Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
|
|
|
|
Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
|
|
|
|
Patch4: 0004-agent-Assert-possible-infinite-loop.patch
|
2012-02-01 14:28:20 +04:00
|
|
|
BuildRequires: bison
|
2014-12-12 20:13:14 +10:00
|
|
|
BuildRequires: flex
|
2014-06-16 11:23:03 +04:00
|
|
|
BuildRequires: cups-devel
|
2020-03-12 00:34:24 +03:00
|
|
|
BuildRequires: elfutils-devel
|
2014-12-12 20:13:14 +10:00
|
|
|
BuildRequires: readline-devel
|
2020-03-12 00:34:24 +03:00
|
|
|
BuildRequires: sbc-devel
|
|
|
|
BuildRequires: speexdsp-devel
|
|
|
|
BuildRequires: json-c-devel
|
|
|
|
BuildRequires: pkgconfig(alsa)
|
2012-08-21 13:12:03 +04:00
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
2014-12-12 20:13:14 +10:00
|
|
|
BuildRequires: pkgconfig(expat)
|
2014-06-16 11:23:03 +04:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
2012-08-21 13:12:03 +04:00
|
|
|
BuildRequires: pkgconfig(libcap-ng)
|
2014-12-12 20:13:14 +10:00
|
|
|
BuildRequires: pkgconfig(libical)
|
2012-08-21 13:12:03 +04:00
|
|
|
BuildRequires: pkgconfig(libusb)
|
2013-02-28 15:49:54 +04:00
|
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
2014-06-16 11:23:03 +04:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2014-12-12 20:13:14 +10:00
|
|
|
BuildRequires: pkgconfig(udev) >= 186
|
|
|
|
Requires(pre): rpm-helper
|
2014-06-16 11:23:03 +04:00
|
|
|
Obsoletes: bluez-alsa < 5.0
|
|
|
|
Obsoletes: bluez-gstreamer < 5.0
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
These are the official Bluetooth communication libraries for Linux.
|
|
|
|
|
|
|
|
%files
|
2012-08-21 13:12:03 +04:00
|
|
|
%{_bindir}/ciptool
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_bindir}/bccmd
|
2015-11-18 02:01:01 +10:00
|
|
|
%{_bindir}/bluemoon
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_bindir}/bluetoothctl
|
2016-09-05 03:19:26 +10:00
|
|
|
%{_bindir}/btattach
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_bindir}/btmon
|
|
|
|
%{_bindir}/hciattach
|
|
|
|
%{_bindir}/hciconfig
|
|
|
|
%{_bindir}/hcidump
|
2015-11-18 02:01:01 +10:00
|
|
|
%{_bindir}/hcitool
|
|
|
|
%{_bindir}/hex2hcd
|
|
|
|
%{_bindir}/l2ping
|
|
|
|
%{_bindir}/mpris-proxy
|
|
|
|
%{_bindir}/rfcomm
|
|
|
|
%{_bindir}/sdptool
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_libexecdir}/bluetooth/bluetoothd
|
|
|
|
%{_libexecdir}/bluetooth/obexd
|
|
|
|
%{_unitdir}/bluetooth.service
|
|
|
|
%{_unitdir}/dbus-org.bluez.service
|
|
|
|
%{_userunitdir}/obex.service
|
2020-03-12 00:34:24 +03:00
|
|
|
%{_mandir}/man1/bccmd.1*
|
|
|
|
%{_mandir}/man1/btattach.1*
|
|
|
|
%{_mandir}/man1/ciptool.1*
|
|
|
|
%{_mandir}/man1/hciattach.1*
|
|
|
|
%{_mandir}/man1/hciconfig.1*
|
|
|
|
%{_mandir}/man1/hcitool.1*
|
|
|
|
%{_mandir}/man1/hcidump.1*
|
|
|
|
%{_mandir}/man1/l2ping.1*
|
|
|
|
%{_mandir}/man1/rctest.1*
|
|
|
|
%{_mandir}/man1/rfcomm.1*
|
|
|
|
%{_mandir}/man1/sdptool.1*
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_mandir}/man8/*
|
2012-02-01 14:28:20 +04:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/*
|
|
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/*.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/bluetooth
|
|
|
|
%{_datadir}/dbus-1/system-services/org.bluez.service
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_datadir}/dbus-1/services/org.bluez.obex.service
|
2020-03-16 22:02:18 +03:00
|
|
|
%{_datadir}/zsh/site-functions/_bluetoothctl
|
2012-02-01 14:28:20 +04:00
|
|
|
%{_localstatedir}/lib/bluetooth
|
2014-06-16 11:23:03 +04:00
|
|
|
%dir %{_libdir}/bluetooth
|
|
|
|
%dir %{_libdir}/bluetooth/plugins
|
|
|
|
%{_libdir}/bluetooth/plugins/sixaxis.so
|
2018-07-11 13:48:05 +03:00
|
|
|
%{_udevrulesdir}/97-bluetooth.rules
|
2014-06-16 11:23:03 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%post
|
|
|
|
%_post_service bluetooth
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%_preun_service bluetooth
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
#----------------------------------------------------------------------------
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%package cups
|
2012-08-21 13:12:03 +04:00
|
|
|
Summary: CUPS printer backend for Bluetooth printers
|
|
|
|
Group: System/Servers
|
|
|
|
Requires: cups
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%description cups
|
2012-02-01 14:28:20 +04:00
|
|
|
This package contains the CUPS backend for Bluetooth printers.
|
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%files cups
|
2020-03-12 00:34:24 +03:00
|
|
|
%{_libdir}/cups/backend/bluetooth
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
#----------------------------------------------------------------------------
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%package -n %{libname}
|
2014-06-16 11:23:03 +04:00
|
|
|
Summary: Official Linux Bluetooth protocol stack
|
|
|
|
Group: System/Libraries
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%description -n %{libname}
|
2014-06-16 11:23:03 +04:00
|
|
|
These are the official Bluetooth communication libraries for Linux.
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
%files -n %{libname}
|
2020-03-12 00:34:24 +03:00
|
|
|
%{_libdir}/libbluetooth.so.%{major}*
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{devname}
|
|
|
|
Summary: Headers for developing programs that will use %{name}
|
|
|
|
Group: Development/C++
|
|
|
|
Requires: %{libname} = %{EVRD}
|
|
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
|
|
|
|
%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
|
|
|
|
%dir %{_includedir}/bluetooth
|
|
|
|
%{_includedir}/bluetooth/*.h
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/bluez.pc
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package hid2hci
|
2014-06-16 11:23:03 +04:00
|
|
|
Summary: Put HID proxying bluetooth HCI's into HCI mode
|
|
|
|
Group: Communications
|
2015-11-18 01:40:00 +10:00
|
|
|
Requires(post): udev
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%description hid2hci
|
2014-06-16 11:23:03 +04:00
|
|
|
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.
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
The bluez-hid2hci package contains the hid2hci utility and udev rules to
|
|
|
|
automatically switch supported Bluetooth devices into regular HCI mode.
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
Install this package if you want to use the bluetooth function of the HCI
|
|
|
|
with other bluetooth devices like for example a mobile phone.
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
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.
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%files hid2hci
|
2014-06-16 11:23:03 +04:00
|
|
|
/lib/udev/hid2hci
|
|
|
|
%{_mandir}/man1/hid2hci.1*
|
|
|
|
/lib/udev/rules.d/97-hid2hci.rules
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
%post hid2hci
|
|
|
|
%{_bindir}/udevadm trigger --subsystem-match=usb
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
#----------------------------------------------------------------------------
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%package test
|
2012-08-21 13:12:03 +04:00
|
|
|
Summary: Tools for testing of various Bluetooth-functions
|
|
|
|
Group: System/Servers
|
|
|
|
Requires: python-dbus
|
|
|
|
Requires: python-gobject
|
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%description test
|
2012-08-21 13:12:03 +04:00
|
|
|
Contains a few tools for testing various bluetooth functions. The
|
|
|
|
BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
|
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
%files test
|
2012-08-21 13:12:03 +04:00
|
|
|
%{_bindir}/simple-agent
|
2014-06-16 11:23:03 +04:00
|
|
|
%{_bindir}/l2test
|
|
|
|
%{_bindir}/rctest
|
2012-08-21 13:12:03 +04:00
|
|
|
%{_bindir}/test-*
|
|
|
|
|
2014-12-12 20:13:14 +10:00
|
|
|
#----------------------------------------------------------------------------
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
%prep
|
2012-08-21 13:12:03 +04:00
|
|
|
%setup -q
|
2020-03-09 19:07:21 +03:00
|
|
|
%patch0 -p1 -R
|
2018-04-02 17:19:22 +03:00
|
|
|
%patch1 -p1
|
2015-11-20 00:35:44 +10:00
|
|
|
%patch2 -p1
|
2019-03-13 23:18:30 +03:00
|
|
|
%patch3 -p1
|
2020-03-12 00:34:24 +03:00
|
|
|
%patch4 -p1
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2020-03-12 00:34:24 +03:00
|
|
|
libtoolize -f -c
|
|
|
|
autoreconf -fi
|
|
|
|
|
2012-02-01 14:28:20 +04:00
|
|
|
%build
|
2020-02-22 15:42:38 +03:00
|
|
|
%configure2_5x \
|
|
|
|
--with-systemdsystemunitdir=%{_unitdir} \
|
|
|
|
--with-systemduserunitdir=%{_userunitdir} \
|
|
|
|
--with-udevdir=/lib/udev \
|
2014-06-16 11:23:03 +04:00
|
|
|
--enable-usb \
|
2019-01-18 16:20:13 +03:00
|
|
|
--enable-tools \
|
2020-02-22 15:42:38 +03:00
|
|
|
--enable-cups \
|
|
|
|
--enable-datafiles \
|
|
|
|
--enable-debug \
|
|
|
|
--enable-library \
|
2014-06-16 11:23:03 +04:00
|
|
|
--enable-monitor \
|
2020-02-22 15:42:38 +03:00
|
|
|
--enable-udev \
|
2014-06-16 11:23:03 +04:00
|
|
|
--enable-obex \
|
|
|
|
--enable-client \
|
|
|
|
--enable-systemd \
|
2020-02-22 15:42:38 +03:00
|
|
|
--enable-threads \
|
|
|
|
--enable-sixaxis \
|
2017-02-16 22:30:51 +10:00
|
|
|
--enable-experimental \
|
2020-02-22 15:42:38 +03:00
|
|
|
--enable-deprecated \
|
|
|
|
--enable-testing \
|
|
|
|
--enable-phonebook-ebook
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2020-01-13 14:30:31 +03:00
|
|
|
%make
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
%install
|
2020-01-13 14:30:31 +03:00
|
|
|
%makeinstall_std rulesdir=%{_sysconfdir}/udev/rules.d udevdir=/lib/udev
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/bluetooth
|
|
|
|
echo "1234" > %{buildroot}%{_sysconfdir}/bluetooth/pin
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
chmod 600 %{buildroot}%{_sysconfdir}/bluetooth/pin
|
|
|
|
|
2020-03-12 00:34:24 +03:00
|
|
|
install -m644 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/sysconfig/pand
|
|
|
|
install -m644 %{SOURCE2} -D %{buildroot}%{_sysconfdir}/sysconfig/dund
|
|
|
|
install -m644 %{SOURCE3} -D %{buildroot}%{_sysconfdir}/sysconfig/hidd
|
|
|
|
install -m644 %{SOURCE4} -D %{buildroot}%{_sysconfdir}/sysconfig/rfcomm
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
cp test/test-* %{buildroot}%{_bindir}
|
|
|
|
cp test/simple-agent %{buildroot}%{_bindir}/simple-agent
|
|
|
|
|
2014-06-16 11:23:03 +04:00
|
|
|
rm %{buildroot}%{_sysconfdir}/udev/rules.d/*.rules
|
|
|
|
install -p -m644 tools/hid2hci.rules -D %{buildroot}/lib/udev/rules.d/97-hid2hci.rules
|
2018-07-11 13:48:05 +03:00
|
|
|
install -m644 %{SOURCE5} -D %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
|
|
|
|
sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_udevrulesdir}/97-bluetooth.rules
|
2020-03-16 22:02:18 +03:00
|
|
|
sed s,"/bin/false","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
|
|
|
|
sed s,"@libexecdir@","%{_libexecdir}/bluetooth",g -i %{buildroot}%{_datadir}/dbus-1/services/org.bluez.obex.service
|
2012-02-01 14:28:20 +04:00
|
|
|
|
|
|
|
#install more config files
|
2014-06-16 11:23:03 +04:00
|
|
|
install -m0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/
|
|
|
|
install -m0644 src/main.conf %{buildroot}%{_sysconfdir}/bluetooth/
|
|
|
|
install -m0644 profiles/input/input.conf %{buildroot}%{_sysconfdir}/bluetooth/
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2012-08-21 13:12:03 +04:00
|
|
|
install -d -m0755 %{buildroot}%{_localstatedir}/lib/bluetooth
|
2012-02-01 14:28:20 +04:00
|
|
|
|
2013-02-28 15:49:54 +04:00
|
|
|
ln -s bluetooth.service %{buildroot}%{_unitdir}/dbus-org.bluez.service
|
2020-03-09 19:10:05 +03:00
|
|
|
|
|
|
|
sed 's|#AutoEnable=false|AutoEnable=true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf
|
2020-03-12 00:34:24 +03:00
|
|
|
|