summaryrefslogtreecommitdiff
path: root/source/ap/radeontool
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/radeontool')
-rwxr-xr-xsource/ap/radeontool/radeontool.SlackBuild39
-rw-r--r--source/ap/radeontool/radeontool.c.diff12
-rw-r--r--source/ap/radeontool/radeontool.info8
3 files changed, 29 insertions, 30 deletions
diff --git a/source/ap/radeontool/radeontool.SlackBuild b/source/ap/radeontool/radeontool.SlackBuild
index 3292a21c..2a5a3fe4 100755
--- a/source/ap/radeontool/radeontool.SlackBuild
+++ b/source/ap/radeontool/radeontool.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008 Robby Workman, Northport, Alabama, USA
+# Copyright 2008, 2010 Robby Workman, Northport, Alabama, USA
# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -22,10 +22,18 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=1.5
-ARCH=${ARCH:-x86_64}
+VERSION=1.6.1
BUILD=${BUILD:-1}
+# Automatically determine architecture for build & packaging:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-radeontool
@@ -36,13 +44,15 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf radeontool-$VERSION
-tar xvf $CWD/radeontool-$VERSION.tar.gz
+tar xvf $CWD/radeontool-$VERSION.tar.bz2
cd radeontool-$VERSION || exit 1
chown -R root:root .
find . \
@@ -51,16 +61,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix a bad include
-zcat $CWD/radeontool.c.diff.gz | patch -p1 || exit 1
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
-gcc -Wall $SLKCFLAGS -o radeontool radeontool.c
-strip --strip-unneeded radeontool
-mkdir -p $PKG/usr/sbin
-cp -a radeontool $PKG/usr/sbin
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Sometimes CHANGES is present, sometimes it isn't.
+# We don't care about noise on stderr. Better than missing docs.
+# So, first we try to copy it:
mkdir -p $PKG/usr/doc/radeontool-$VERSION
cp -a CHANGES $PKG/usr/doc/radeontool-$VERSION
+# Then we take care of any empty directory in case there was no CHANGES file:
+rmdir $PKG/usr/doc/radeontool-$VERSION
+rmdir $PKG/usr/doc
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/ap/radeontool/radeontool.c.diff b/source/ap/radeontool/radeontool.c.diff
deleted file mode 100644
index 156863ed..00000000
--- a/source/ap/radeontool/radeontool.c.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u radeontool-1.5.orig/radeontool.c radeontool-1.5/radeontool.c
---- radeontool-1.5.orig/radeontool.c 2004-02-10 21:50:27.000000000 -0600
-+++ radeontool-1.5/radeontool.c 2008-11-24 13:21:32.895434558 -0600
-@@ -21,7 +21,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <sys/mman.h>
--#include <asm/page.h>
-+#include <sys/user.h>
-
- #include "radeon_reg.h"
-
diff --git a/source/ap/radeontool/radeontool.info b/source/ap/radeontool/radeontool.info
deleted file mode 100644
index 7c7c1c6c..00000000
--- a/source/ap/radeontool/radeontool.info
+++ /dev/null
@@ -1,8 +0,0 @@
-PRGNAM="radeontool"
-VERSION="1.5"
-HOMEPAGE="http://fdd.com/software/radeon/"
-DOWNLOAD="http://fdd.com/software/radeon/radeontool-1.5.tar.gz"
-MD5SUM="8065eebe5a2b163e43b40461bfe49a56"
-MAINTAINER="Robby Workman"
-EMAIL="rw@rlworkman.net"
-APPROVED=""