%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.23 Release: 3%{?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: /usr/bin/ps Requires: /usr/bin/file Requires: /usr/bin/head Requires: /usr/bin/iconv Requires: /usr/bin/locale Recommends: less BuildRequires: bash BuildRequires: diffutils BuildRequires: glibc-langpack-en BuildRequires: less BuildRequires: make BuildRequires: perl BuildRequires: perl-generators # The following build requirements are not "hard" but used to successfullly run # as many tests from test.sh as possible 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 Requires: setup Requires: lesspipe == %{version}-%{release} %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. %package vimcolor Summary: Input filter for less to better display files - vimcolor utility Requires: lesspipe == %{version}-%{release} Requires: (vim-enhanced or neovim) Suggests: neovim %description vimcolor 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 the vimcolor utility used by lesspipe. %prep %autosetup %build ./configure --prefix=%{_prefix} --bindir=%{lesspipe_exec_dir} --libexecdir=%{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 env TERM=xterm-256color ./test.sh %{buildroot}%{lesspipe_exec_dir}/lesspipe.sh %files %dir %{lesspipe_exec_dir} %{lesspipe_exec_dir}/archive_color %{lesspipe_exec_dir}/lesscomplete %{lesspipe_exec_dir}/lesspipe.sh %dir %{bash_completion} %{bash_completion}/less %dir %{zsh_completion} %{zsh_completion}/_less %{_mandir}/man1/lesspipe.1.* %license LICENSE %doc ChangeLog README.md german.txt %files profile %{_sysconfdir}/profile.d/50-lesspipe.* %files vimcolor %{lesspipe_exec_dir}/vimcolor %changelog * Tue Mar 24 2026 Andreas Haupt - 2.23-3 - split up vimcolor package - follow suggestions from https://bugzilla.redhat.com/show_bug.cgi?id=2417806#c50 * Mon Mar 23 2026 Andreas Haupt - 2.23-1 - version 2.23 * 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