summaryrefslogtreecommitdiffstats
path: root/source/ap/radeontool
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/radeontool')
-rwxr-xr-xsource/ap/radeontool/radeontool.SlackBuild31
-rw-r--r--source/ap/radeontool/slack-desc6
2 files changed, 23 insertions, 14 deletions
diff --git a/source/ap/radeontool/radeontool.SlackBuild b/source/ap/radeontool/radeontool.SlackBuild
index 556ae9764..672fa033e 100755
--- a/source/ap/radeontool/radeontool.SlackBuild
+++ b/source/ap/radeontool/radeontool.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2008, 2010 Robby Workman, Northport, Alabama, USA
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,26 +21,35 @@
# 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)
+PKGNAM=radeontool
VERSION=1.6.3
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-radeontool
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -53,7 +62,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf radeontool-$VERSION
-tar xvf $CWD/radeontool-$VERSION.tar.xz
+tar xvf $CWD/radeontool-$VERSION.tar.xz || exit 1
cd radeontool-$VERSION || exit 1
chown -R root:root .
find . \
@@ -65,10 +74,10 @@ find . \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
-make
-make install DESTDIR=$PKG
+make || exit 1
+make install DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/ap/radeontool/slack-desc b/source/ap/radeontool/slack-desc
index d03929023..d5cb9641b 100644
--- a/source/ap/radeontool/slack-desc
+++ b/source/ap/radeontool/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler--------------------------------------------------|