|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
#
|
|
|
|
|
# spec file for package menulibre
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2024 SUSE LLC
|
|
|
|
|
# Copyright (c) 2025 SUSE LLC
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
@@ -16,16 +16,14 @@
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%bcond_with git
|
|
|
|
|
|
|
|
|
|
Name: menulibre
|
|
|
|
|
Version: 2.2.3
|
|
|
|
|
Version: 2.4.0
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Desktop menu editor
|
|
|
|
|
License: GPL-3.0-only
|
|
|
|
|
Group: System/GUI/Other
|
|
|
|
|
URL: https://bluesabre.org/projects/menulibre/
|
|
|
|
|
Source: https://github.com/bluesabre/menulibre/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
Source0: https://github.com/bluesabre/menulibre/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
|
|
|
|
BuildRequires: appstream-glib
|
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
@@ -33,18 +31,19 @@ BuildRequires: gnome-menus
|
|
|
|
|
BuildRequires: gobject-introspection
|
|
|
|
|
BuildRequires: hicolor-icon-theme
|
|
|
|
|
BuildRequires: intltool
|
|
|
|
|
BuildRequires: pkgconfig(libgnome-menu-3.0)
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildRequires: python3-distutils-extra
|
|
|
|
|
BuildRequires: python3-gobject
|
|
|
|
|
BuildRequires: python3-gobject-devel
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
BuildRequires: python3-psutil
|
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
|
BuildRequires: xdg-utils
|
|
|
|
|
BuildRequires: typelib(Gtk) = 3.0
|
|
|
|
|
BuildRequires: xdg-utils
|
|
|
|
|
Requires: gnome-menus
|
|
|
|
|
Requires: hicolor-icon-theme
|
|
|
|
|
Requires: python3-gobject
|
|
|
|
|
Requires: python3-psutil
|
|
|
|
|
Requires: xdg-utils
|
|
|
|
|
Recommends: %{name}-lang
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
@@ -57,57 +56,50 @@ Pantheon, Unity, and Xfce are supported.
|
|
|
|
|
%autosetup
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
|
%python3_pyproject_wheel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
|
%python3_pyproject_install
|
|
|
|
|
%else
|
|
|
|
|
%{__python3} setup.py install --root=%{buildroot}
|
|
|
|
|
|
|
|
|
|
# Remove hashbang line from non-executable library files
|
|
|
|
|
for lib in %{buildroot}%{python3_sitelib}/menulibre{,_lib}/*.py; do
|
|
|
|
|
sed '1{\@^#!/usr/bin/python3@d}' $lib > $lib.new &&
|
|
|
|
|
touch -r $lib $lib.new &&
|
|
|
|
|
mv $lib.new $lib
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Fix name issue in menulibre.desktop with Budgie and Pantheon
|
|
|
|
|
desktop-file-edit %{buildroot}%{_datadir}/applications/%{name}.desktop --remove-only-show-in="Pantheon" \
|
|
|
|
|
--remove-only-show-in="Budgie"
|
|
|
|
|
desktop-file-edit %{buildroot}%{_datadir}/applications/%{name}.desktop --add-only-show-in="X-Pantheon" \
|
|
|
|
|
--add-only-show-in="X-Budgie"
|
|
|
|
|
|
|
|
|
|
# Fix python-bytecode-inconsistent-mtime.
|
|
|
|
|
pushd %{buildroot}%{python3_sitelib}/%{name}_lib
|
|
|
|
|
%py3_compile .
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# Fix duplicate doc folder
|
|
|
|
|
rm -rf %{buildroot}%{_datadir}/doc
|
|
|
|
|
|
|
|
|
|
# Fix duplicate icon
|
|
|
|
|
%fdupes %{buildroot}%{_datadir}/icons/hicolor/
|
|
|
|
|
|
|
|
|
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/menulibre.desktop
|
|
|
|
|
|
|
|
|
|
rm -f %{buildroot}%{_datadir}/menulibre/metainfo/menulibre.appdata.xml.in
|
|
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.xml
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
|
# fix upstream
|
|
|
|
|
rm %{buildroot}%{python_sitelib}/uninstall.py
|
|
|
|
|
rm -r %{buildroot}%{_datadir}/doc/%{name}
|
|
|
|
|
rm -r %{buildroot}%{_datadir}/icons/hicolor/*x*/
|
|
|
|
|
rm -r %{buildroot}%{python_sitelib}/__pycache__
|
|
|
|
|
sed -i 's|#!/usr/bin/python3||g' %{buildroot}%{python_sitelib}/%{name}/*.py
|
|
|
|
|
sed -i 's|#!/usr/bin/python3||g' %{buildroot}%{python_sitelib}/%{name}_lib/*.py
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
appstream-util validate --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
|
|
|
|
|
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license COPYING
|
|
|
|
|
%doc AUTHORS NEWS README.md
|
|
|
|
|
%{_bindir}/%{name}*
|
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
%{_bindir}/%{name}-menu-validate
|
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
%{_datadir}/icons/hicolor/*/apps/%{name}.svg
|
|
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
|
|
|
|
%{_datadir}/metainfo/%{name}.appdata.xml
|
|
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
%{_mandir}/man?/%{name}*.?%{ext_man}
|
|
|
|
|
%{python3_sitelib}/%{name}-%{version}-py%{py3_ver}.egg-info
|
|
|
|
|
%{python3_sitelib}/%{name}/
|
|
|
|
|
%{python3_sitelib}/%{name}_lib/
|
|
|
|
|
%dir %{_datadir}/%{name}/
|
|
|
|
|
%dir %{_datadir}/%{name}/ui/
|
|
|
|
|
%{_datadir}/%{name}/ui/*.ui
|
|
|
|
|
%{_mandir}/man?/%{name}-menu-validate.?%{?ext_man}
|
|
|
|
|
%{_mandir}/man?/%{name}.?%{?ext_man}
|
|
|
|
|
%{python_sitelib}/%{name}
|
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
|
%{python_sitelib}/%{name}-%{version}.dist-info
|
|
|
|
|
%else
|
|
|
|
|
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
%{python_sitelib}/%{name}_lib
|
|
|
|
|
|
|
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
|