File mate-menu.spec of Package mate-menu

#
# spec file for package mate-menu
#
# 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/
#


%define _name   mate_menu
%define _rev    b130be3ff9ad
Name:           mate-menu
Version:        5.6.5a
Release:        0
Summary:        Advanced MATE menu
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-UPSTREAM 0001-execute-fix.patch p.drouand@gmail.com -- Fix intends in mate-menu execute.py
Patch0:         0001-execute-fix.patch
# PATCH-FIX-UPSTREAM 0001-recent-icon.patch p.drouand@gmail.com -- mate-folder.png icon doesn't exits in icon themes, use folder.png
Patch1:         0001-recent-icon.patch
# PATCH-FIX-OPENSUSE 0002-xterm-no-symlink-dep.patch sor.alexei@meowr.ru -- Remove dependency on x-terminal-emulator Debian's symlink.
Patch2:         0002-xterm-no-symlink-dep.patch
# PATCH-FEATURE-OPENSUSE 0002-yast2-software.patch sor.alexei@meowr.ru -- Add YaST2 and GNOME PackageKit package managers
Patch3:         0002-yast2-software.patch
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  python >= 2.4
BuildRequires:  python-distutils-extra
BuildRequires:  python-setuptools
BuildRequires:  update-desktop-files
Requires:       glib2-tools
Requires:       gvfs
Requires:       libmate-desktop-2-17
Requires:       libmate-panel-applet-4-1
Requires:       mate-menus
Requires:       mozo
Requires:       python-configobj
Requires:       python-gtk
Requires:       python-mate-menus
Requires:       python-xdg
Requires:       python-xlib
Requires:       xdg-utils
Recommends:     %{name}-lang = %{version}
BuildArch:      noarch
%glib2_gsettings_schema_requires

%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 distros that ship the MATE Desktop
Environment.

%lang_package

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

%build
# Nothing to build.

%install
python2 setup.py install \
  --root=%{buildroot}    \
  --prefix=%{_prefix}
%py_compile %{buildroot}%{_libexecdir}/%{name}/
%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