%bcond_with systemd %define _unpackaged_files_terminate_build 1 %if "0%{?_udevrulesdir}" == "0" %global _udevrulesdir /lib/udev/rules.d %endif Summary: Bluetooth utilities Summary(ja): Bluetooth ユーティリティ Name: bluez Version: 5.55 Release: 1%{?_dist_release}%{?with_systemd:.systemd} Group: system,admin-tools Vendor: Project Vine Distribution: Vine Linux Packager: daisuke License: GPLv2+ URL: http://www.bluez.org/ #---------------------------------------------------------------------------- Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz Source1: bluetooth.init.vine Source3: bluez-uinput.modules Source11: trusts.txt Source20: main.conf # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs Source22: 69-btattach-bcm.rules Source23: btattach-bcm@.service Source24: btattach-bcm-service.sh # from http://www.linuxfromscratch.org/patches/downloads/bluez/ Patch0: 0001-bluez-5.54-obexd_without_systemd-1.patch # https://github.com/hadess/bluez/commits/obex-5.46 Patch1: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch # https://github.com/hadess/bluez/commits/systemd-hardening Patch10: 0001-build-Always-define-confdir-and-statedir.patch Patch11: 0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch Patch12: 0003-systemd-Add-more-filesystem-lockdown.patch Patch13: 0004-systemd-More-lockdown.patch # Patch for Vine Patch100: 0002-bluez-5.54-daemon.patch Patch101: 0003-bluez-5.54-config-vine.patch #---------------------------------------------------------------------------- BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: flex BuildRequires: bison BuildRequires: dbus-devel BuildRequires: glib2-devel BuildRequires: readline-devel BuildRequires: libical-devel BuildRequires: json-c-devel %if %{with systemd} BuildRequires: systemd-devel %{?systemd_requires} %else BuildRequires: eudev-libudev-devel Requires(post): /sbin/chkconfig, /sbin/service Requires(preun): /sbin/chkconfig, /sbin/service Requires(postun): /sbin/service %endif ExcludeArch: s390 s390x Obsoletes: bluez-pan < 4.0, bluez-sdp < 4.0 Requires: initscripts, bluez-libs = %{version} Requires: dbus >= 0.60 # Requires: fuse ## Requires: hwdata >= 0.215 Requires: hwdata >= 0.146 #---------------------------------------------------------------------------- Obsoletes: bluez-utils < 4.5-2 Provides: bluez-utils = %{version}-%{release} Obsoletes: bluez-gstreamer < 5.0 Obsoletes: bluez-alsa < 5.0 #---------------------------------------------------------------------------- %description Utilities for use in Bluetooth applications: - hcitool - hciattach - hciconfig - bluetoothd - l2ping - start scripts VineLinux (RedHat base) - pcmcia configuration files Please, read %{_defaultdocdir}/%{name}-%{version}/trusts.txt The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A. %description -l ja Bluetooth ユーティリティ (bluez-utils): - hcitool - hciattach - hciconfig - l2ping - 起動スクリプト (Red Hat用をVineLinuxに合わせました) - pcmcia コンフィグレーション ファイル ※付属の%{_defaultdocdir}/%{name}-%{version}/trusts.txtもご覧下さい。 (BLUETOOTH は Bluetooth SIG, Inc.(USA)のトレードマークです) #---------------------------------------------------------------------------- %package libs Summary: Libraries for use in Bluetooth applications Summary(ja): BlueTooth アプリケーションの使用するライブラリ(BlueZ) Group: system %description libs Libraries for use in Bluetooth applications. %description libs -l ja Bluetooth アプリケーションのためのライブラリです。 ※BlueZ のユーティリティのためにも必要です #---------------------------------------------------------------------------- %package libs-devel Summary: Development libraries for Bluetooth applications Summary(ja): Bluetooth アプリケーション開発のためのdevelパッケージ Group: programming Requires: bluez-libs = %{version} Requires: pkgconfig Obsoletes: bluez-sdp-devel < 4.0 %description libs-devel bluez-libs-devel contains development libraries and headers for use in Bluetooth applications. %description libs-devel -l ja bluez-libs-devel パッケージは Bluetooth アプリケーション開発のための ライブラリやヘッダーファイルを提供します。 #---------------------------------------------------------------------------- %package cups Summary: CUPS printer backend for Bluetooth printers Summary(ja): Bluetooth 経由の CUPS プリンタシステム用 Group: servers Obsoletes: bluez-utils-cups < 4.5-2 Provides: bluez-utils-cups = %{version}-%{release} Requires: bluez-libs = %{version} Requires: cups %description cups This package contains the CUPS backend %description cups -l ja Bluetooth対応 プリンターを CUPS印刷システムから利用する ためのバックエンドです。 #---------------------------------------------------------------------------- %prep rm -rf $RPM_BUILD_ROOT %setup -q %if !%{with systemd} %patch0 -p1 %patch1 -p1 %else %patch1 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %endif %patch100 -p1 %patch101 -p1 %build %configure \ %if %{with systemd} --with-systemdsystemunitdir=%{_unitdir} \ --with-systemduserunitdir=%{_userunitdir} \ --enable-mesh \ %else --disable-systemd \ %endif --enable-library \ --enable-cups \ --enable-tools \ --enable-sixaxis \ --enable-nfc \ --enable-hid2hci \ --disable-android make %{?_smp_mflags} #---------------------------------------------------------------------------- %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} # Remove autocrap and libtool droppings find %{buildroot} -name '*.la' -exec rm -f {} \; mkdir -p %{buildroot}%{_sysconfdir}/bluetooth/ mkdir -p %{buildroot}%{_libdir}/bluetooth/ mkdir -p %{buildroot}%{_sbindir} install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth %if %{with systemd} install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth/mesh #serial port connected Broadcom HCIs scripts install -D -p -m0644 %{SOURCE22} %{buildroot}/%{_udevrulesdir}/ install -D -p -m0644 %{SOURCE23} %{buildroot}/%{_unitdir}/ install -D -p -m0755 %{SOURCE24} %{buildroot}/%{_libexecdir}/bluetooth/ %else install -D -m0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/bluetooth ln -s ../libexec/bluetooth/bluetoothd %{buildroot}%{_sbindir}/bluetoothd %endif #copy bluetooth config file and setup auto enable install -D -p -m0644 src/main.conf %{buildroot}/etc/bluetooth/main.conf install -D -p -m0644 mesh/mesh-main.conf %{buildroot}/etc/bluetooth/mesh-main.conf sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' %{buildroot}/%{_sysconfdir}/bluetooth/main.conf install -D -m0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/modules/bluez-uinput.modules #---------------------------------------------------------------------------- %clean rm -rf %{buildroot} #---------------------------------------------------------------------------- %post %if %{with systemd} %systemd_post bluetooth.service %systemd_user_post bluetooth-mesh.service %systemd_user_post obex.service /bin/udevadm trigger --subsystem-match=usb %else /sbin/chkconfig --add bluetooth /sbin/udevadm trigger --subsystem-match=usb %endif exit 0 %preun %if %{with systemd} %systemd_preun bluetooth.service %systemd_user_preun bluetooth-mesh.service %systemd_user_preun obex.service %else if [ "$1" = "0" -o -x /bin/systemctl ]; then /sbin/service bluetooth stop >/dev/null 2>&1 || : /sbin/chkconfig --del bluetooth fi exit 0 %endif %postun %if %{with systemd} %systemd_postun_with_restart bluetooth.service %else if [ "$1" -ge "0" ]; then /sbin/service bluetooth condrestart >/dev/null 2>&1 || : fi %endif %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig #---------------------------------------------------------------------------- %files %defattr(-, root, root) %license COPYING %doc AUTHORS INSTALL ChangeLog NEWS README %dir %{_sysconfdir}/bluetooth/ %config(noreplace) %{_sysconfdir}/bluetooth/* %{_sysconfdir}/dbus-1/system.d/bluetooth.conf %{_sysconfdir}/sysconfig/modules/bluez-uinput.modules %{_bindir}/* %{_libexecdir}/bluetooth/bluetoothd %{_libexecdir}/bluetooth/obexd %dir %{_libdir}/bluetooth %dir %{_libdir}/bluetooth/plugins %{_libdir}/bluetooth/plugins/sixaxis.so %{_mandir}/man1/* %{_mandir}/man8/* /lib/udev/hid2hci %{_udevrulesdir}/97-hid2hci.rules %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_bluetoothctl %dir %{_localstatedir}/lib/bluetooth %if %{with systemd} %{_unitdir}/bluetooth.service %{_unitdir}/btattach-bcm@.service %{_libexecdir}/bluetooth/btattach-bcm-service.sh %{_udevrulesdir}/69-btattach-bcm.rules %{_userunitdir}/obex.service %{_datadir}/dbus-1/system-services/org.bluez.service %{_datadir}/dbus-1/services/org.bluez.obex.service # mesh files %doc tools/mesh-gatt/*.json %config %{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf %{_datadir}/dbus-1/system-services/org.bluez.mesh.service %{_libexecdir}/bluetooth/bluetooth-meshd %{_unitdir}/bluetooth-mesh.service %dir %{_localstatedir}/lib/bluetooth/mesh %else %{_sysconfdir}/rc.d/init.d/bluetooth %{_sbindir}/bluetoothd %endif %files libs %defattr(-, root, root) %{_libdir}/libbluetooth.so.* %files libs-devel %defattr(-, root, root) %{_libdir}/libbluetooth.so %dir %{_includedir}/bluetooth %{_includedir}/bluetooth/* %{_libdir}/pkgconfig/bluez.pc %files cups %defattr(-, root, root) %{_libdir}/cups/backend/bluetooth %changelog * Thu Oct 22 2020 Tomohiro "Tomo-p" KATO 5.55-1 - updated to 5.55. - added systemd support (disabled as default). * Sun Mar 22 2020 Tomohiro "Tomo-p" KATO 5.54-1 - updated to 5.54. - updated all patches. * Sun Sep 01 2019 Tomohiro "Tomo-p" KATO 5.50-1 - updated to 5.50. * Fri Jan 26 2018 Tomohiro "Tomo-p" KATO 5.48-1 - updated to 5.48. * Sat Nov 07 2015 Yoji TOYODA 5.35-1 - update to 5.35 - remove %%{name}-gstreamer, %%{name}-alsa subpackages - add Patch0 (bluez-5.35-obexd_without_systemd-1.patch) - add Patch100 (bluez-5.35-daemon.patch) - add Patch101 (bluez-5.35-config-vine.patch) * Sat Jul 18 2015 Yoji TOYODA 4.101-5 - rebuild with readline-6.3 * Tue Jun 17 2014 Yoji TOYODA 4.101-4 - change BuildRequires: eudev-libudev-devel instead of libudev-devel * Sat Jan 04 2014 Yoji TOYODA 4.101-3 - rebuild with VineSeed environment * Thu Jul 11 2013 Daisuke SUZUKI 4.101-2 - build with sbc - add BR: sbc-devel * Sun Jun 24 2012 Yoji TOYODA 4.101-1 - new upstream release * Sun Mar 11 2012 Yoji TOYODA 4.99-1 - new upstream release * Thu Feb 23 2012 Yoji TOYODA 4.98-1 - new upstream release * Sun Dec 25 2011 Yoji TOYODA 4.97-1 - new upstream release - add BuildRequires: check-devel, readline-devel * Sun Aug 28 2011 Yoji TOYODA 4.96-1 - new upstream release - add BuildRequires: libudev-devel * Thu Feb 24 2011 Yoji TOYODA 4.89-1 - new upstream release * Sat Feb 05 2011 Yoji TOYODA 4.87-1 - new upstream release * Thu Dec 30 2010 Yoji TOYODA 4.84-1 - new upstream release * Sun Dec 26 2010 Yoji TOYODA 4.82-1 - new upstream release * Fri Dec 10 2010 Yoji TOYODA 4.81-1 - new upstream release * Tue Nov 16 2010 Yoji TOYODA 4.79-1 - new upstream release - drop Patch2 * Wed Nov 03 2010 Yoji TOYODA 4.77-1 - new upstream release - fix %files (change path of alsa/bluetooth.conf) * Thu Sep 23 2010 Yoji TOYODA 4.69-2 - rebuild with rpm-4.8.1 for pkg-config file * Mon Jul 19 2010 Yoji TOYODA 4.69-1 - new upstream release * Mon Jun 21 2010 Yoji TOYODA 4.66-1 - new upstream release * Sat May 01 2010 Yoji TOYODA 4.64-1 - new upstream release - drop Patch1, Patch5, Patch6 * Sun Jul 05 2009 Daisuke SUZUKI 4.42-2 - add bluetooth.init again. - on-demand startup on bootup process will fail, because D-BUS service is not started yet. * Sun Jun 28 2009 Daisuke SUZUKI 4.42-1 - new upstream release * Mon Jun 22 2009 Daisuke SUZUKI 4.41-2 - remove bluetooth.init - on-demand start/stop bluetoothd using udev - run hid2hci using udev - add missing files to %%files * Fri Jun 19 2009 Daisuke SUZUKI 4.41-1 - new upstream release - add udev rule - add upstream Patch[2-6] * Tue May 26 2009 Daisuke SUZUKI 4.37-1 - new upstream release * Fri Oct 24 2008 Seiichirou Babasaki 4.15-1 - Update to 4.15 - added # Maintainers: comments. - FedoraCore - LOGS -- 4.14-2 -- Add script to autoload uinput on startup, so the PS3 remote works out-of-the-box -- 4.14-1 - Update to 4.14 -- 4.13-3 -- Update udev rules (#246840) -- 4.13-2 -- Fix PS3 BD remote input event generation -- 4.13-1 - Update to 4.13 -- 4.12-1 - Update to 4.12 -- 4.11-1 - Update to 4.11 -- 4.10-1 - Update to 4.10 -- 4.9-1 - Update to 4.9 -- 4.8-1 - Update to 4.8 -- 4.7-1 - Update to 4.7 -- 4.6-4 -- Fix patch application -- 4.6-3 -- Add fuzz -- 4.6-2 -- Fix possible crasher on resume from suspend -- 4.6-1 - Update to 4.6 -- 4.5-4 -- SDP browse fixes -- 4.5-3 -- Bluez-alsa needs to provide/obsolete bluez-utils-alsa -- Use versioned Obsoletes: -- 4.5-2 -- Change main utils package name to 'bluez'; likewise its subpackages -- Remove references to obsolete initscripts (hidd,pand,dund) -- 4.5-1 -- Update to 4.5 -- Fix initscript to actually start bluetoothd by hand -- Add chkconfig information to the initscript -- 4.4-2 -- Fix rpmlint problems -- Fix input device handling -- 4.4-1 -- Update to 4.4 -- Update source address, and remove unneeded deps (thanks Marcel) -- 4.1-1 -- Initial build - updated specfile - VineLinux-4.2 logfile -- *Thu Oct 2 2008 Seiichirou Babasaki 3.24-4 -- update bleuz-gnome, rebuild bluez-utils -- Requires: fuse -- updated specfile -- *Tue Sep 30 2008 Seiichirou Babasaki 3.24-3 -- trusts.txt update (added audio profile) -- updated specfile #---------------------------------------------------------------------------- * Fri Sep 26 2008 Seiichirou Babasaki 3.32-2 - *.conf update - updated specfile * Fri Jun 13 2008 Seiichirou Babasaki 3.32-1 - Updated 3.32 - Updated specfile - ** LOGS 3.31-2 - ** Add a .service file, starting up hcid only when used (#446918) - ** Fix descriptions in the initscript headers (#433647) - ** LOGS 3.30-2 - ** Add support for Dell HID/HCI switch - ** LOGS 3.27-1 - ** Ship audio.conf (#278831) - ** Ship network service * Sat Jan 26 2008 Seiichirou Babasaki 3.24-2 - Updated specfile - marge bluez-utils-3.24-conf-vl.patch - << bluez-utils-2.3-conf.patch - add trusts.txt(ja) - Updated specfile * Mon Jan 21 2008 Seiichirou Babasaki 3.24-1vl2 - Updated specfile for (dbus-devel >= 0.90) * Wed Jan 16 2008 Seiichirou Babasaki 3.24-1vl1 - Import bluez-utils - Packager: Babasaki - Updated specfile for (dbus-devel >= 0.60) - Update to 3.24