diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/a/less | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'source/a/less')
-rwxr-xr-x | source/a/less/less.SlackBuild | 102 | ||||
-rw-r--r-- | source/a/less/less.sysconfdir.diff | 15 | ||||
-rw-r--r-- | source/a/less/lesspipe.sh | 67 | ||||
-rw-r--r-- | source/a/less/slack-desc | 19 |
4 files changed, 203 insertions, 0 deletions
diff --git a/source/a/less/less.SlackBuild b/source/a/less/less.SlackBuild new file mode 100755 index 00000000..64335957 --- /dev/null +++ b/source/a/less/less.SlackBuild @@ -0,0 +1,102 @@ +#!/bin/sh + +# Copyright 2005-2009 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-less + +VERSION=${VERSION:-418} +ARCH=${ARCH:-x86_64} +BUILD=${BUILD:-3} + +NUMJOBS=${NUMJOBS:-" -j7 "} + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +elif [ "$ARCH" = "arm" ]; then + SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "armel" ]; then + SLKCFLAGS="-O2 -march=armv4t" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf less-$VERSION +tar xvf $CWD/less-$VERSION.tar.bz2 || exit 1 +cd less-$VERSION +zcat $CWD/less.sysconfdir.diff.gz | patch -p1 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/man + +make $NUMJOBS || make || exit 1 + +mkdir -p $PKG/usr/bin +cat less > $PKG/usr/bin/less +cat lesskey > $PKG/usr/bin/lesskey +cat lessecho > $PKG/usr/bin/lessecho +zcat $CWD/lesspipe.sh.gz > $PKG/usr/bin/lesspipe.sh +chmod 755 $PKG/usr/bin/* + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +mkdir -p $PKG/usr/doc/less-$VERSION +cp -a \ + COPYING* LICENSE README NEWS \ + $PKG/usr/doc/less-$VERSION + +mkdir -p $PKG/usr/man/man1 +for page in less.nro lesskey.nro ; do + cat $page | gzip -9c > $PKG/usr/man/man1/`basename $page .nro`.1.gz +done + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Build the package: +cd $PKG +/sbin/makepkg -l y -c n $TMP/less-$VERSION-$ARCH-$BUILD.txz + diff --git a/source/a/less/less.sysconfdir.diff b/source/a/less/less.sysconfdir.diff new file mode 100644 index 00000000..25c5bb58 --- /dev/null +++ b/source/a/less/less.sysconfdir.diff @@ -0,0 +1,15 @@ +--- ./less.nro.orig Mon May 27 17:14:24 2002 ++++ ./less.nro Mon May 27 17:14:46 2002 +@@ -947,10 +947,10 @@ + Otherwise, + .I less + looks in a standard place for the system-wide lesskey file: +-On Unix systems, the system-wide lesskey file is /usr/local/etc/sysless. ++On Unix systems, the system-wide lesskey file is /etc/sysless. + (However, if + .I less +-was built with a different sysconf directory than /usr/local/etc, ++was built with a different sysconf directory than /etc, + that directory is where the sysless file is found.) + On MS-DOS and Windows systems, the system-wide lesskey file is c:\\_sysless. + On OS/2 systems, the system-wide lesskey file is c:\\sysless.ini. diff --git a/source/a/less/lesspipe.sh b/source/a/less/lesspipe.sh new file mode 100644 index 00000000..2d660522 --- /dev/null +++ b/source/a/less/lesspipe.sh @@ -0,0 +1,67 @@ +#!/bin/sh +# +# Copyright 1997, 1998, 1999, 2000 Patrick Volkerding, Moorhead, MN, USA +# Copyright 2001, 2002 Slackware Linux, Inc, Concord, CA, USA +# Copyright 2006, 2009 Patrick Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# This is a preprocessor for 'less'. It is used when this environment +# variable is set: LESSOPEN="|lesspipe.sh %s" + +lesspipe() { + case "$1" in + *.tar) tar tvvf "$1" 2>/dev/null ;; + *.tgz | *.tar.gz | *.tar.Z | *.tar.z | *.tar.bz2 | *.tbz ) tar tvvf "$1" 2>/dev/null ;; + *.tlz | *.tar.lzma ) lzma -dc "$1" 2> /dev/null | tar tvvf - 2> /dev/null ;; + *.txz | *.tar.xz ) xz -dc "$1" 2> /dev/null | tar tvvf - 2> /dev/null ;; + *.zip) unzip -l "$1" 2>/dev/null ;; + *.rpm) rpm -qpvl "$1" 2>/dev/null ;; + *.rar) # check if rar is installed first + if which rar 1> /dev/null ; then + `which rar` t "$1" + fi ;; + *.1|*.2|*.3|*.4|*.5|*.6|*.7|*.8|*.9|*.n|*.man) # *roff src? + if file -L "$1" | grep roff 1> /dev/null ; then + nroff -S -mandoc "$1" + fi ;; + *.1.gz|*.2.gz|*.3.gz|*.4.gz|*.5.gz|*.6.gz|*.7.gz|*.8.gz|*.9.gz|*.n.gz|*.man.gz) # compressed *roff src? + if gzip -dc "$1" | file - | grep roff 1> /dev/null ; then + gzip -dc "$1" | nroff -S -mandoc - + fi ;; + *.1.bz2|*.2.bz2|*.3.bz2|*.4.bz2|*.5.bz2|*.6.bz2|*.7.bz2|*.8.bz2|*.9.bz2|*.n.bz2|*.man.bz2) # compressed *roff src? + if bzip2 -dc "$1" | file - | grep roff 1> /dev/null ; then + bzip2 -dc "$1" | nroff -S -mandoc - + fi ;; + *.gz) gzip -dc "$1" 2>/dev/null ;; + *.bz2) bzip2 -dc "$1" 2>/dev/null ;; + *.lzma) lzma -dc "$1" 2>/dev/null ;; + *.xz) xz -dc "$1" 2>/dev/null ;; +# *) FILE=`file -L "$1"` ; # Check to see if binary, if so -- view with 'strings' +# FILE1=`echo $FILE | cut -d ' ' -f 2` +# FILE2=`echo $FILE | cut -d ' ' -f 3` +# if [ "$FILE1" = "Linux/i386" -o "$FILE2" = "Linux/i386" \ +# -o "$FILE1" = "ELF" -o "$FILE2" = "ELF" ]; then +# strings "$1" +# fi ;; + esac +} + +lesspipe "$1" diff --git a/source/a/less/slack-desc b/source/a/less/slack-desc new file mode 100644 index 00000000..bbf440f9 --- /dev/null +++ b/source/a/less/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +less: less (file pager) +less: +less: Less is a paginator similar to more (1), but which allows backward +less: movement in the file as well as forward movement. Also, less does not +less: have to read the entire input file before starting, so with large +less: input files it starts up faster than text editors like vi (1). +less: +less: Less was written by Mark Nudelman. +less: +less: +less: |