File blueman.spec of Package blueman
#
# spec file for package blueman
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: blueman
Version: 2.0.8
Release: 0
Summary: GTK+ Bluetooth Manager
License: GPL-3.0-only
Group: System/GUI/GNOME
Url: https://github.com/blueman-project/blueman
Source: https://github.com/%{name}-project/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildRequires: automake
BuildRequires: dbus-1-python3-devel
#BuildRequires: pkgconfig(notify-python)
BuildRequires: adwaita-icon-theme
BuildRequires: fdupes
# Needed for typelib() - Requires.
BuildRequires: gobject-introspection
BuildRequires: intltool >= 0.35.0
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python3-Cython
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(bluez)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(polkit-agent-1)
BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: pkgconfig(python3)
Requires: bluez
Requires: dbus-1-python3
Requires: gdk-pixbuf-loader-rsvg
Requires: notification-daemon
Requires: obex-data-server
Requires: polkit
Requires: pulseaudio-utils
Requires: python3-cairo
Requires: python3-gobject-Gdk
Requires: python3-notify2
Recommends: %{name}-lang
%glib2_gsettings_schema_requires
%description
Blueman provides means for controlling the BlueZ API and presenting
Bluetooth operations 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/Browsing files via OBEX
* Pairing
using a graphical user interface.
%package -n thunar-sendto-%{name}
Summary: A sendto integration for Thunar
Group: System/GUI/XFCE
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description -n thunar-sendto-%{name}
This package add sendto integration for Thunar.
%lang_package
%prep
%setup -q
sed -i '1s/python.*/python3/' apps/%{name}-*
echo -e 'NotShowIn=KDE;GNOME;' >> data/%{name}.desktop.in
# Fix path for bluetoothd
sed -i 's|%{_sbindir}/bluetoothd|%{_prefix}/lib/bluetooth/bluetoothd|' apps/blueman-report
# Fix non-standard icon names
sed -i 's/gtk-find/edit-find/' data/ui/device-list-widget.ui
sed -i 's/mouse/input-mouse/' blueman/services/Input.py
%build
#NOCONFIGURE=1 ./autogen.sh
autoreconf -fiv
export PYTHON=%{_bindir}/python3
export PYTHON_CFLAGS=-I/usr/include/python%{py3_ver}m
export PYTHON_LIBS=-lpython%{py3_ver}m
export CYTHONEXEC=%{_bindir}/cython-%{py3_ver}
%configure --prefix=%{_prefix} --enable-static=no \
--enable-polkit --disable-schemas-compile
%make_build
%install
%make_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -delete -print
rm -rf %{buildroot}%{_datadir}/doc/%{name}
%fdupes %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{_datadir}/icons/hicolor
%find_lang %{name}
%suse_update_desktop_file -i %{name}-manager
# Move blueman.rules to docs and leave default security untouched boo#1124339
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/polkit-1/rules.d/blueman.rules %{buildroot}%{_docdir}/%{name}/blueman.rules
rm -rf %{buildroot}%{_datadir}/polkit-1/rules.d
# FIX HASHBANGS IN BINARIES
sed -E -i "s|/usr/bin/env python3|/usr/bin/python3|g" %{buildroot}%{_bindir}/blueman-*
sed -E -i "s|/usr/bin/env python3|/usr/bin/python3|g" %{buildroot}%{_libexecdir}/blueman-*
%if 0%{?suse_version} < 1500
%post
%icon_theme_cache_post
%glib2_gsettings_schema_post
%postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%endif
%files
%doc CHANGELOG.md Dependencies.md FAQ README.md blueman.rules
%license COPYING
%config %{_sysconfdir}/dbus-1/system.d/org.%{name}.Mechanism.conf
%{_sysconfdir}/xdg/autostart/%{name}.desktop
%{_bindir}/%{name}-*
%{_libexecdir}/%{name}-mechanism
%{_libexecdir}/%{name}-rfcomm-watcher
%{python3_sitelib}/%{name}
%{python3_sitearch}/*%{name}*
%{_datadir}/applications/%{name}-manager.desktop
%{_datadir}/applications/%{name}-adapters.desktop
%{_datadir}/%{name}
%{_datadir}/dbus-1/services/%{name}-applet.service
%{_datadir}/dbus-1/system-services/org.%{name}.Mechanism.service
%{_datadir}/glib-2.0/schemas/org.%{name}.gschema.xml
%{_datadir}/icons/hicolor/*/*/blue*.*
%{_mandir}/man*/%{name}-*%{ext_man}
%{_datadir}/pixmaps/%{name}
%{_datadir}/polkit-1/actions/org.%{name}.policy
%files -n thunar-sendto-%{name}
%dir %{_datadir}/Thunar
%dir %{_datadir}/Thunar/sendto
%{_datadir}/Thunar/sendto/thunar-sendto-%{name}.desktop
%files lang -f %{name}.lang
%changelog