#
# spec file for package alacarte
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
# TODO -- Get rid of this once the Python stuff location issue gets
# sorted out (https://gitlab.gnome.org/GNOME/alacarte/-/issues/14).
%bcond_without aclocal_fix
Name: alacarte
Version: 3.44.0
Release: 0
Summary: Menu editor for GNOME
License: LGPL-2.1-or-later
Group: System/GUI/GNOME
URL: https://gitlab.gnome.org/GNOME/alacarte
Source: https://download.gnome.org/sources/alacarte/3.44/%{name}-%{version}.tar.xz
%if %{with aclocal_fix}
BuildRequires: autoconf
BuildRequires: automake
%endif
BuildRequires: fdupes
BuildRequires: glib2-devel
# Needed for the typelib() dependency parser
BuildRequires: gobject-introspection
BuildRequires: intltool
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: python3 >= 3.3
BuildRequires: suse-xsl-stylesheets
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(libgnome-menu-3.0) >= 3.5.3
BuildRequires: pkgconfig(pygobject-3.0)
Requires: python3-gobject-Gdk
BuildArch: noarch
%description
Alacarte is a simple freedesktop.org compliant menu editor for GNOME
that lets you change your menus, simply and quickly. Just click and
type to edit, add, and delete any menu entry.
%lang_package
%prep
%autosetup -p1
%if %{with aclocal_fix}
sed -i -r 's/(sysconfig.)(get_default_scheme)/\1_\2/' aclocal.m4
%endif
%build
%if %{with aclocal_fix}
NOCONFIGURE=1 autoreconf -ifv
%endif
%configure
%make_build
%install
%make_install
%suse_update_desktop_file -r alacarte GNOME Utility DesktopUtility X-GNOME-PersonalSettings
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}%{_prefix}
%files
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{_bindir}/alacarte
%{_datadir}/alacarte
%{_datadir}/applications/alacarte.desktop
%{_datadir}/icons/hicolor/
%{python3_sitelib}/Alacarte
%{_mandir}/man1/alacarte.1%{?ext_man}
%files lang -f %{name}.lang
%changelog