%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.22 Release: 2%{?dist} Summary: Input filter for less to better display files License: GPL-2.0-only URL: https://lesspipe.org/ Source: https://lesspipe.org/archive/lesspipe-%{version}.tar.gz BuildArch: noarch Requires: less BuildRequires: make BuildRequires: perl BuildRequires: bash BuildRequires: zsh BuildRequires: perl-generators %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 # XXX: do not package profile scripts for now, maybe completely remove it later ## 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 cat << EOF > less.sh # put me into your profile or /etc/profile.d [ -x %{bindir}/lesspipe.sh ] && export LESSOPEN="|%{bindir}/lesspipe.sh %s" EOF %files %dir %{bindir} #%{_sysconfdir}/profile.d/* %{bindir}/lesspipe.sh %{bindir}/archive_color %{bindir}/code2color %{bindir}/vimcolor %{bindir}/lesscomplete %{bash_completion} %{zsh_completion} %{_mandir}/man1/lesspipe.1.* %license LICENSE %doc ChangeLog INSTALL README.md german.txt less.sh %changelog * Wed Feb 17 2026 Andreas Haupt - 2.22-2 - do not package profile scripts in /etc/profile.d - buildrequires perl-generators * Wed Dec 17 2025 Andreas Haupt - 2.22-1 - version 2.22 - use new home page https://lesspipe.org * 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