summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/xrestop/xrestop.SlackBuild18
1 files changed, 13 insertions, 5 deletions
diff --git a/system/xrestop/xrestop.SlackBuild b/system/xrestop/xrestop.SlackBuild
index c54724953e..c596b57cbf 100644
--- a/system/xrestop/xrestop.SlackBuild
+++ b/system/xrestop/xrestop.SlackBuild
@@ -14,17 +14,24 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+set -eu
+
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
rm -rf $PKG
mkdir -p $TMP $PKG
-cd $TMP
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -34,10 +41,11 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
- || exit 1
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux
-make || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make
+make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man?/*