lesspipe stable port information

Package: lesspipe
Version: 1.71
Revision: 11
Source: mirror:sourceforge:%n/%n-%v.tar.gz
Source-MD5: 6d921dc4ce9809d405cb8d694ac7cbbd
SourceDirectory: %n-%v
BuildDepends: fink (>= 0.18.0)
Recommends: lynx, antiword, rpm, ghostscript, html2text, unrtf
PatchScript: <<
/usr/bin/sed "s=/etc=%p/etc=g" code2color > code2color.new
/bin/mv -f code2color.new code2color
<<
CompileScript: <<
./configure --prefix=%p --yes
<<
InstallScript: <<
#!/bin/sh -ev
# remove absolute paths to fink installed packages
cat lesspipe.sh | /usr/bin/sed 's|%p/bin/||g' | /usr/bin/sed 's|/usr/bin/||g' > lesspipe.sh.fink
# install scripts
/usr/bin/install -d -m 755 %i/bin
/usr/bin/install -m 0755 lesspipe.sh.fink %i/bin/lesspipe.sh
/usr/bin/install -m 0755 code2color %i/bin

# install environment scripts
/usr/bin/install -d -m 755 %i/etc/profile.d
### bash version ###
cat >%i/etc/profile.d/%n.sh < export LESSOPEN='| %p/bin/lesspipe.sh %%s'

if [ -z "\$LESS" ]; then
LESS="--RAW-CONTROL-CHARS"
else
if [ \`printenv LESS | /usr/bin/grep -c -e "-[Rr]"\` -eq 0 ]; then
LESS="\$LESS --RAW-CONTROL-CHARS"
fi
fi
export LESS
EOF
### csh version ###
cat >%i/etc/profile.d/%n.csh < setenv LESSOPEN '| %p/bin/lesspipe.sh %%s'

if ( \$?LESS ) then
if ( "\$LESS" !~ *-{R,r}* ) then
setenv LESS "\$LESS --RAW-CONTROL-CHARS"
endif
else
setenv LESS "--RAW-CONTROL-CHARS"
endif
EOF
/bin/chmod 755 %i/etc/profile.d/%n.*sh
<<
PostInstScript: <<
echo
echo Installation complete. Please start a new shell to get the
echo correct environment setup for lesspipe.
echo
<<
DocFiles: README COPYING ChangeLog INSTALL TODO
Description: Preprocessor for less
DescDetail: <<
lesspipe.sh is an input filter for the pager less. It allows to view
files with binary content, compressed files, archives and files
contained in archives. A large and growing number of formats are
supported both as plain and compressed files using compress, gzip,
bzip2 or zip. Interesting for Mac OS X is the possibity to view BOM
(Bill of Materials) archives, either directly or by just giving the
package name, i.e. less foo.pkg will display the BOM of this package.

Additionally, syntax highlighting for the languages ada, asm, awk, c,
c++, groff, html, xml, java, javascript, lisp, m4, make, pascal,
patch, perl, povray, python, ruby, shellscript and sql is provided.
<<
DescUsage: <<
After installing lesspipe you have to source %p/bin/init.(c)sh before
you can use lesspipe, because it uses the environment variable
LESSOPEN.

Additionally the envrionment variable LESS is set. It feeds the option
'--raw-control-chars' to less which enables syntax highlighting.
<<
DescPackaging: <<
We need to depend on fink >= 0.18.0 which provides the correct
treatment of the '%' sign in the percent expansion needed for
'lesspipe.sh %s'.
<<
License: GPL
Maintainer: Remi Mommsen
Homepage: http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html