File blueberry.spec of Package blueberry

#
# spec file for package blueberry
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


%define __requires_exclude typelib\\((St)\\)
Name:           blueberry
Version:        1.1.15
Release:        0
Summary:        A configuration tool for Bluetooth
License:        GPL-3.0+
Group:          System/GUI/Other
Url:            https://github.com/linuxmint/blueberry
Source:         https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  bluez-tools
BuildRequires:  fdupes
BuildRequires:  gobject-introspection-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  python
BuildRequires:  update-desktop-files
Requires:       bluez-tools
Requires:       dbus-1-python
Requires:       gnome-bluetooth >= 3.14
Requires:       python-gobject
Requires:       python-setproctitle
Requires:       rfkill
Requires:       wmctrl
Recommends:     %{name}-lang
BuildArch:      noarch
%glib2_gsettings_schema_requires
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
Requires:       python-gobject-Gdk
%endif

%description
Utility for Bluetooth devices graphical configuration.

%lang_package

%prep
%setup -q
# Replace the icon with an existing one.
sed -i 's/^\(Icon=\).*$/\1%{name}/' .%{_datadir}/applications/%{name}.desktop

%build
make %{?_smp_mflags} V=1

%install
cp -a .%{_prefix} %{buildroot}%{_prefix}
cp -a .%{_sysconfdir} %{buildroot}%{_sysconfdir}
%find_lang %{name}
%fdupes %{buildroot}%{_datadir}/

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc COPYING README.md debian/changelog
%{_sysconfdir}/xdg/autostart/%{name}-tray.desktop
%{_sysconfdir}/xdg/autostart/%{name}-obex-agent.desktop
%{_bindir}/%{name}*
%{_libexecdir}/%{name}/
%dir %{_datadir}/cinnamon/
%dir %{_datadir}/cinnamon/applets/
%{_datadir}/cinnamon/applets/%{name}*/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/*/%{name}*
%{_datadir}/glib-2.0/schemas/org.%{name}.gschema.xml

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog