summaryrefslogtreecommitdiff
path: root/office/antiword/antiword.SlackBuild
diff options
context:
space:
mode:
authortitopoquito <titopoquito@gmail.com>2010-05-12 17:44:34 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 17:44:34 +0200
commitb1b6bb907f5b3ed35617b35c037800224d524719 (patch)
tree7aff51e00683d6151a7717b722bef4bb47717111 /office/antiword/antiword.SlackBuild
parent5a1d923a220b3615123671d28ed5ce0c035fabc4 (diff)
downloadslackbuilds-b1b6bb907f5b3ed35617b35c037800224d524719.tar.gz
office/antiword: Updated for version 0.37
Diffstat (limited to 'office/antiword/antiword.SlackBuild')
-rw-r--r--office/antiword/antiword.SlackBuild43
1 files changed, 26 insertions, 17 deletions
diff --git a/office/antiword/antiword.SlackBuild b/office/antiword/antiword.SlackBuild
index d7de2d8d21..4179473007 100644
--- a/office/antiword/antiword.SlackBuild
+++ b/office/antiword/antiword.SlackBuild
@@ -1,6 +1,8 @@
#!/bin/sh
+
# Slackware build script for antiword
-# Copyright 2007 by titopoquito (titopoquito@cooltoad.com)
+
+# Copyright 2007-2009 by titopoquito (titopoquito@gmail.com)
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that
# the above copyright notice and this permission notice appear in all
@@ -18,17 +20,15 @@
# 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.
-# ---------------------------------------------------------------------------
-# Modified by the SlackBuilds.org Project
-# Exit on most errors
-set -e
+# Modified by the SlackBuilds.org Project
PRGNAM=antiword
VERSION=0.37
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -36,36 +36,45 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# let antiword be installed to /usr instead of /usr/local
-# since there is no configure utility here, we'll patch the Makefile
-patch -p0 < $CWD/patch.Makefile
-
-# call "make all" instead the usual "make" and "make global_install"
-# instead of "make install" to make the binary accessable by all users
-make all
-make global_install DESTDIR=$PKG
+make \
+ all \
+ OPT="$SLKCFLAGS" \
+ GLOBAL_INSTALL_DIR=/usr/bin
+make \
+ global_install \
+ GLOBAL_INSTALL_DIR=/usr/bin \
+ DESTDIR=$PKG
( 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
+ 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
)
# The man page is NOT installed correctly. Copy it manually ...
mkdir -p $PKG/usr/man/man1
-gzip -9cf Docs/antiword.1 > $PKG/usr/man/man1/antiword.1.gz
+gzip -9c Docs/antiword.1 > $PKG/usr/man/man1/antiword.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a Docs/* $PKG/usr/doc/$PRGNAM-$VERSION