%define url_ver %(echo %{version} | cut -d. -f1,2) Summary: A handy file search tool Name: catfish Version: 1.4.9 Release: %mkrel 1 Group: File tools License: GPLv2+ URL: https://docs.xfce.org/apps/catfish/start Source0: https://archive.xfce.org/src/apps/catfish/%{url_ver}/catfish-%{version}.tar.bz2 BuildArch: noarch BuildRequires: gettext BuildRequires: intltool BuildRequires: desktop-file-utils BuildRequires: python3-devel %if 0%{?mageia} < 7 BuildRequires: python3-distutils-extra %else BuildRequires: python3dist(python-distutils-extra) %endif Requires: python3dist(pygobject) Requires: python3dist(pexpect) Requires: mlocate Requires: findutils %description Catfish is a handy file searching tool for Linux and Unix. The interface is intentionally lightweight and simple, using only GTK+3. You can configure it to your needs by using several command line options. %prep %autosetup -p1 %build %py3_build %install #%%py2_install fails because of --skip-build CFLAGS="%{optflags}" %__python3 setup.py install -O1 --root %{buildroot} desktop-file-install \ --remove-category="Utility" \ --add-category='System' \ --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* # handle docs in files section rm -rf %{buildroot}%{_docdir} %find_lang %{name} %files -f %{name}.lang %doc AUTHORS ChangeLog README %{_bindir}/%{name} %{_datadir}/applications/org.xfce.Catfish.desktop %{_datadir}/metainfo/catfish.appdata.xml %{_datadir}/%{name}/ %{_iconsdir}/hicolor/scalable/apps/*.svg %{_mandir}/man1/%{name}.1* %{python3_sitelib}/%{name}/ %{python3_sitelib}/%{name}_lib/ %{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info