diff --git a/bluez.spec b/bluez.spec index 7ac6dc13266ad82e8e7e3c44b7f9151a2d235dfa..dbb098af036c12b40fe7f0053cf68a03c936f3b6 100644 --- a/bluez.spec +++ b/bluez.spec @@ -1,5 +1,4 @@ -%define anolis_release 1 - +%define anolis_release 2 %bcond_with deprecated Name: bluez @@ -8,23 +7,11 @@ Release: %{anolis_release}%{?dist} Summary: Bluetooth utilities License: GPLv2+ URL: http://www.bluez.org/ - Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz -BuildRequires: dbus-devel >= 1.6 -BuildRequires: glib2-devel -BuildRequires: libell-devel >= 0.37 -BuildRequires: libical-devel -BuildRequires: make -BuildRequires: readline-devel -# For bluetooth mesh -BuildRequires: json-c-devel -# For cable pairing -BuildRequires: systemd-devel -# For printing -BuildRequires: cups-devel -# For man pages -BuildRequires: python3-docutils +BuildRequires: make python3-docutils +BuildRequires: systemd-devel dbus-devel >= 1.6 glib2-devel libell-devel >= 0.37 +BuildRequires: libical-devel readline-devel json-c-devel cups-devel Requires: dbus >= 1.6 Requires(post): systemd @@ -49,16 +36,16 @@ The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. %package cups Summary: CUPS printer backend for Bluetooth printers -Requires: bluez = %{version}-%{release} +Requires: bluez = %{EVR} Requires: cups %description cups -This package contains the CUPS backend +This package provides the CUPS backend %if %{with deprecated} %package deprecated Summary: Deprecated Bluetooth applications -Requires: bluez = %{version}-%{release} +Requires: bluez = %{EVR} Obsoletes: bluez < 5.55 %description deprecated @@ -83,15 +70,15 @@ Libraries for use in Bluetooth applications. %package libs-devel Summary: Development libraries for Bluetooth applications -Requires: bluez-libs = %{version}-%{release} +Requires: bluez-libs = %{EVR} %description libs-devel -bluez-libs-devel contains development libraries and headers for +bluez-libs-devel provides development libraries and headers for use in Bluetooth applications. %package hid2hci Summary: Put HID proxying bluetooth HCI's into HCI mode -Requires: bluez = %{version}-%{release} +Requires: bluez = %{EVR} %description hid2hci Most allinone PC's and bluetooth keyboard / mouse sets which include a @@ -100,7 +87,7 @@ 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 +The bluez-hid2hci package provides 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 @@ -114,82 +101,77 @@ and mouse. %package mesh Summary: Bluetooth mesh -Requires: bluez = %{version}-%{release} -Requires: bluez-libs = %{version}-%{release} +Requires: bluez = %{EVR} +Requires: bluez-libs = %{EVR} %description mesh Services for bluetooth mesh %package obexd Summary: Object Exchange daemon for sharing content -Requires: bluez = %{version}-%{release} -Requires: bluez-libs = %{version}-%{release} +Requires: bluez = %{EVR} +Requires: bluez-libs = %{EVR} %description obexd Object Exchange daemon for sharing files, contacts etc over bluetooth %package doc Summary: Doc files for Bluetooth applications -Requires: bluez = %{version}-%{release} +Requires: bluez = %{EVR} BuildArch: noarch %description doc Doc files for Bluetooth applications %prep -%autosetup -p1 +%autosetup %build -%configure --enable-tools --enable-library --disable-optimization \ +%configure --enable-tools \ + --enable-library \ + --disable-optimization \ + --enable-sixaxis \ + --enable-cups \ + --enable-nfc \ + --enable-mesh \ + --enable-hid2hci \ + --enable-testing \ %if %{with deprecated} --enable-deprecated \ %endif - --enable-sixaxis --enable-cups --enable-nfc --enable-mesh \ - --enable-hid2hci --enable-testing \ --with-systemdsystemunitdir=%{_unitdir} \ --with-systemduserunitdir=%{_userunitdir} -%{make_build} +%make_build %install -%{make_install} +%make_install %if %{with deprecated} -# "make install" fails to install gatttool, necessary for Bluetooth Low Energy -# Red Hat Bugzilla bug #1141909, Debian bug #720486 -install -m0755 attrib/gatttool $RPM_BUILD_ROOT%{_bindir} +install -m0755 attrib/gatttool %{buildroot}%{_bindir} %endif -# "make install" fails to install avinfo -# Red Hat Bugzilla bug #1699680 -install -m0755 tools/avinfo $RPM_BUILD_ROOT%{_bindir} +install -m0755 tools/avinfo %{buildroot}%{_bindir} +install -m0755 tools/btmgmt %{buildroot}%{_bindir} -# btmgmt is not installed by "make install", but it is useful for debugging -# some issues and to set the MAC address on HCIs which don't have their -# MAC address configured -install -m0755 tools/btmgmt $RPM_BUILD_ROOT%{_bindir} - -# Remove the cups backend from libdir, and install it in /usr/lib whatever the install -if test -d ${RPM_BUILD_ROOT}/usr/lib64/cups ; then - install -D -m0755 ${RPM_BUILD_ROOT}/usr/lib64/cups/backend/bluetooth ${RPM_BUILD_ROOT}%_cups_serverbin/backend/bluetooth - rm -rf ${RPM_BUILD_ROOT}%{_libdir}/cups +if test -d %{buildroot}%{_libdir}/cups ; then + install -D -m0755 %{buildroot}%{_libdir}/cups/backend/bluetooth %{buildroot}%_cups_serverbin/backend/bluetooth + rm -rf %{buildroot}%{_libdir}/cups fi -rm -f ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/*.rules ${RPM_BUILD_ROOT}/usr/lib/udev/rules.d/*.rules -install -D -p -m0644 tools/hid2hci.rules ${RPM_BUILD_ROOT}/%{_udevrulesdir}/97-hid2hci.rules - -install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth -install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth/mesh +rm -f %{buildroot}/%{_sysconfdir}/udev/*.rules %{buildroot}%{_udevrulesdir}/*.rules +mkdir -p %{buildroot}/%{_udevrulesdir} +install -p -m0644 tools/hid2hci.rules %{buildroot}/%{_udevrulesdir}/97-hid2hci.rules +install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth +install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth/mesh -mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/ +mkdir -p %{buildroot}/%{_libdir}/bluetooth/ +mkdir -p %{buildroot}%{_sysconfdir}/bluetooth +install -p -m0644 src/main.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf +install -p -m0644 mesh/mesh-main.conf %{buildroot}%{_sysconfdir}/bluetooth/mesh-main.conf +sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' %{buildroot}/%{_sysconfdir}/bluetooth/main.conf -#copy bluetooth config file and setup auto enable -install -D -p -m0644 src/main.conf ${RPM_BUILD_ROOT}/etc/bluetooth/main.conf -install -D -p -m0644 mesh/mesh-main.conf ${RPM_BUILD_ROOT}/etc/bluetooth/mesh-main.conf -sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' ${RPM_BUILD_ROOT}/%{_sysconfdir}/bluetooth/main.conf - -# Install the HCI emulator, useful for testing -install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ +install emulator/btvirt %{buildroot}/%{_libexecdir}/bluetooth/ %check %make_build check @@ -219,7 +201,6 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %systemd_user_preun obex.service %files -%license COPYING %dir %{_sysconfdir}/bluetooth %config %{_sysconfdir}/bluetooth/main.conf %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf @@ -234,18 +215,21 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_bindir}/l2test %{_bindir}/mpris-proxy %{_bindir}/rctest -%{_mandir}/man1/btattach.1.* -%{_mandir}/man1/btmon.1.* -%{_mandir}/man1/l2ping.1.* -%{_mandir}/man1/rctest.1.* -%{_mandir}/man8/bluetoothd.8.* %dir %{_libexecdir}/bluetooth %{_libexecdir}/bluetooth/bluetoothd + %{_libdir}/bluetooth/ %{_localstatedir}/lib/bluetooth %{_datadir}/dbus-1/system-services/org.bluez.service -%{_unitdir}/bluetooth.service %{_datadir}/zsh/site-functions/_bluetoothctl +%{_unitdir}/bluetooth.service + +%{_mandir}/man1/btattach.1.* +%{_mandir}/man1/btmon.1.* +%{_mandir}/man1/l2ping.1.* +%{_mandir}/man1/rctest.1.* +%{_mandir}/man8/bluetoothd.8.* +%license COPYING %if %{with deprecated} %files deprecated @@ -268,11 +252,11 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %endif %files libs +%{_libdir}/libbluetooth.so.3 +%{_libdir}/libbluetooth.so.3.19.8 %license COPYING -%{_libdir}/libbluetooth.so.* %files libs-devel -%doc doc/*txt %{_bindir}/isotest %{_mandir}/man1/isotest.1.* %{_libdir}/libbluetooth.so @@ -280,14 +264,15 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_libdir}/pkgconfig/bluez.pc %dir %{_libexecdir}/bluetooth %{_libexecdir}/bluetooth/btvirt +%doc doc/*txt %files cups %_cups_serverbin/backend/bluetooth %files hid2hci -/usr/lib/udev/hid2hci -%{_mandir}/man1/hid2hci.1* +%{_prefix}/lib/udev/hid2hci %{_udevrulesdir}/97-hid2hci.rules +%{_mandir}/man1/hid2hci.1* %files mesh %config %{_sysconfdir}/bluetooth/mesh-main.conf @@ -306,9 +291,12 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_userunitdir}/obex.service %files doc -%doc AUTHORS ChangeLog +%doc ChangeLog AUTHORS %changelog +* Sat Apr 15 2023 Yuanhong Peng - 5.66-2 +- Refactor the specfile + * Thu Dec 29 2022 Funda Wang - 5.66-1 - New version 5.66