]> git.pld-linux.org Git - packages/bluez.git/blobdiff - bluez.spec
up to 5.57
[packages/bluez.git] / bluez.spec
index 466ec2a81ba6819916ba46c34631c7943b81649e..b0db276a0a90e833ae36825f005261a05a8d6e84 100644 (file)
@@ -1,48 +1,75 @@
+# TODO:
+# - verify/update bluetooth init script
+# - separate obex?
+#
+# Conditional build:
+%bcond_without deprecated      # deprecated tools (ciptool,hciattach,hciconfig,hcidump,hcitool,rfcomm,sdptool)
+#
 Summary:       Bluetooth utilities
 Summary(pl.UTF-8):     Narzędzia Bluetooth
 Name:          bluez
-Version:       4.96
-Release:       3
+Version:       5.57
+Release:       1
 License:       GPL v2+
 Group:         Applications/System
-#Source0Download: http://www.bluez.org/download.html
-Source0:       http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.bz2
-# Source0-md5: 255c3dda8b93210ab0dcf8d04ddaf69f
+Source0:       https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
+# Source0-md5: c49e0f1c31f370385d2b0e582d468e2a
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
-Source3:       dund.init
-Source4:       pand.init
-Source5:       rfcomm.init
-Patch0:                %{name}-etc_dir.patch
-Patch1:                %{name}-wacom-mode-2.patch
-Patch2:                %{name}-systemd.patch
+# Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs
+# as found on some Atom based x86 hardware
+Source3:       69-btattach-bcm.rules
+Source4:       btattach-bcm@.service
+Source5:       btattach-bcm-service.sh
+Patch0:                0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
 URL:           http://www.bluez.org/
-BuildRequires: alsa-lib-devel >= 1.0.10-1
+BuildRequires: alsa-lib-devel >= 1.0
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
-BuildRequires: bison
-BuildRequires: dbus-devel >= 1.0
-BuildRequires: glib2-devel >= 1:2.16
-BuildRequires: gstreamer-devel >= 0.10.30
-BuildRequires: gstreamer-plugins-base-devel >= 0.10
-BuildRequires: libcap-ng-devel
-BuildRequires: libsndfile-devel
+BuildRequires: check-devel >= 0.9.6
+BuildRequires: cups-devel
+BuildRequires: dbus-devel >= 1.6
+BuildRequires: ell-devel >= 0.39
+BuildRequires: glib2-devel >= 1:2.28
+BuildRequires: json-c-devel >= 0.13
+BuildRequires: libical-devel
 BuildRequires: libtool
-BuildRequires: libusb-compat-devel
 BuildRequires: pkgconfig >= 1:0.9.0
 BuildRequires: readline-devel
-BuildRequires: rpmbuild(macros) >= 1.623
-BuildRequires: udev-devel
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
-Requires:      glib2 >= 1:2.16
+BuildRequires: rpmbuild(macros) >= 1.682
+BuildRequires: systemd-devel
+BuildRequires: tar >= 1:1.22
+BuildRequires: udev-devel >= 1:172
+BuildRequires: xz
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      dbus-libs >= 1.6
+Requires:      ell >= 0.39
+Requires:      glib2 >= 1:2.28
 Requires:      hwdata >= 0.225
+Requires:      json-c >= 0.13
 Requires:      rc-scripts
-Provides:      bluez-utils = %{epoch}:%{version}-%{release}
+Requires:      systemd-units >= 38
+Requires:      udev >= 1:172
+Provides:      bluez-hcidump = %{version}
+Provides:      bluez-utils = %{version}-%{release}
+Provides:      obexd = %{version}
+Provides:      dbus(org.openobex.client)
+Provides:      obex-data-server = %{version}
+# moved somewhere or dropped?
+#Obsoletes:    alsa-plugins-bluetooth
+Obsoletes:     bluez-hcidump
 Obsoletes:     bluez-hciemu
 Obsoletes:     bluez-pan
 Obsoletes:     bluez-sdp
+Obsoletes:     bluez-systemd
 Obsoletes:     bluez-utils
 Obsoletes:     bluez-utils-init
+Obsoletes:     obexd
+Obsoletes:     obex-data-server
+# moved somewhere or dropped?
+#Obsoletes:    gstreamer-bluetooth < 4.101-3
+#Obsoletes:    gstreamer0.10-bluetooth < 5
 Conflicts:     bluez-bluefw
 ExcludeArch:   s390 s390x
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -54,54 +81,32 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 Bluetooth utilities:
  - bluetoothd
- - dund
- - hcitool
  - hciattach
  - hciconfig
- - hciemu
- - hidd
+ - hcidump
+ - hcitool
  - l2ping
- - pand
  - start scripts (PLD)
- - PCMCIA configuration files
 
 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
 
 %description -l pl.UTF-8
 Narzędzia Bluetooth:
  - bluetoothd
- - dund
- - hcitool
  - hciattach
  - hciconfig
- - hciemu
- - hidd
+ - hcidump
+ - hcitool
  - l2ping
- - pand
  - skrypty startowe (PLD)
- - pliki konfiguracji PCMCIA
 
 Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
 
-%package -n alsa-plugins-bluetooth
-Summary:       ALSA plugins for Bluetooth audio devices
-Summary(pl.UTF-8):     Wtyczki systemu ALSA dla urządzeń dźwiękowych Bluetooth
-Group:         Libraries
-# bluetoothd + audio service
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      alsa-lib >= 1.0.10-1
-
-%description -n alsa-plugins-bluetooth
-ALSA plugins for Bluetooth audio devices.
-
-%description -n alsa-plugins-bluetooth -l pl.UTF-8
-Wtyczki systemu ALSA dla urządzeń dźwiękowych Bluetooth.
-
 %package -n cups-backend-bluetooth
 Summary:       Bluetooth backend for CUPS
 Summary(pl.UTF-8):     Backend Bluetooth dla CUPS-a
 Group:         Applications/Printing
-Requires:      bluez-libs >= %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 Requires:      cups
 
 %description -n cups-backend-bluetooth
@@ -110,24 +115,24 @@ Bluetooth backend for CUPS.
 %description -n cups-backend-bluetooth -l pl.UTF-8
 Backend Bluetooth dla CUPS-a.
 
-%package -n gstreamer-bluetooth
-Summary:       Bluetooth support for gstreamer
-Summary(pl.UTF-8):     Obsługa Bluetooth dla gstreamera
-Group:         Libraries
-Requires:      bluez-libs >= %{epoch}:%{version}-%{release}
-Requires:      gstreamer >= 0.10.30
-Requires:      gstreamer-plugins-base >= 0.10
+%package -n zsh-completion-bluez
+Summary:       Zsh completion for bluez commands
+Summary(pl.UTF-8):     Dopełnianie parametrów w zsh dla poleceń z pakietu bluez
+Group:         Applications/Shells
+Requires:      %{name} = %{version}-%{release}
+Requires:      zsh
 
-%description -n gstreamer-bluetooth
-Bluetooth support for gstreamer.
+%description -n zsh-completion-bluez
+Zsh completion for bluez commands (bluezctl utility).
 
-%description -n gstreamer-bluetooth -l pl.UTF-8
-Obsługa Bluetooth dla gstreamera.
+%description -n zsh-completion-bluez -l pl.UTF-8
+Dopełnianie parametrów w zsh dla poleceń z pakietu bluez (narzędzia
+bluezctl).
 
 %package libs
 Summary:       Bluetooth libraries
 Summary(pl.UTF-8):     Biblioteki Bluetooth
-Group:         Development/Libraries
+Group:         Libraries
 Obsoletes:     bluez-sdp
 
 %description libs
@@ -144,7 +149,7 @@ Znaki towarowe BLUETOOTH są własnością Bluetooth SIG, Inc. z USA.
 Summary:       Header files for Bluetooth applications
 Summary(pl.UTF-8):     Pliki nagłówkowe dla aplikacji Bluetooth
 Group:         Development/Libraries
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 Obsoletes:     bluez-sdp-devel
 
 %description libs-devel
@@ -159,7 +164,7 @@ Bluetooth.
 Summary:       Static Bluetooth libraries
 Summary(pl.UTF-8):     Biblioteki statyczne Bluetooth
 Group:         Development/Libraries
-Requires:      %{name}-libs-devel = %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs-devel = %{version}-%{release}
 Obsoletes:     bluez-sdp-static
 
 %description libs-static
@@ -170,19 +175,12 @@ Bluetooth applications.
 Ten pakiet zawiera biblioteki statyczne, których można używać do
 aplikacji Bluetooth.
 
-%package systemd
-Summary:       systemd units for bluez
-Group:         Base
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-
-%description systemd
-systemd units for bluez.
-
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
+
+# external ell is broken if ell/ell.h is in place due to deps generation and Makefile.am rules
+%{__rm} -r ell
 
 %build
 %{__libtoolize}
@@ -191,43 +189,34 @@ systemd units for bluez.
 %{__autoheader}
 %{__automake}
 %configure \
-       --with-ouifile=%{_datadir}/hwdata/oui.txt \
-       --with-systemdsystemunitdir=%{systemdunitdir} \
        --disable-silent-rules \
-       --enable-shared \
-       --enable-static \
-       --enable-alsa \
-       --enable-audio \
-       --enable-bccmd \
-       --enable-capng \
-       --enable-configfiles \
-       --enable-cups \
-       --enable-dbusoob \
-       --enable-dfutool \
-       --enable-dund \
-       --enable-gstreamer \
+       --enable-btpclient \
+       %{?with_deprecated:--enable-deprecated} \
+       --enable-experimental \
+       --enable-external-ell \
        --enable-health \
        --enable-hid2hci \
-       --enable-hidd \
-       --enable-input \
-       --enable-network \
-       --enable-pand \
-       --enable-pcmcia \
-       --enable-pnat \
-       --enable-serial \
+       --enable-library \
        --enable-tools \
-       --enable-usb \
-       --enable-udevrules \
-       --enable-wiimote
+       --enable-cups \
+       --enable-testing \
+       --enable-mesh \
+       --enable-midi \
+       --enable-nfc \
+       --enable-sap \
+       --enable-sixaxis \
+       --enable-static \
+       --with-udevdir=%{udevdir} \
+       --with-systemdsystemunitdir=%{systemdunitdir} \
+       --with-systemduserunitdir=%{systemduserunitdir}
 
 %{__make} \
-       cupsdir=%{cupsdir} \
-       rulesdir=%{udevdir}/rules.d \
-       udevdir=%{udevdir}
+       cupsdir=%{cupsdir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
+       $RPM_BUILD_ROOT{%{_libdir}/{bluetooth,obex}/plugins,%{_sysconfdir}/bluetooth}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -237,116 +226,124 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/dund
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/pand
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/rfcomm
 
-install audio/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-install input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-install network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
-install serial/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
+install profiles/input/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
+install profiles/network/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/bluetooth
 
-mv -fT $RPM_BUILD_ROOT{%{_datadir},%{_sysconfdir}}/alsa
+#serial port connected Broadcom HCIs scripts
+install %{SOURCE3} $RPM_BUILD_ROOT%{udevdir}/rules.d
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}
+install %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/{alsa-lib/*.{la,a},gstreamer*/libgstbluetooth.{la,a},libbluetooth.la}
+# Install the HCI emulator, useful for testing
+install emulator/btvirt $RPM_BUILD_ROOT%{_libexecdir}/bluetooth
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbluetooth.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/bluetooth/plugins/*.{la,a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add bluetooth
-/sbin/chkconfig --add dund
-/sbin/chkconfig --add pand
-/sbin/chkconfig --add rfcomm
 %service bluetooth restart
-%service dund restart
-%service pand restart
-%service rfcomm restart
+%systemd_post bluetooth.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service bluetooth stop
-       %service dund stop
-       %service pand stop
-       %service rfcomm stop
        /sbin/chkconfig --del bluetooth
-       /sbin/chkconfig --del dund
-       /sbin/chkconfig --del pand
-       /sbin/chkconfig --del rfcomm
 fi
+%systemd_preun bluetooth.service
 
-%post   libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
+%postun
+%systemd_reload
 
-%post systemd
-%systemd_post
+%triggerpostun -- bluez < 4.98-3
+%systemd_trigger bluetooth.service
 
-%preun systemd
-%systemd_preun bluetooth.service
+%triggerpostun -- bluez < 5.13-1
+%service rfcomm stop
+/sbin/chkconfig --del rfcomm
 
-%postun systemd
-%systemd_postun bluetooth.service
+%post   libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README
+%attr(755,root,root) %{_bindir}/bluemoon
+%attr(755,root,root) %{_bindir}/bluetoothctl
+%attr(755,root,root) %{_bindir}/btattach
+%attr(755,root,root) %{_bindir}/btmon
+%attr(755,root,root) %{_bindir}/hex2hcd
+%attr(755,root,root) %{_bindir}/l2ping
+%attr(755,root,root) %{_bindir}/l2test
+%attr(755,root,root) %{_bindir}/mesh-cfgclient
+%attr(755,root,root) %{_bindir}/meshctl
+%attr(755,root,root) %{_bindir}/mpris-proxy
+%attr(755,root,root) %{_bindir}/rctest
+%if %{with deprecated}
 %attr(755,root,root) %{_bindir}/ciptool
-%attr(755,root,root) %{_bindir}/dfutool
-%attr(755,root,root) %{_bindir}/dund
-%attr(755,root,root) %{_bindir}/gatttool
+%attr(755,root,root) %{_bindir}/hciattach
+%attr(755,root,root) %{_bindir}/hciconfig
+%attr(755,root,root) %{_bindir}/hcidump
 %attr(755,root,root) %{_bindir}/hcitool
-%attr(755,root,root) %{_bindir}/hidd
-%attr(755,root,root) %{_bindir}/l2ping
-%attr(755,root,root) %{_bindir}/pand
 %attr(755,root,root) %{_bindir}/rfcomm
 %attr(755,root,root) %{_bindir}/sdptool
-%attr(755,root,root) %{_sbindir}/bccmd
-%attr(755,root,root) %{_sbindir}/bluetoothd
-%attr(755,root,root) %{_sbindir}/hciattach
-%attr(755,root,root) %{_sbindir}/hciconfig
+%endif
+%if "%{_libexecdir}" != "%{_libdir}"
+%dir %{_libexecdir}/bluetooth
+%endif
+%attr(755,root,root) %{_libexecdir}/bluetooth/bluetooth-meshd
+%attr(755,root,root) %{_libexecdir}/bluetooth/bluetoothd
+%attr(755,root,root) %{_libexecdir}/bluetooth/btattach-bcm-service.sh
+%attr(755,root,root) %{_libexecdir}/bluetooth/btvirt
+%attr(755,root,root) %{_libexecdir}/bluetooth/obexd
 %dir %{_libdir}/bluetooth
 %dir %{_libdir}/bluetooth/plugins
+%attr(755,root,root) %{_libdir}/bluetooth/plugins/sixaxis.so
+%dir %{_libdir}/obex
+%dir %{_libdir}/obex/plugins
 %dir %{_sysconfdir}/bluetooth
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/*.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/input.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/network.conf
 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
-%attr(754,root,root) /etc/rc.d/init.d/dund
-%attr(754,root,root) /etc/rc.d/init.d/pand
-%attr(754,root,root) /etc/rc.d/init.d/rfcomm
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth.conf
-%attr(755,root,root) %{udevdir}/bluetooth_serial
+%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/bluetooth-mesh.conf
+%{systemdunitdir}/bluetooth.service
+%{systemdunitdir}/bluetooth-mesh.service
+%{systemdunitdir}/btattach-bcm@.service
+%{systemduserunitdir}/obex.service
+%{_datadir}/dbus-1/services/org.bluez.obex.service
+%{_datadir}/dbus-1/system-services/org.bluez.service
+%{_datadir}/dbus-1/system-services/org.bluez.mesh.service
 %attr(755,root,root) %{udevdir}/hid2hci
-%{udevdir}/rules.d/97-bluetooth.rules
-%{udevdir}/rules.d/97-bluetooth-hid2hci.rules
-%{udevdir}/rules.d/97-bluetooth-serial.rules
+%{udevdir}/rules.d/69-btattach-bcm.rules
+%{udevdir}/rules.d/97-hid2hci.rules
+%{_mandir}/man1/btattach.1*
+%{_mandir}/man1/hid2hci.1*
+%{_mandir}/man1/l2ping.1*
+%{_mandir}/man1/rctest.1*
+%if %{with deprecated}
 %{_mandir}/man1/ciptool.1*
-%{_mandir}/man1/dfutool.1*
-%{_mandir}/man1/dund.1*
+%{_mandir}/man1/hciattach.1*
+%{_mandir}/man1/hciconfig.1*
+%{_mandir}/man1/hcidump.1*
 %{_mandir}/man1/hcitool.1*
-%{_mandir}/man1/hidd.1*
-%{_mandir}/man1/pand.1*
 %{_mandir}/man1/rfcomm.1*
 %{_mandir}/man1/sdptool.1*
-%{_mandir}/man8/bccmd.8*
+%endif
 %{_mandir}/man8/bluetoothd.8*
-%{_mandir}/man8/hciattach.8*
-%{_mandir}/man8/hciconfig.8*
-%{_mandir}/man8/hid2hci.8*
-%{_mandir}/man8/l2ping.8*
-
-%files -n alsa-plugins-bluetooth
-%defattr(644,root,root,755)
-%{_sysconfdir}/alsa/bluetooth.conf
-%attr(755,root,root) %{_libdir}/alsa-lib/libasound_module_ctl_bluetooth.so
-%attr(755,root,root) %{_libdir}/alsa-lib/libasound_module_pcm_bluetooth.so
 
 %files -n cups-backend-bluetooth
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
 
-%files -n gstreamer-bluetooth
+%files -n zsh-completion-bluez
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/gstreamer*/libgstbluetooth.so
+%{zsh_compdir}/_bluetoothctl
 
 %files libs
 %defattr(644,root,root,755)
@@ -362,8 +359,3 @@ fi
 %files libs-static
 %defattr(644,root,root,755)
 %{_libdir}/libbluetooth.a
-
-%files systemd
-%defattr(644,root,root,755)
-%{systemdunitdir}/bluetooth.service
-%{_datadir}/dbus-1/system-services/org.bluez.service
This page took 0.059114 seconds and 4 git commands to generate.