diff options
author | B. Watson <yalhcru@gmail.com> | 2010-06-13 15:18:16 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-13 15:18:16 -0500 |
commit | 84f6dbb0902fb148be6d9706768c4abcd6eb623e (patch) | |
tree | 0129e32d43f4a8a222f3afa118b5b330a7b44fa6 /misc/cwiid/cwiid.SlackBuild | |
parent | 28ac7ec060e16a1694d8954904bf31043e1b734b (diff) | |
download | slackbuilds-84f6dbb0902fb148be6d9706768c4abcd6eb623e.tar.gz |
misc/cwiid: Added (tools for the Nintendo Wiimote)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'misc/cwiid/cwiid.SlackBuild')
-rw-r--r-- | misc/cwiid/cwiid.SlackBuild | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/misc/cwiid/cwiid.SlackBuild b/misc/cwiid/cwiid.SlackBuild new file mode 100644 index 0000000000..f6cba00068 --- /dev/null +++ b/misc/cwiid/cwiid.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for cwiid + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=cwiid +VERSION=${VERSION:-0.6.00} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG/usr $PKG/etc $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Patch against newer bluez +patch -p1 < $CWD/bluez_4_api_changes.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-ldconfig \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# Remove static library. +rm -f $PKG/usr/lib$LIBDIRSUFFIX/libcwiid.a + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |