File menulibre.spec of Package menulibre

# spec file for package menulibre
# Copyright (c) 2014 SUSE LINUX Products 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

Name:           menulibre
Version:        2.0.6
Release:        0
License:        GPL-3.0
Summary:        An advanced menu editor
Group:          System/GUI/Other
BuildRequires:  gettext-runtime
BuildRequires:  girepository-1_0
BuildRequires:  gnome-menus
BuildRequires:  intltool
BuildRequires:  python3-setuptools
BuildRequires:  python3
BuildRequires:  python3-base
BuildRequires:  python3-distutils-extra
BuildRequires:  python3-gobject
BuildRequires:  python3-psutil
BuildRequires:  typelib-1_0-GdkPixbuf-2_0
BuildRequires:  typelib-1_0-GMenu-3_0
BuildRequires:  typelib-1_0-Gtk-3_0
BuildRequires:  xdg-utils
BuildRequires:  fdupes
# Needed for typelib() - Requires.
BuildRequires:  gobject-introspection
Requires:       gdk-pixbuf-loader-rsvg
Requires:       gnome-icon-theme-symbolic
Requires:       python3
Requires:       python3-gobject
Requires:       python3-psutil
Requires:       psutils
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

An advanced menu editor that provides modern features in a clean, easy-to-use
interface. All without GNOME dependencies, so even lightweight systems can
benefit from the sanity that MenuLibre offers. MenuLibre is your one-stop shop
for menus in Linux, whether you use Gnome, LXDE, XFCE, or Unity.


%setup -q
sed -i 's/Соханить/Сохранить/' po/ru.po

export XDG_RUNTIME_DIR=/tmp
python3 ./ build

rm -rf %{buildroot}
install -dm 0755 %{buildroot}%{_datadir}/locale
cp -a build/mo/* %{buildroot}%{_datadir}/locale/
install -Dm 0644 build/share/applications/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
export XDG_RUNTIME_DIR=/tmp
export LC_ALL=en_US.UTF-8
python3 ./ install --skip-build \
    --prefix="%{_prefix}" \
    --root="%{buildroot}" \
rm -rf %{buildroot}%{_datadir}/doc
grep -rl '^#!' %{buildroot}%{python3_sitelib}/%{name}* | xargs chmod 0755
%fdupes %{buildroot}%{_datadir}/icons/hicolor/

%find_lang %{name}

# Python byte compile.
pushd %{buildroot}%{python3_sitelib}/%{name}_lib/__pycache__
%py3_compile ..

rm -rf %{buildroot}



%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/ui/

%files lang -f %{name}.lang