diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2010-05-13 00:58:07 +0200 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-05-13 00:58:07 +0200 |
commit | e1c8cf162bc4eb3a4ac0087acc86cb1302d9e62b (patch) | |
tree | 9df165ab58caa7ccee0ee65f021034af565c4369 /games/bsnes/bsnes.SlackBuild | |
parent | af3ec8284e9a5395c3c627b51022387cbebfd59d (diff) | |
download | slackbuilds-e1c8cf162bc4eb3a4ac0087acc86cb1302d9e62b.tar.gz |
games/bsnes: Added to 13.0 repository
Diffstat (limited to 'games/bsnes/bsnes.SlackBuild')
-rw-r--r-- | games/bsnes/bsnes.SlackBuild | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/games/bsnes/bsnes.SlackBuild b/games/bsnes/bsnes.SlackBuild new file mode 100644 index 0000000000..636c34d358 --- /dev/null +++ b/games/bsnes/bsnes.SlackBuild @@ -0,0 +1,92 @@ +#!/bin/sh + +# Slackware build script for bsnes + +# Written by Larry Hajali <larryhaja[at]gmail[dot]com> + +PRGNAM=bsnes +VERSION=${VERSION:-0.058} +SRCVER=${VERSION:2} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# Determine if we use pulseaudio with build. Default is no. +# Also backport bsnes for Slackware <= 13.0. +USE_PULSE=${USE_PULSE:-no} +OLD_SLACK=${OLD_SLACK:-no} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +tar xvf $CWD/${PRGNAM}_v${SRCVER}.tar.bz2 +cd src +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 {} \; + +# Use custom SLKCFLAGS. +sed -i "s|-O3|${SLKCFLAGS}|" Makefile + +# For older Slackware versions that have *-qt4 extension. +if [ "$OLD_SLACK" == "yes" ]; then + patch -p1 < $CWD/Makefile-qt.patch +fi + +# Determine if we get rid of pulseaudio support. +if [ "$USE_PULSE" == "no" ]; then + sed -i \ + -e 's|audio\.pulseaudio ||' \ + -e '/pulse/d' Makefile +fi + +make \ + platform=x \ + compiler=gcc \ + enable_gzip=true \ + enable_jma=true \ + prefix=/usr + +make install DESTDIR=$PKG prefix=/usr + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + data/*.html \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find $PKG/usr/doc -type f -exec chmod 0644 {} \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |