aboutsummaryrefslogtreecommitdiff
path: root/graphics/mftrace/mftrace.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mftrace/mftrace.SlackBuild')
-rw-r--r--graphics/mftrace/mftrace.SlackBuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/graphics/mftrace/mftrace.SlackBuild b/graphics/mftrace/mftrace.SlackBuild
index a3baf971fc146..257dba30c558f 100644
--- a/graphics/mftrace/mftrace.SlackBuild
+++ b/graphics/mftrace/mftrace.SlackBuild
@@ -1,19 +1,17 @@
#!/bin/sh
# Slackware build script for mftrace
-# Written by Kyle Guinn
+# Written by Kyle Guinn <elyk03@gmail.com>
PRGNAM=mftrace
-VERSION=1.2.16
+VERSION=${VERSION:-1.2.17}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -23,18 +21,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+DOCS="COPYING ChangeLog README*"
+
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -43,33 +43,34 @@ 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 .
+chmod -R u+w,go+r-w,a-st .
# Make it support $SLKCFLAGS
sed -i "s/^CFLAGS =/CFLAGS +=/" GNUmakefile.in
./configure \
--prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION
-CFLAGS="$SLKCFLAGS" make
+CFLAGS="$SLKCFLAGS" \
+ make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING ChangeLog README* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install