less/less.spec

95 lines
2.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package less
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if ! %{defined _distconfdir}
%define _distconfdir %{_sysconfdir}
%else
%define use_usretc 1
%endif
Name: less
Accepting request 1003485 from home:dspinella:branches:Base:System - Update to 608: * Add the --header option (github #43). * Add the --no-number-headers option (github #178). * Add the --status-line option. * Add the --redraw-on-quit option (github #36). * Add the --search-options option (github #213). * Add the --exit-follow-on-close option (github #244). * Add 'H' color type to set color of header lines. * Add #version conditional to lesskey. * Add += syntax to variable section in lesskey files. * Allow option name in -- command to end with '=' in addition to '\n'. * Add $HOME/.config to possible locations of lesskey file (github #153). * Add $XDG_STATE_HOME and $HOME/.local/state to possible locations of history file (github #223). * Don't read or write history file in secure mode (github #201). * Fix display of multibyte and double-width chars in prompt. * Fix ESC-BACKSPACE command when BACKSPACE key does not send 0x08 (github #188). * Add more \k codes to lesskey format. * Fix bug when empty file is modified while viewing it. * Fix bug when parsing a malformed lesskey file (githb #234). * Fix bug scrolling history when --incsearch is set (github #214). * Fix buffer overflow when invoking lessecho with more than 63 -m/-n options (github #198). * Fix buffer overflow in bin_file (github #271). * Fix bug restoring color at end of highlighted text. * Fix bug in parsing lesskey file. * Defer moving cursor to lower left in some more cases. * Suppress TAB filename expansion in some cases where it doesn't make sense. * Fix termlib detection when compiler doesn't accept OBS-URL: https://build.opensuse.org/request/show/1003485 OBS-URL: https://build.opensuse.org/package/show/Base:System/less?expand=0&rev=90
2022-09-19 10:50:50 +00:00
Version: 608
Release: 0
Summary: Text File Browser and Pager Similar to more
License: BSD-2-Clause OR GPL-3.0-or-later
Group: Productivity/Text/Utilities
URL: https://www.greenwoodsoftware.com/less/
Source: https://www.greenwoodsoftware.com/less/less-%{version}.tar.gz
Source1: README.SUSE
Source2: lessopen.sh
Source3: lessclose.sh
Source4: lesskey.src
Source5: https://www.greenwoodsoftware.com/less/less-%{version}.sig
Source6: https://www.greenwoodsoftware.com/less/pubkey.asc#/%{name}.keyring
Accepting request 602384 from home:kstreitova:branches:Base:System - update to version 530 [bsc#1091308] * Don't output terminal init sequence if using -F and file fits on one screen. * When using -S, mark truncated lines with a special character. The character can be changed or disabled via the new --rscroll option. * New command M marks the last line displayed on the screen. * New command ESC-m removes a line mark. * Status column (enabled via -J) now shows mark letters. * Status column shows search matches even if highlighting is disabled via -G. * A second ESC-u command will clear search match markers in the status column. * Do same ANSI escape code filtering for tag matching that we do for searching, to help when viewing syntax-highlighted code. * Catch SIGTERM and clean up before exiting. * Fix bug initializing default charset on Windows. * Handle keypad ENTER key correctly if it sends something other than newline. * Fix buffering bug when using stdin with a LESSOPEN pipe. * Update Unicode tables to 2017-03-08. * Pass-thru Unicode formating chars (Cf type) instead of treating them as binary chars. But treat them as binary if -U is set. * Fix erroneous binary file warning when UTF-8 file contains ANSI SGR sequences. * Fix bugs when using LESSOPEN and switching between stdin and other files. * Fix some bugs handling filenames containing shell metacharacters * Fix some memory leaks. * Allow some debugging environment variables to be set in lesskey OBS-URL: https://build.opensuse.org/request/show/602384 OBS-URL: https://build.opensuse.org/package/show/Base:System/less?expand=0&rev=64
2018-04-29 11:37:53 +00:00
Patch0: less-429-shell.patch
Patch2: less-429-more.patch
Patch3: https://github.com/gwsw/less/commit/a78e1351113cef564d790a730d657a321624d79c.patch#/cve-2022-46663.patch
BuildRequires: automake
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
Requires: file
# lessopen.sh uses which
Requires: /usr/bin/which
%description
less is a text file browser and pager similar to more. It allows
backward as well as forward movement within a file. Also, less does not
have to read the entire input file before starting. It is possible to
start an editor at any time from within less.
%prep
%autosetup -p1
#
# the ./configure script is not writable for the normal user
# rather fix permissions for all files
chmod u+w *
#
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%build
autoreconf -fiv
export CFLAGS="%{optflags} -fPIE"
export LDFLAGS="-pie"
%configure
#
# regenerate help.c because less.hlp was patched
Accepting request 602384 from home:kstreitova:branches:Base:System - update to version 530 [bsc#1091308] * Don't output terminal init sequence if using -F and file fits on one screen. * When using -S, mark truncated lines with a special character. The character can be changed or disabled via the new --rscroll option. * New command M marks the last line displayed on the screen. * New command ESC-m removes a line mark. * Status column (enabled via -J) now shows mark letters. * Status column shows search matches even if highlighting is disabled via -G. * A second ESC-u command will clear search match markers in the status column. * Do same ANSI escape code filtering for tag matching that we do for searching, to help when viewing syntax-highlighted code. * Catch SIGTERM and clean up before exiting. * Fix bug initializing default charset on Windows. * Handle keypad ENTER key correctly if it sends something other than newline. * Fix buffering bug when using stdin with a LESSOPEN pipe. * Update Unicode tables to 2017-03-08. * Pass-thru Unicode formating chars (Cf type) instead of treating them as binary chars. But treat them as binary if -U is set. * Fix erroneous binary file warning when UTF-8 file contains ANSI SGR sequences. * Fix bugs when using LESSOPEN and switching between stdin and other files. * Fix some bugs handling filenames containing shell metacharacters * Fix some memory leaks. * Allow some debugging environment variables to be set in lesskey OBS-URL: https://build.opensuse.org/request/show/602384 OBS-URL: https://build.opensuse.org/package/show/Base:System/less?expand=0&rev=64
2018-04-29 11:37:53 +00:00
./mkhelp.pl <less.hlp >help.c
#
# build less
%make_build
%install
%make_install
#
# lesskey
install -m 755 -d %{buildroot}/%{_distconfdir}
install -m 644 lesskey.src %{buildroot}/%{_distconfdir}/lesskey
%{buildroot}%{_bindir}/lesskey -o %{buildroot}%{_distconfdir}/lesskey.bin %{buildroot}%{_distconfdir}/lesskey
#
# preprocessor
install -m 755 lessopen.sh lessclose.sh %{buildroot}/%{_bindir}
chmod -x LICENSE COPYING NEWS README.SUSE
%files
%license LICENSE COPYING
%doc NEWS README.SUSE
%{_mandir}/*/*
%{_distconfdir}/*
%{_bindir}/*
%changelog