summaryrefslogtreecommitdiffstats
path: root/libwiimote
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-07-19 22:08:44 +0000
committer Eric Hameleers <alien@slackware.com>2010-07-19 22:08:44 +0000
commitddef93689cae47a81492a8734c0b8e1c5a038098 (patch)
tree4f9cb4475569cc87eb16c40d6801fc2c29522f95 /libwiimote
parent63ab4b2fcbc21dc21d97720b37c83d96ee8537a9 (diff)
downloadasb-ddef93689cae47a81492a8734c0b8e1c5a038098.tar.gz
asb-ddef93689cae47a81492a8734c0b8e1c5a038098.tar.xz
Updated for Slackware 13.1
Diffstat (limited to 'libwiimote')
-rwxr-xr-xlibwiimote/build/libwiimote.SlackBuild51
1 files changed, 31 insertions, 20 deletions
diff --git a/libwiimote/build/libwiimote.SlackBuild b/libwiimote/build/libwiimote.SlackBuild
index ee017fec..b40acf98 100755
--- a/libwiimote/build/libwiimote.SlackBuild
+++ b/libwiimote/build/libwiimote.SlackBuild
@@ -32,6 +32,8 @@
# Changelog:
# 0.4-1: 07/Sep/2009 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 0.4-2: 20/jul/2010 by Eric Hameleers <alien@slackware.com>
+# * Rebuilt for Slackware 13.1.
#
# Run 'sh libwiimote.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -43,8 +45,7 @@
PRGNAM=libwiimote
VERSION=${VERSION:-0.4}
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -65,28 +66,39 @@ SRCURL="http://downloads.sourceforge.net/project/${PRGNAM}/${PRGNAM}/${VERSION}/
## --- with a little luck, you won't have to edit below this point --- ##
##
-# Exit the script on errors:
-set -e
-trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
-# Catch unitialized variables:
-set -u
-P1=${1:-1}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
case "$ARCH" in
i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
- powerpc) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
- ;;
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
+ *) SLKCFLAGS="-O2"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
esac
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
# Create working directories:
mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
@@ -136,7 +148,7 @@ cat $SRCDIR/libwiimote-0.4-includedir.patch | patch -p1 --verbose
cat $SRCDIR/libwiimote-0.4-soname.patch | patch -p1 --verbose
sed -i -e 's|#-D_DISABLE_NONBLOCK_UPDATES -D_DISABLE_AUTO_SELECT_DEVICE|-D_DISABLE_BLOCKING_UPDATE|' config.mk.in
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+chmod -R u+w,go+r-w,a+X-s .
echo Building ...
autoconf
@@ -157,11 +169,7 @@ make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
-cat $SRCDIR/$(basename $0) | sed \
- -e "/^VERSION=/s/:-.*}/:-$VERSION}/" \
- -e "/^ARCH=/s/:-.*}/:-$ARCH}/" \
- -e "/^BUILD=/s/:-.*}/:-$BUILD}/" \
- > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
@@ -187,3 +195,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+# Restore the original umask:
+umask ${_UMASK_}
+