diff --git a/catfish-1.4.13.tar.bz2 b/catfish-1.4.13.tar.bz2 new file mode 100644 index 0000000..8235183 Binary files /dev/null and b/catfish-1.4.13.tar.bz2 differ diff --git a/catfish.spec b/catfish.spec new file mode 100644 index 0000000..8a4e108 --- /dev/null +++ b/catfish.spec @@ -0,0 +1,135 @@ +Name: catfish +Version: 1.4.13 +Release: 1 +Summary: A handy file search tool +License: GPLv2+ +#Group: Development/Libraries +URL: https://docs.xfce.org/apps/catfish/start +Source0: https://archive.xfce.org/src/apps/catfish/1.4/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: python3-devel +BuildRequires: python3-distutils-extra +BuildRequires: python3-setuptools +BuildRequires: %{_bindir}/appstream-util +BuildRequires: python3-gobject +BuildRequires: python3-pexpect +BuildRequires: python3-dbus +Requires: python3-gobject +Requires: python3-pexpect +Requires: python3-dbus +Requires: xdg-utils +# search engine +Requires: %{_bindir}/locate + +Provides: %{name}-python3 = %{version}-%{release} +Provides: %{name}-common = %{version}-%{release} + +%description +Catfish is a handy file searching tool. 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 +# Because %%build is not allowed to write files under %%buildroot, +# and calling setup.py --installed with target root under unpackaged directory +# causes some trouble, here once create temporaily directory +# and unpack source after that + +%setup -q -T -c -a 0 %{name}-%{version} +pushd %{name}-%{version}* + +# Fix up permissions... +find . -type f -print0 | xargs --null chmod 0644 +chmod 0755 bin/%{name} + +popd + +%build +TOPDIR=$(pwd) + +pushd %{name}-%{version}* + +# Remove unneeded shebang +grep -rl "/usr/bin/env" . | \ + xargs sed -i -e "\@/usr/bin/env[ ][ ]*python@d" + +#%%py3_build +# separation of build / install --skip-build not supported +# (separation causes some error for creating additional files +# such as desktop file, also installation directory gets wrong) + +mkdir -p ./_TMPINSTDIR/python3 +%__python3 setup.py \ + install \ + --root ${TOPDIR}/_TMPINSTDIR/python3 + +popd + +%install +cp -a %{name}-%{version}*/[A-Z]* . + +#%%py3_install +cp -a _TMPINSTDIR/python3/* %{buildroot} + +# Explicitly set GDK_BACKEND +mkdir %{buildroot}%{_libexecdir} +mv %{buildroot}%{_bindir}/catfish %{buildroot}%{_libexecdir}/ +cat > %{buildroot}%{_bindir}/catfish < - 1.4.13-1 +- Init package