libraries/wv: Miscellaneous script cleanup

This commit is contained in:
Robby Workman 2010-05-18 10:37:47 -05:00
parent 22f7b6fe00
commit 845051da88
2 changed files with 22 additions and 16 deletions

View file

@ -7,13 +7,13 @@
|-----handy-ruler---------------------------------------------------------|
wv: wv (MS Word document import library)
wv:
wv:
wv: wv converts Word 2,6,7,8,9 files to html and latex.
wv: The Word 2 conversion is still incomplete (no formatting),
wv: but it will do a passable job extracting the text, which
wv: is what you probably want anyway.
wv:
wv:
wv: Homepage: http://wvware.sourceforge.net/
wv:
wv:
wv:
wv:
wv:
wv:

View file

@ -24,10 +24,19 @@
PRGNAM=wv
VERSION=1.2.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@ -42,6 +51,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
@ -73,17 +85,11 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
)
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION