requires: don't require man-db
Resolves: rhbz#1278857 Version: 481-4
This commit is contained in:
parent
32b553bce3
commit
6dde17a846
@ -1,7 +1,7 @@
|
||||
Summary: A text file browser similar to more, but better
|
||||
Name: less
|
||||
Version: 481
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv3+ or BSD
|
||||
Group: Applications/Text
|
||||
Source: http://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
|
||||
@ -18,8 +18,6 @@ Patch9: less-458-less-filters-man.patch
|
||||
Patch10: less-458-lesskey-usage.patch
|
||||
Patch11: less-458-old-bot-in-help.patch
|
||||
URL: http://www.greenwoodsoftware.com/less/
|
||||
Requires: groff-base
|
||||
Requires: man-db
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: autoconf automake libtool
|
||||
|
||||
@ -67,6 +65,9 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/profile.d
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 20 2016 Pavel Raiskup <praiskup@redhat.com> - 481-4
|
||||
- don't strictly require man-db or groff-base (rhbz#1278857)
|
||||
|
||||
* Tue Mar 29 2016 Pavel Raiskup <praiskup@redhat.com> - 481-3
|
||||
- avoid one ubiquitous stat() call in less.sh and less.csh if possible
|
||||
(rhbz#1321591)
|
||||
|
22
lesspipe.sh
22
lesspipe.sh
@ -30,6 +30,24 @@ if [ -x ~/.lessfilter ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
manfilter ()
|
||||
{
|
||||
if test -x /usr/bin/man ; then
|
||||
# See rhbz#1241543 for more info. Well, actually we firstly
|
||||
# used 'man -l', then we switched to groff, and then we again
|
||||
# switched back to 'man -l'.
|
||||
/usr/bin/man -P /usr/bin/cat -l "$1"
|
||||
elif test -x /usr/bin/groff; then
|
||||
# This is from pre-rhbz#1241543-time.
|
||||
groff -Tascii -mandoc "$1" | cat -s
|
||||
else
|
||||
echo "WARNING:"
|
||||
echo "WARNING: to better show manual pages, install 'man-db' package"
|
||||
echo "WARNING:"
|
||||
cat "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
export MAN_KEEP_FORMATTING=1
|
||||
|
||||
case "$1" in
|
||||
@ -40,12 +58,12 @@ case "$1" in
|
||||
*.xz|*.lzma) DECOMPRESSOR="xz -dc" ;;
|
||||
esac
|
||||
if [ -n "$DECOMPRESSOR" ] && $DECOMPRESSOR -- "$1" | file - | grep -q troff; then
|
||||
$DECOMPRESSOR -- "$1" | man -P cat -l -
|
||||
$DECOMPRESSOR -- "$1" | manfilter -
|
||||
exit $?
|
||||
fi ;;&
|
||||
*.[1-9n]|*.[1-9]x|*.man)
|
||||
if file "$1" | grep -q troff; then
|
||||
man -P cat -l "$1"
|
||||
manfilter "$1"
|
||||
exit $?
|
||||
fi ;;&
|
||||
*.tar) tar tvvf "$1"; exit $? ;;
|
||||
|
Loading…
Reference in New Issue
Block a user