File nwg-icon-picker.spec of Package nwg-icon-picker
%define skip_python312 1
%define skip_python311 1
%define skip_python310 1
Name: nwg-icon-picker
Version: 0.1.1
Release: 1
Summary: GTK icon chooser with a text search option
License: MIT
Group: Graphical desktop/Other
URL: https://github.com/nwg-piotr/nwg-icon-picker
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python-rpm-macros
BuildRequires: desktop-file-utils
BuildRequires: python3-devel >= 3.4
BuildRequires: python3-build
BuildRequires: python3-installer
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: python3-pip
BuildRequires: systemd-rpm-macros
BuildArch: noarch
Requires: python3
Requires: python3-gobject
Requires: libgtk-3-0
Requires: libgtk-layer-shell0
Requires: glib2
Source: v%version.tar.gz
%description
This program is intended to work as the icon picker for nwg-panel, but
it may be used standalone. It displays a window to choose an icon with a
textual search entry, and returns the icon name. You can also open a file
from the search result in GIMP or Inkscape - if installed.
%prep
%setup -n %name-%version
%build
%pyproject_wheel
%install
%pyproject_install
# installing additional files
[ -d %{buildroot}%{_datadir}/pixmaps ] || install -d -m 755 %{buildroot}%{_datadir}/pixmaps
cp *.svg %{buildroot}%{_datadir}/pixmaps/
install -Dpm 644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%files
%license LICENSE
%doc README.md
%{_datadir}/pixmaps/*.svg
%dir %{python3_sitelib}/nwg_icon_picker
%dir %{python3_sitelib}/nwg_icon_picker-%{version}.dist-info
%{python3_sitelib}/nwg_icon_picker/*
%{python3_sitelib}/nwg_icon_picker-%{version}.dist-info/*
%{_bindir}/*
%{_datadir}/applications/%{name}.desktop
%changelog