aboutsummaryrefslogtreecommitdiff
path: root/graphics/potrace/potrace.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2010-05-22 20:44:19 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-23 23:21:41 -0500
commit1bc5e948b7690e7531e578afa0bd8e44f34e8dfe (patch)
treea77fd0a6f279950655f8830d115f1692b2f4f33e /graphics/potrace/potrace.SlackBuild
parent7f0e4e4da58f04ad4ee44e454653418a56bf990d (diff)
graphics/potrace: Miscellaneous cleanups.
Diffstat (limited to 'graphics/potrace/potrace.SlackBuild')
-rw-r--r--graphics/potrace/potrace.SlackBuild28
1 files changed, 19 insertions, 9 deletions
diff --git a/graphics/potrace/potrace.SlackBuild b/graphics/potrace/potrace.SlackBuild
index 31f6cf8a64569..69eaa3aa4375c 100644
--- a/graphics/potrace/potrace.SlackBuild
+++ b/graphics/potrace/potrace.SlackBuild
@@ -3,14 +3,21 @@
# Slackware build script for potrace
# Written by Kyle Guinn
-set -e
-
PRGNAM=potrace
VERSION=1.8
-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
@@ -24,14 +31,19 @@ elif [ "$ARCH" = "i686" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $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 .
@@ -48,15 +60,13 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--sysconfdir=/etc \
- --localstatedir=/var
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
-( 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 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \