File mate-menu.spec of Package mate-menu

#
# spec file for package mate-menu
#
# 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 _name   mate_menu
%define _rev    f42342bc3b49
Name:           mate-menu
Version:        17.10.6
Release:        0
Summary:        Advanced MATE menu
License:        GPL-2.0+
Group:          System/GUI/Other
Url:            https://bitbucket.org/ubuntu-mate/mate-menu
Source:         https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{version}.orig.tar.gz
# PATCH-FEATURE-OPENSUSE mate-menu-yast2-software.patch sor.alexei@meowr.ru -- Use YaST2 and GNOME PackageKit package managers.
Patch0:         %{name}-yast2-software.patch
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  python >= 2.7
BuildRequires:  python-distutils-extra
BuildRequires:  python-setuptools
BuildRequires:  update-desktop-files
Requires:       glib2-tools
Requires:       gvfs
Requires:       mate-menus
Requires:       mozo
Requires:       python-configobj
Requires:       python-gobject
Requires:       python-mate-menus
Requires:       python-setproctitle
Requires:       python-xdg
Requires:       python-xlib
Requires:       xdg-utils
Recommends:     %{name}-lang
Recommends:     lsb-release
BuildArch:      noarch
%glib2_gsettings_schema_requires
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
Requires:       python-gobject-Gdk
%endif

%description
An advanced menu for MATE. Supports filtering, favourites,
autosession, and many other features.

This menu originated in the Linux Mint distribution and has
been ported to other distributions that ship the MATE Desktop
Environment.

%lang_package

%prep
%setup -q -n ubuntu-mate-%{name}-%{_rev}
%patch0 -p1
sed -i 's/su-to-root/xdg-su/g' %{_name}/execute.py

%build
python2 setup.py build

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

%py_compile %{buildroot}%{_datadir}/%{name}/plugins/
%find_lang %{name}

%post
%desktop_database_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%glib2_gsettings_schema_postun

%files
%defattr(-,root,root)
%doc COPYING README.md
%{_bindir}/%{name}
%{_libexecdir}/%{name}/
%{python_sitelib}/%{_name}/
%{python_sitelib}/%{_name}-*
%{_datadir}/%{name}/
%{_datadir}/glib-2.0/schemas/*
%dir %{_datadir}/mate-panel/
%dir %{_datadir}/mate-panel/applets/
%{_datadir}/mate-panel/applets/org.mate.panel.MateMenuApplet.mate-panel-applet
%dir %{_datadir}/dbus-1/
%dir %{_datadir}/dbus-1/services/
%{_datadir}/dbus-1/services/org.mate.panel.applet.MateMenuAppletFactory.service
%{_mandir}/man?/%{name}.?%{?ext_man}

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

%changelog
openSUSE Build Service is sponsored by