Blob Blame History Raw
# Review request: https://bugzilla.redhat.com/show_bug.cgi?id=489564

Name:           blueman
Version:        2.0
Release:        9%{?dist}
Summary:        GTK+ Bluetooth Manager

Group:          Applications/System
License:        GPLv2+
URL:            https://github.com/blueman-project/blueman
Source0:        https://github.com/blueman-project/blueman/releases/download/%{version}/blueman-%{version}.tar.xz
Patch0:         fix_bluetoothd_path.patch
# upstream patch to remove browse
Patch1:         Drop-browse-feature.patch
# upstream patch to rename service file
Patch2:         Rename-blueman-applet.service-to-org.blueman.Applet..patch
# upstream fix for https://bugzilla.redhat.com/show_bug.cgi?id=1233237
Patch3:         Ignore-EEXIST-when-trying-to-create-the-cache-direct.patch

BuildRequires:  gtk3-devel >= 3.10
BuildRequires:  pygobject3-devel >= 3.10
BuildRequires:  startup-notification-devel >= 0.9
BuildRequires:  bluez-libs-devel >= 4.61
BuildRequires:  intltool >= 0.35.0
BuildRequires:  dbus-python-devel
BuildRequires:  python2-devel >= 2.7
BuildRequires:  desktop-file-utils
BuildRequires:  notify-python
BuildRequires:  Cython >= 0.21

Requires:       pygobject3 >= 3.10
Requires:       bluez >= 4.61
Requires:       dbus
Requires:       dbus-python
Requires:       obexd
Requires:       notify-python
Requires:       PolicyKit-authentication-agent
Requires:       desktop-notification-daemon
Requires:       pulseaudio-libs-glib2
Requires:       pulseaudio-module-bluetooth

Provides:       dbus-bluez-pin-helper
Obsoletes:      blueman-nautilus

%description
Blueman is a tool to use Bluetooth devices. It is designed to provide simple,
yet effective means for controlling BlueZ API and simplifying bluetooth tasks
such as:
- Connecting to 3G/EDGE/GPRS via dial-up
- Connecting to/Creating bluetooth networks
- Connecting to input devices
- Connecting to audio devices
- Sending/Receiving files via OBEX
- Pairing


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Remove appindicator support
sed -i 's|AppIndicator.py||g' blueman/plugins/applet/Makefile.*
 

NOCONFIGURE=yes ./autogen.sh

%build
%configure --disable-static --disable-polkit --enable-thunar-sendto=no --disable-schemas-compile
make %{?_smp_mflags}


%install
%{make_install}

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

desktop-file-install \
 --add-category="GTK;GNOME;" \
 --add-only-show-in="GNOME;XFCE;LXDE;X-Cinnamon;MATE" \
 --delete-original \
 --dir=$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/  \
 $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart//blueman.desktop

desktop-file-install \
 --delete-original     \
 --dir=$RPM_BUILD_ROOT%{_datadir}/applications  \
 $RPM_BUILD_ROOT%{_datadir}/applications/blueman-manager.desktop

desktop-file-install \
 --delete-original     \
 --dir=$RPM_BUILD_ROOT%{_datadir}/applications  \
 $RPM_BUILD_ROOT%{_datadir}/applications/blueman-adapters.desktop

rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/blueman/

%find_lang blueman

# we need to own this, not only because of SELinux
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/blueman
touch $RPM_BUILD_ROOT%{_sharedstatedir}/blueman/network.state

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
    /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :


%files -f blueman.lang
%doc CHANGELOG.md FAQ README.md
%license COPYING
%{_bindir}/*
%{python_sitelib}/blueman/
%{python_sitearch}/*.so
%{_libexecdir}/blueman-*
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.blueman.Mechanism.conf
%{_sysconfdir}/xdg/autostart/blueman.desktop
%{_datadir}/applications/blueman-*.desktop
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/pixmaps/blueman/
%{_datadir}/blueman/
%{_datadir}/dbus-1/services/org.blueman.Applet.service
%{_datadir}/dbus-1/system-services/org.blueman.Mechanism.service
%{_datadir}/glib-2.0/schemas/*
%{_mandir}/man1/*
%dir %{_sharedstatedir}/blueman
%ghost %attr(0644,root,root) %{_sharedstatedir}/blueman/network.state

%changelog
* Mon Jun 22 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-9
- add upstream fix for bz 1233237

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jun 10 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-7
- remove appindicator support

* Fri Jun 05 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-6
- add requires bluez (bz 1228488)

* Thu May 28 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-5
- add requires pulseaudio-libs-glib2

* Thu May 28 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-4
- remove browse feature (upstream patch)
- ammend description
- rename service file (upstream patch)
- clean up requires and buildrequires
- update scriptlets
- clean up spec file

* Wed May 27 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-3
- add requires dbus-python
- add requires pulseaudio-module-bluetooth for audio

* Wed May 27 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-2
- fix bluetoothd path for report tool

* Tue May 26 2015 Leigh Scott <leigh123linux@googlemail.com> - 2.0-1
- update to 2.0 release

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Dec 27 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.23-5
- Require pulseaudio-libs-glib2 (#856270)

* Sat Oct 06 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.23-4
- No longer require gnome-session
- Require gvfs-obexftp, needed when launching file managers from blueman

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun May 06 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.23-2
- Own /var/lib/blueman and /var/lib/blueman/network.state (#818528)

* Thu Apr 26 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.23-1
- Update to 1.23
- Drop upstreamed PulseAudio patch
- Fix statusicon
- Autostart blueman not only in GNOME but also in Xfce and LXDE
- Enhance description