File blueberry.spec of Package blueberry
#
# spec file for package blueberry
#
# Copyright (c) 2015 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/
#
Name: blueberry
Version: 1.0.9
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: fdupes
BuildRequires: gobject-introspection-devel
BuildRequires: hicolor-icon-theme
BuildRequires: python >= 2.4
BuildRequires: update-desktop-files
Requires: gnome-bluetooth >= 3.14
Requires: rfkill
Requires: wmctrl
Recommends: %{name}-lang = %{version}
BuildArch: noarch
%glib2_gsettings_schema_requires
%description
Utility for Bluetooth devices graphical configuration.
%lang_package
%prep
%setup -q
# Add execution bit to files in /usr/bin/ directory.
chmod a+x .%{_bindir}/* .%{_libexecdir}/%{name}/*.py
# Replace the icon with an existing one.
sed -i 's/^\(Icon=\).*$/\1%{name}/' .%{_datadir}/applications/%{name}.desktop
%build
make %{?_smp_mflags}
%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 debian/changelog debian/copyright README.md
%{_bindir}/%{name}*
%{_libexecdir}/%{name}/
%{_sysconfdir}/xdg/autostart/%{name}-tray.desktop
%{_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