summaryrefslogtreecommitdiff
path: root/games/KoboDeluxe/KoboDeluxe.SlackBuild
diff options
context:
space:
mode:
authorBlack Rider <black_rider@esdebian.org>2011-10-21 16:13:44 -0200
committerNiels Horn <niels.horn@slackbuilds.org>2011-10-21 16:13:44 -0200
commita7cde684cf1810436bce10d2702250f4845bcdd6 (patch)
tree2701f39509260a0b9dfd8fd47ff95800825e8ac8 /games/KoboDeluxe/KoboDeluxe.SlackBuild
parent008170dda60dfca27329802260398cd997f9abca (diff)
downloadslackbuilds-a7cde684cf1810436bce10d2702250f4845bcdd6.tar.gz
games/KoboDeluxe: Added (Simple space shooting game)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'games/KoboDeluxe/KoboDeluxe.SlackBuild')
-rw-r--r--games/KoboDeluxe/KoboDeluxe.SlackBuild108
1 files changed, 108 insertions, 0 deletions
diff --git a/games/KoboDeluxe/KoboDeluxe.SlackBuild b/games/KoboDeluxe/KoboDeluxe.SlackBuild
new file mode 100644
index 0000000000..df7c95693c
--- /dev/null
+++ b/games/KoboDeluxe/KoboDeluxe.SlackBuild
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+# Slackware build script for Kobo Deluxe
+
+# Written by Black Rider <black_rider@esdebian.org>
+
+# This script is of public domain. It can be distributed, modified and used as desired.
+
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PRGNAM=KoboDeluxe
+VERSION=0.5.1
+BUILD=${BUILD:-1}
+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 $OUTPUT $PKG/install
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2
+cp -t $TMP $CWD/kobodeluxe-0.5.1-glibc2.10.patch $CWD/kobodeluxe-gcc-4.3.patch
+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 {} \;
+
+# This patches are incuded to fix compilation bugs.
+# I want to thank the Arch comunity for making them availible.
+
+patch -p0 <$TMP/kobodeluxe-0.5.1-glibc2.10.patch
+patch -p0 <$TMP/kobodeluxe-gcc-4.3.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --bindir=/usr/games \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --sharedstatedir=/var/games \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING README README.xkobo README.jp README.xkobo.jp README.sfont ChangeLog TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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}