%global debug_package %{nil} %global bindir %{_prefix}/libexec/%{name} %global bash_completion %{_datarootdir}/bash-completion/completions %global zsh_completion %{_datarootdir}/zsh/site-functions Name: lesspipe Version: 2.21 Release: 2%{?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 %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. %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 * Sat Nov 29 2025 Andreas Haupt - 2.21-2 - convert define to global in spec file * Fri Nov 28 2025 Andreas Haupt - 2.21-1 - initial packaging for Fedora EPEL