%global debug_package %{nil} %global lesspipe_exec_dir %{_libexecdir}/%{name} %global bash_completion %{_datarootdir}/bash-completion/completions %global zsh_completion %{_datarootdir}/zsh/site-functions Name: lesspipe Version: 2.22 Release: 10%{?dist} Summary: Input filter for less to better display files License: GPL-2.0-or-later URL: https://lesspipe.org/ Source: https://github.com/wofr06/lesspipe/archive/refs/tags/v%{version}.tar.gz Source1: lesspipe.sh Source2: lesspipe.csh BuildArch: noarch Requires: less Requires: /usr/bin/ps # suggested by the author Wolfgang Friebel Recommends: bat Suggests: (elinks or lynx or w3m) Suggests: (vim-enhanced or neovim) BuildRequires: bash BuildRequires: diffutils BuildRequires: glibc-langpack-en BuildRequires: less BuildRequires: make BuildRequires: perl BuildRequires: perl-generators # try to run as many tests as possible from test.sh BuildRequires: /usr/bin/7za BuildRequires: /usr/bin/brotli BuildRequires: /usr/bin/bsdtar BuildRequires: /usr/bin/cabextract BuildRequires: /usr/bin/djvutxt BuildRequires: /usr/bin/elinks BuildRequires: /usr/bin/exiftool BuildRequires: /usr/bin/ffprobe BuildRequires: /usr/bin/groff BuildRequires: /usr/bin/isoinfo BuildRequires: /usr/bin/h5dump BuildRequires: /usr/bin/lz4 BuildRequires: /usr/bin/lzip BuildRequires: /usr/bin/lzma BuildRequires: /usr/bin/openssl BuildRequires: /usr/bin/pandoc BuildRequires: /usr/bin/pigz BuildRequires: /usr/bin/plistutil BuildRequires: /usr/bin/ps BuildRequires: /usr/bin/ps2ascii BuildRequires: /usr/bin/unzip BuildRequires: /usr/bin/vim BuildRequires: /usr/bin/xz # needed for color tests in test.sh BuildRequires: bat BuildRequires: /usr/bin/dtc BuildRequires: /usr/bin/pandoc BuildRequires: /usr/bin/pygmentize BuildRequires: /usr/bin/source-highlight %if 0%{?fedora} BuildRequires: /usr/bin/dvi2tty BuildRequires: /usr/bin/matdump BuildRequires: /usr/bin/odt2txt BuildRequires: libreoffice %endif %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=%{lesspipe_exec_dir} --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 sed -e "s@__BINDIR__@%{lesspipe_exec_dir}@g" %{SOURCE1} > %{buildroot}%{_sysconfdir}/profile.d/50-lesspipe.sh sed -e "s@__BINDIR__@%{lesspipe_exec_dir}@g" %{SOURCE2} > %{buildroot}%{_sysconfdir}/profile.d/50-lesspipe.csh %check # XXX: color tests cause some issues atm. They will be changed soon according to the author # in order to deal with these issues - so let's skip them for the time being # https://github.com/wofr06/lesspipe/pull/190#issuecomment-4032056639 env TERM=xterm-256color ./test.sh %{buildroot}%{lesspipe_exec_dir}/lesspipe.sh %files %dir %{lesspipe_exec_dir} %{lesspipe_exec_dir}/* %dir %{bash_completion} %{bash_completion}/* %dir %{zsh_completion} %{zsh_completion}/* %{_mandir}/man1/lesspipe.1.* %license LICENSE %doc ChangeLog INSTALL README.md german.txt %files profile %{_sysconfdir}/profile.d/* %changelog * Sat Mar 21 2026 Andreas Haupt - 2.22-10 - added BuildRequires vim in order to allow all color tests succeed * Tue Mar 10 2026 Andreas Haupt - 2.22-9 - changed source url to archive at Github - enhance BuildRequires so that color tests in test.sh can run - removed some suggests: - renamed bindir macro to lesspipe_exec_dir in order to limit naming confusion - clarify License * Tue Mar 10 2026 Andreas Haupt - 2.22-8 - fix sh profile script, put them into separate source files - added more BuildRequires as suggested in review * Mon Mar 9 2026 Andreas Haupt - 2.22-7 - rename profile files, only set LESSOPEN in case it is not set, yet - many more BuildRequires * Fri Mar 6 2026 Andreas Haupt - 2.22-6 - rebase to current snapshot - up2date test.sh: no more failures when running in mock * 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