# # spec file for package less (Version 409) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: less BuildRequires: ncurses-devel %define prefix /usr %define sysconfdir /etc License: GPL v2 or later Group: Productivity/Text/Utilities Obsoletes: jless Provides: normal-less jless Requires: file AutoReqProv: on Version: 409 Release: 5 Summary: Text File Browser and Pager Similar to more Url: http://www.greenwoodsoftware.com/less/ Source: %{name}-%{version}.tar.bz2 Source1: README.SuSE Source2: lessopen.sh Source3: lessclose.sh Source4: lesskey.src Patch1: %{name}-%{version}.patch Patch2: %{name}-%{version}-lessecho-man.patch Patch3: %{name}-%{version}-speed.patch Patch22: %{name}-%{version}-strict_aliasing.patch Patch23: %{name}-%{version}-mouse.patch Patch24: %{name}-%{version}-terminate.patch Patch25: %{name}-%{version}-widechars.patch Patch26: %{name}-%{version}-shell.patch Patch27: %{name}-%{version}-save_line_position.patch Patch28: %{name}-%{version}-more.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %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. Authors: -------- Mark Nudelman %prep %setup -q %patch1 %patch2 %patch3 %patch22 %patch23 %patch24 %patch25 %patch26 %patch27 %patch28 # # the ./configure script is not writable for the normal user # rather fix permissions for all files chmod u+w * # cp %{S:1} %{S:2} %{S:3} %{S:4} . %build autoreconf -fi CFLAGS="$RPM_OPT_FLAGS" \ ./configure --mandir=%{_mandir} \ --prefix=%{prefix} \ --infodir=%{_infodir} \ --sysconfdir=%{sysconfdir} # # regenerate help.c because less.hlp was patched make mkhelp ./mkhelp help.c # # build less make %{?jobs:-j%jobs} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT/ install # # lesskey install -m 755 -d $RPM_BUILD_ROOT/%{sysconfdir} install -m 644 lesskey.src $RPM_BUILD_ROOT/%{sysconfdir}/lesskey $RPM_BUILD_ROOT%{prefix}/bin/lesskey -o $RPM_BUILD_ROOT%{sysconfdir}/lesskey.bin $RPM_BUILD_ROOT%{sysconfdir}/lesskey # # preprocessor install -m 755 lessopen.sh lessclose.sh $RPM_BUILD_ROOT/%{prefix}/bin %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc LICENSE COPYING NEWS README.SuSE %doc %{_mandir}/*/* %config %{sysconfdir}/* %{prefix}/bin/* %changelog * Wed Nov 14 2007 - werner@suse.de - Speed up the history save by using a temorary file and make the stream of that file a full buffered one. * Wed Oct 31 2007 - anosek@suse.cz - udpated to version 409 * fixed crash when searching text containing certain invalid UTF-8 sequences. * Wed Sep 12 2007 - anosek@suse.cz - fixed Less -l option conflicts with more -l [#307796] (more.patch) * Fri Aug 17 2007 - anosek@suse.cz - fixed Incorrect behaviour of -r parameter [#244791] (save_line_position.patch) * Fri Jul 27 2007 - anosek@suse.cz - updated to version 406 * Allow decimal point in number for %% (percent) command. * Allow decimal point in number for -j option (fraction of screen height). * Make n command fetch previous pattern from history file on first search. * Don't rewrite history file if it has not changed. * Don't move to bottom of screen on first page. * Don't output extraneous newlines, so copy & pasting lines from the output works better. * The -c option has been made identical with the -C option. * Allow "/dev/null" as synomym for "-" in LESSHISTFILE to indicate that no history file should be used. * Search can now find text which follows a null byte, if the PCRE library is used, or if no-regex searching (ctrl-R) is used. * Better compatibility with POSIX more specification. * Make -f work for directories. * Make "t" cmd traverse tags in the correct order. * Allow a few binary characters in the input file before warning that the file is binary. * Don't warn that file is binary if it merely contains ANSI color sequences and -R is in effect. * Update Unicode character tables. * Support DESTDIR in Makefile. * Fix bug when filename contains certain shell metacharacters such as "$". * Fix bug when resizing the window while waiting for input from a pipe. * Fix configure bugs. * Mon Mar 26 2007 - rguenther@suse.de - add ncurses-devel BuildRequires * Fri Apr 07 2006 - mmarek@suse.cz - don't use $SHELL for running external commands to avoid side-effects caused by $SHELL's startup scripts [#158044, #164041] (shell.patch) * Mon Feb 06 2006 - mmarek@suse.cz - fix editing of wide characters in search prompt (regression caused by dropping iso patch) (widechars.patch) * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Tue Jan 10 2006 - mmarek@suse.cz - upated to version 394 - removed iso patch, because vanilla less-394 is capable enough - removed patches 2-7 - lessecho.1 included in upstream tarball - unpacked less-SuSE.tar.bz2 * Mon Jan 02 2006 - mmarek@suse.cz - fix typo in previous fix * Mon Dec 19 2005 - mmarek@suse.cz - fixed lessopen man page [#105865] - applied lessopen patches to less-SuSE.tar.bz2 * Fri Oct 07 2005 - dmueller@suse.de - add head of changelog to rpm listing * Wed Oct 05 2005 - mmarek@suse.cz - updated Japanese patch to less-382-iso258, fixing #64531 * renumbered patches in specfile * fixed implicit function declaration warning * Thu Sep 15 2005 - mmarek@suse.cz - make expand_linebuf() faster [#39724] * Tue Sep 13 2005 - mmarek@suse.cz - recognize .cab archives with new file(1) [#116779] * Wed Sep 08 2004 - pmladek@suse.cz - fixed searching if the ANSI escape sequences are used in the text; it still does not work for Japanese coding (see search_ansi_esc_seq.patch for comments) [#44115] * Fri May 14 2004 - pmladek@suse.cz - fixed UTF-8 support to do not consider all non-ASCII characters as wide characters; they are detected correctly by the function internalize_utf8 if _XOPEN_SOURCE is enabled (fix added to the utf8.patch) [#29455] * Thu May 13 2004 - pmladek@suse.cz - improved handling of SIGTERM to remove temporary files and clean up terminal [#39273] (terminate.patch) - improved lessopen.sh [#39272] : * removed potential tmp file race * added w3m to preprocess HTML pages as an alternative for lynx; w3m is preferred over lynx * Wed Apr 14 2004 - pmladek@suse.cz - fixed search line to display correctly UTF-8 characters; solution based on the Japanese patch [#19587] * Tue Feb 24 2004 - pmladek@suse.cz - updated to version 382: * removed some old copyrighted code - fixed to work with Turkish locales, problems with functions like isupper, many thanks to Björn Jacke for hint and patch [#29827] - added some missing braces in opttbl.c to mouse.patch and iso254.patch - fixed code violating strict aliasing rules - used norootforbuild * Fri Nov 14 2003 - pmladek@suse.cz - fixed lessopen.sh: * added some missing quotes [#33058] * the script adds ./ before a relative file name to enable preprocess a file whose name begins with a "-" or "+" (inspiration got from RedHat) [#33058] * fixed detection of Debian's packages - merged mouse_test_for_xselection.patch into mouse.patch * Wed Sep 10 2003 - pmladek@suse.cz - test the utility xselection only if the mouse support is enabled [#29612] * Mon Aug 04 2003 - pmladek@suse.cz - updated to version 381 [#17201]: * new -L option to disable LESSOPEN processing * further support for large (64 bit) file addressing * use only 7 spaces for line numbers in -N mode, if possible * fix some nroff issues in the man page - removed obsolete patch for support for large file addressing (lfs.patch) - used autoreconf to rebuild autoconf stuff * Mon Dec 30 2002 - pmladek@suse.cz - updated to version 378: * default buffer space is now 64K as documented * search highlighting works properly when used with -R * windows version works properly when input file contains carriage returns * clean up some compiler warnings - merged less-378-iso254-bug.patch into the less-378-iso254.patch - removed unused CXXFLAGS setting from the spec file - fixed the patch for the mouse support (prefixes to a less commands were not printed immediately in the searched string as yet) [#21320] * Tue Aug 27 2002 - pmladek@suse.cz - removed code which is obsoleted by Japanese patch and make problems with UTF-8 [#17592, #17593] * Fri Aug 09 2002 - pmladek@suse.cz - updated to new stable version 376 * -x option can now specify multiple variable-width tab stops * -X option no longer disables keypad initialization * new option --no-keypad disables keypad initialization * new commands t and T step through multiple tag matches * new prompt style set by option -Pw * system-wide lesskey file now defaults to sysless in etc directory instead of .sysless in bin directory * pressing RightArrow or LeftArrow while entering a number now shifts the display N columns rather than editing the number itself * searching works better with ANSI (SGR) escape sequences * improved performance in reading very large pipes * eliminated some dependencies on file offets being 32 bits * fixed problems when viewing files with very long lines * fixed overstriking in UTF-8 mode, and overstriking tabs * improved horizontal shifting of text using -R option with ANSI color * improved handling of filenames containing shell metacharacters - fixed Japanese patch for this less version - iso247-bugs patch merged with Japanese patch - fixed bug in detection of xselection utillity * Fri May 17 2002 - pmladek@suse.cz - added mouse support (inspired by vim-6.0): * it is enabled by -A option * works only in xterm * contains support for mouse wheel [#9385] * direct access to X selection by xselection utility - applied patches less preprocessor patches * Thu Mar 21 2002 - pmladek@suse.cz - improved detection for input conding from keyboard, proper input coding is detected by locales now [#15155] - changed default input coding from "japanese-iso7" to "iso8859" - user can still define his input conding by the environment variable JLESSKEYCHARSET * Tue Mar 12 2002 - pmladek@suse.cz - changed meaning of the variable LESS_ADVANCED_PREPROCESSOR, many binary formats are preprocessed always, the text formats (ps, troff, html) are preprocessed only when the variable LESS_ADVANCED_PREPROCESSOR=yes * Thu Feb 21 2002 - pmladek@suse.cz - added support for cab files into less preprocessor * Mon Feb 18 2002 - pmladek@suse.cz - fixed to do not install .orig files * Fri Feb 15 2002 - pmladek@suse.cz - error messages in lessopen.sh must be redirected to the standard error output - fixed Copyright in lessopen.sh and lessclose.sh * Thu Feb 14 2002 - pmladek@suse.cz - added man page for lessecho from the Debian GNU/Linux distribution [#13275] - fixed usage of macro %%suse_update_config * Mon Nov 05 2001 - mfabian@suse.de - add init_def_codesets.diff (fixes the problem that less outputs ESC-A to set 'G1' to 'Right-hand Part of Latin Alphabet No.1 ISO 8859/1, ECMA-94'. This works only with xterm but fails with konsole, rxvt ...) Thanks to Michael Schroeder - add arabic.diff to fix typo in possible values of JLESSPLANESET (alabic -> arabic). - remove %%attr(644, -, -) in front of %%doc, this gives wrong permissions to the directory /usr/share/doc/packages/less use 'chmod 644 LICENSE COPYING NEWS' instead. * Fri Sep 21 2001 - vinil@suse.cz - README.SuSE about LESS_ADVANCED_PREPROCESSOR added * Tue Sep 11 2001 - mfabian@suse.de - include Japanese patch - rewrote utf8.diff. Together with the Japanese patch it almost works now. German, Italian and Spanish man pages display fine in an UTF-8 xterm. Czech is still broken, but that seems to be the fault of groff rather than less. - add less-SuSE.patch to display Japanese roff files correctly * Wed Sep 05 2001 - vinil@suse.cz - .zip handled by "unzip -v" (#10211) * Tue Aug 28 2001 - vinil@suse.cz - LESS_ADVANCED_PREPROCESSOR used for handling more than compressed files (#9287) * Tue Aug 14 2001 - vinil@suse.cz - typo fixed (#9730) * Tue Jul 17 2001 - vinil@suse.cz - can handle symlinks \ - can handle x and pm man pages -- bug #9393 * Mon May 14 2001 - vinil@suse.cz - utf8.diff added: less can handle bold and underlined utf-8 chars (needed especially for man) * Sat May 05 2001 - schwab@suse.de - lessopen.sh: Create tempfiles securely; add quotes as necessary; make sure we don't match the file type against the file name; don't leave temporary files around. * Fri May 04 2001 - schwab@suse.de - lessopen.sh: echo nothing if we have no alternate file (#7679). * Fri May 04 2001 - schwab@suse.de - lessopen.sh: Use the first stage contents if the second stage has nothing special. Tighten the patterns that recognize compressed data. Just echo the original file name if the file is not readable. * Tue May 01 2001 - schwab@suse.de - lessclose.sh: Only remove file if different from original file. * Mon Apr 30 2001 - schwab@suse.de - lessopen.sh: Use original file name if no conversions were done (#7421). * Fri Apr 27 2001 - vinil@suse.cz - lessing non-existing files now produce error message [bug #7320] * Thu Apr 19 2001 - mfabian@suse.de - removed "LESSCHARSET=latin1" from /etc/lesskey If LESSCHARSET is not set, latin1 is the default, unless "UTF-8" is found in LC_ALL, LC_CTYPE or LANG, the the default is utf-8. So setting "LESSCHARSET=latin1" is useless in case of a iso-8859-x locale and bad in case of a UTF-8 locale. If LESSCHARSET is set in /etc/lesskey, one cannot even override it by setting the environment variable anymore. * Fri Mar 16 2001 - vinil@suse.cz - less piping completely rewritten (using 'file', now) (bug #6256 fixed) * Wed Jan 10 2001 - smid@suse.cz - lesspipe.sh fixed * Tue Jan 09 2001 - smid@suse.cz - lesspipe.sh fixed [#5003] * Wed Dec 13 2000 - mfabian@suse.de - added "Provides: normal-less". This enables the japanized jless to use "Provides: less" and "Conflicts: normal-less". (Suggestion by bjacke@suse.de) * Mon Dec 11 2000 - smid@suse.cz - added conflict with jless * Fri Dec 01 2000 - aj@suse.de - Compile with LFS support, fix CFLAGS/CXXFLAGS. * Tue Nov 21 2000 - werner@suse.de - Remove swapping of kp-separator/kp-decimal because it's done in xkbd map for german keyboards * Tue Nov 21 2000 - werner@suse.de - Add some newer xterm escape sequences (oldFunctionsKeys) * Tue Sep 26 2000 - ro@suse.de - make lesspipe executable again * Mon Sep 25 2000 - smid@suse.cz - upgrade to 358 * Mon May 22 2000 - smid@suse.cz - upgrade to 354 - Copyright field fix - documentation added * Thu Apr 13 2000 - smid@suse.cz - buildroot added - upgrade to 3.46 * Thu Feb 10 2000 - kukuk@suse.de - Fill out Copyright and Group field * Mon Jan 24 2000 - kukuk@suse.de - Move /usr/man -> /usr/share/man * Mon Sep 13 1999 - bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Fri Jun 18 1999 - ro@suse.de - update to less-340 using jurix-dif - added [rs]pm to lesspipe-switch - added werners lesskey * Thu Sep 04 1997 - bs@suse.de - added *.as to lesspipe.sh * Wed May 28 1997 - werner@suse.de - added new etc/lesskey and etc/lesskey.bin * Sat Apr 26 1997 - florian@suse.de - update to new version 332 * Sun Apr 13 1997 - florian@suse.de - update to new version 330 * Thu Jan 02 1997 - bs@suse.de added new etc/lesskey* * Thu Jan 02 1997 - bs@suse.de lesskey from aaa_base inserted. * Thu Jan 02 1997 - florian@suse.de - Neue Version 321. - Bug mit falschen Aufruf von free() behoben. - In /etc/profile wird global fuer alle Benutzer eine 'lesskey'-Datei eingetragen. Braucht also nicht mehr im Home-Verzeichnis aller Benutzer erstellt werden.