Name: lesspipe Version: 2.21 Release: 1%{?dist} Summary: Input filter for less to better display files License: GPL-2.0-only URL: https://github.com/wofr06/lesspipe/ Source: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch Requires: less BuildRequires: make BuildRequires: perl BuildRequires: bash BuildRequires: zsh %global debug_package %{nil} %description lesspipe.sh is an input filter for the pager less. It is able to process a wide variety of file formats. It enables users to deeply inspect archives and to display the contents of files in archives without having to unpack them before. That means file contents can be properly interpreted even if the files are compressed and contained in a hierarchy of archives (often found in RPM or DEB archives containing source tarballs). The filter is easily extensible for new formats. The input filter is a bash script, but works as well as a zsh script. For zsh and bash tab completion mechanisms for archive contents are provided. %define bindir %{_prefix}/libexec/%{name} %define bash_completion %{_datarootdir}/bash-completion/completions %define zsh_completion %{_datarootdir}/zsh/site-functions %prep %autosetup %build ./configure --prefix=%{_prefix} --bindir=%{bindir} --bash-completion-dir=%{bash_completion} --zsh-completion-dir=%{zsh_completion} %install %make_install # create profile.d scripts to set LESSOPEN mkdir -p %{buildroot}%{_sysconfdir}/profile.d cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/zzless.sh [ -x %{bindir}/lesspipe.sh ] && export LESSOPEN="|%{bindir}/lesspipe.sh %s" EOF cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/zzless.csh if ( -x %{bindir}/lesspipe.sh ) then setenv LESSOPEN "|%{bindir}/lesspipe.sh %s" endif EOF %files %dir %{bindir} %{_sysconfdir}/profile.d/* %{bindir}/lesspipe.sh %{bindir}/archive_color %{bindir}/code2color %{bindir}/vimcolor %{bindir}/sxw2txt %{bindir}/lesscomplete %{bash_completion} %{zsh_completion} %{_mandir}/man1/lesspipe.1.* %license LICENSE %doc ChangeLog INSTALL README.md german.txt %changelog * Fri Nov 28 2025 Andreas Haupt - 2.21-1 - initial packaging for Fedora EPEL