1 Star 0 Fork 4

丈青山/catfish

forked from src-openEuler/catfish 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
catfish.spec 3.47 KB
一键复制 编辑 原始数据 按行查看 历史
dillon chen 提交于 2020-07-28 17:11 . Init package
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 <<EOF
#!/usr/bin/bash
export GDK_BACKEND=x11
exec %{_libexecdir}/catfish \$@
EOF
chmod 0755 %{buildroot}%{_bindir}/catfish
# for backwards compatibility:
ln -s catfish %{buildroot}%{_bindir}/catfish-py3
pushd %{name}-%{version}*
# Install man page manually
%{__mkdir_p} %{buildroot}%{_mandir}/man1
%{__install} -cpm 0644 ./%{name}.1 %{buildroot}%{_mandir}/man1/
popd
# Remove all unnecessary documentation
%{__rm} -rf %{buildroot}%{_datadir}/doc/
# Rename desktop files for now
pushd %{buildroot}%{_datadir}/applications/
mv *desktop %{name}.desktop
popd
%{find_lang} %{name}
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml
%files -f %{name}.lang
%doc AUTHORS
%doc ChangeLog
%doc README
%license COPYING
%{_bindir}/%{name}
%{_bindir}/%{name}-py3
%{_libexecdir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%{_metainfodir}/%{name}.appdata.xml
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}_lib/
%{python3_sitelib}/%{name}-%{version}-py3*.egg-info
%changelog
* Tue Jul 28 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 1.4.13-1
- Init package
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhang__3125/catfish.git
git@gitee.com:zhang__3125/catfish.git
zhang__3125
catfish
catfish
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385