File menulibre.spec of Package menulibre
Name: menulibre
Version: 2.2.3
Release: 0
Summary: FreeDesktop.org compliant menu editor
License: GPLv3
URL: https://bluesabre.org/projects/menulibre/
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
Requires: gnome-menus
Requires: gtk3
Requires: hicolor-icon-theme
Requires: python3-gobject
Requires: python3-psutil
Requires: xdg-utils
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: gnome-menus
BuildRequires: gtk3
BuildRequires: python3-devel
BuildRequires: python3-distutils-extra
BuildRequires: python3-gobject
BuildRequires: python3-psutil
Provides: python3-%{name} = %{version}-%{release}
%{?python_provide:%python_provide python3-%{name}}
%{?python_provide:%python_provide python3-%{name}_lib}
%description
MenuLibre is an advanced FreeDesktop.org compliant menu editor.
All fields specified in the FreeDesktop.org Desktop Entry and Menu
specifications are available to quickly update. Additionally, MenuLibre
provides an editor for the launcher actions used by applications such as Unity
and Plank.
Features:
- A beautiful interface powered by the latest version of GTK+.
- Create new launchers, or modify existing ones with complete control over
common settings and access to advanced settings.
- Add, remove, and adjust desktop actions: powerful shortcuts available used by
Unity, Xfce, and Pantheon.
- Easily rearrange menu items to suit your needs.
%prep
%autosetup
%build
%install
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
%{__python3} setup.py install --root=%{buildroot}
rm -rfv %{buildroot}/usr/bin/__pycache__
# Remove hashbang line from non-executable library files
for lib in %{buildroot}%{python3_sitelib}/%{name}{,_lib}/*.py; do
sed '1{\@^#!/usr/bin/python3@d}' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
desktop-file-install \
--remove-key="OnlyShowIn" \
--delete-original \
--dir=%{buildroot}%{_datadir}/applications \
%{buildroot}/%{_datadir}/applications/%{name}.desktop
%find_lang %{name}
%check
%files -f %{name}.lang
%doc AUTHORS NEWS README.md
%license COPYING
%{_bindir}/%{name}
%{_bindir}/%{name}-menu-validate
%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%{_datadir}/doc/%{name}/
%endif
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/%{name}/
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}.1.*
%{_mandir}/man1/%{name}-menu-validate.1.*
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}_lib/
%{python3_sitelib}/%%{name}-*.egg-info