summaryrefslogtreecommitdiffstats
path: root/system/xrestop/xrestop.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/xrestop/xrestop.SlackBuild')
-rw-r--r--system/xrestop/xrestop.SlackBuild31
1 files changed, 21 insertions, 10 deletions
diff --git a/system/xrestop/xrestop.SlackBuild b/system/xrestop/xrestop.SlackBuild
index e6bd617724..30d84989e2 100644
--- a/system/xrestop/xrestop.SlackBuild
+++ b/system/xrestop/xrestop.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for xrestop
#
-# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
+# Copyright 2009-2022 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,28 +22,38 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=xrestop
-VERSION=${VERSION:-0.4}
+VERSION=${VERSION:-0.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -eu
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -60,7 +70,7 @@ 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.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -75,6 +85,7 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
--build=$ARCH-slackware-linux
make
@@ -83,9 +94,9 @@ make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION $PKG/install
-cp -a AUTHORS COPYING ChangeLog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE