aboutsummaryrefslogtreecommitdiff
path: root/graphics/potrace/potrace.SlackBuild
diff options
context:
space:
mode:
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 \