File mate-tweak.spec of Package mate-tweak.openSUSE_Leap_42.1_Update

#
# spec file for package mate-tweak
#
# Copyright (c) 2016 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 _name   mate_tweak
%define _rev    998ebdda6538
Name:           mate-tweak
Version:        3.5.3
Release:        0
Summary:        MATE desktop tweak tool
License:        GPL-2.0+
Group:          System/GUI/Other
Url:            https://bitbucket.org/ubuntu-mate/mate-tweak
Source:         https://bitbucket.org/ubuntu-mate/%{name}/get/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE mate-tweak-use-matemenu.patch sor.alexei@meowr.ru -- Layouts are patched to use mate-menu instead of mintMenu or gnome-main-menu.
Patch0:         %{name}-use-matemenu.patch
# PATCH-FIX-UPSTREAM mate-tweak-no-dock-lacking-warnings.patch sor.alexei@meowr.ru -- Do not show Python warnings if no dock is present.
Patch1:         %{name}-no-dock-lacking-warnings.patch
BuildRequires:  fdupes
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  python3
BuildRequires:  python3-distutils-extra
BuildRequires:  python3-setuptools
BuildRequires:  update-desktop-files
Requires:       Mesa-demo-x
Requires:       dconf
Requires:       mate-panel
Requires:       python3-configobj
Requires:       python3-gobject
# For privilege granting.
Requires:       xdg-utils
Recommends:     %{name}-lang
BuildArch:      noarch

%description
Configures some aspects of the MATE desktop not exposed via the
MATE Control Centre applets.

Settings that can be handled via MATE Tweak:
 * Show/hide standard desktop icons.
 * Panel fine-tuning (icon visibility, in menus and on buttons,
   icon size, button labelling, contex menus, etc.).
 * Window manager fine-tuning.

%lang_package

%prep
%setup -q -n ubuntu-mate-%{name}-%{_rev}
%patch0 -p1
%patch1 -p1
# Make the world a bit simpler.
sed -i "s/'pkexec', '/'xdg-su', '-c /g" %{name}
sed -i '/polkit/d' setup.py

%build
# Nothing to build.

%install
python3 setup.py install \
  --root=%{buildroot}    \
  --prefix=%{_prefix}

# Give gi-find-deps.sh a bait.
ln -s %{_bindir}/%{name} %{buildroot}%{_libexecdir}/%{name}/%{name}.py

%fdupes %{buildroot}%{python3_sitelib}/
%find_lang %{name}

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc COPYING README.md
%{_bindir}/%{name}
%{_libexecdir}/%{name}/
%{python3_sitelib}/%{_name}-*
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man?/%{name}.?%{?ext_man}

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

%changelog
openSUSE Build Service is sponsored by