%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: 5%{?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 Recommends: bat Suggests: jq Suggests: pandoc Suggests: (elinks or lynx or w3m) Suggests: (vim-enhanced or neovim) %if 0%{?fedora} Suggests: libreoffice %endif BuildRequires: bash BuildRequires: bat BuildRequires: diffutils BuildRequires: glibc-langpack-en BuildRequires: groff-base BuildRequires: less BuildRequires: make BuildRequires: pandoc BuildRequires: perl BuildRequires: perl-generators BuildRequires: neovim BuildRequires: unzip %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. %package profile Summary: Input filter for less to better display files - profile scripts %description profile 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. This package contains profile scripts to automatically set LESSOPEN on login. %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/50-less.sh [ -x %{bindir}/lesspipe.sh ] && export LESSOPEN="|%{bindir}/lesspipe.sh %s" EOF cat << EOF > %{buildroot}%{_sysconfdir}/profile.d/50-less.csh if ( -x %{bindir}/lesspipe.sh ) then setenv LESSOPEN "|%{bindir}/lesspipe.sh %s" endif EOF %check ./test.sh %{buildroot}%{bindir}/lesspipe.sh %files %dir %{bindir} %{bindir}/lesspipe.sh %{bindir}/archive_color %{bindir}/vimcolor %{bindir}/lesscomplete %{bash_completion} %{zsh_completion} %{_mandir}/man1/lesspipe.1.* %license LICENSE %doc ChangeLog INSTALL README.md german.txt %files profile %{_sysconfdir}/profile.d/* %changelog * Mon Mar 2 2026 Andreas Haupt - 2.22-5 - rebase to current snapshot - more Suggests and Recommends - run tests from new test.sh script * Mon Feb 23 2026 Andreas Haupt - 2.22-4 - name profile scripts as suggested in #2417806 * Wed Feb 18 2026 Andreas Haupt - 2.22-3 - split profile stuff into separate subpackage * Tue 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