From 845051da88fc87a43a7d2d5de7cfa303a0f779fa Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Tue, 18 May 2010 10:37:47 -0500 Subject: libraries/wv: Miscellaneous script cleanup --- libraries/wv/slack-desc | 10 +++++----- libraries/wv/wv.SlackBuild | 28 +++++++++++++++++----------- 2 files changed, 22 insertions(+), 16 deletions(-) (limited to 'libraries/wv') diff --git a/libraries/wv/slack-desc b/libraries/wv/slack-desc index f80deb2630..dbffa9b6f8 100644 --- a/libraries/wv/slack-desc +++ b/libraries/wv/slack-desc @@ -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: diff --git a/libraries/wv/wv.SlackBuild b/libraries/wv/wv.SlackBuild index a727f75c70..95b67ae213 100644 --- a/libraries/wv/wv.SlackBuild +++ b/libraries/wv/wv.SlackBuild @@ -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 -- cgit v1.2.3