summaryrefslogtreecommitdiff
path: root/games/brainparty
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja[at]gmail[dot]com>2010-04-16 21:50:02 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:38:06 +0200
commit2420f03c14cbc8fc2d11fceefbe4d10dbb80aa44 (patch)
treee67c52ecdec34713c9511d6dfd16fe0d0a8a6ce3 /games/brainparty
parent39e7e607e2d6a765ef0e696d8d79422fa8e93f0f (diff)
downloadslackbuilds-2420f03c14cbc8fc2d11fceefbe4d10dbb80aa44.tar.gz
games/brainparty: Added (puzzle game)
Diffstat (limited to 'games/brainparty')
-rw-r--r--games/brainparty/README10
-rw-r--r--games/brainparty/brainparty.SlackBuild73
-rw-r--r--games/brainparty/brainparty.desktop10
-rw-r--r--games/brainparty/brainparty.info10
-rw-r--r--games/brainparty/doinst.sh4
-rw-r--r--games/brainparty/patches/brainparty-0.5-data-directory.patch12
-rw-r--r--games/brainparty/patches/brainparty-0.5-savegame.patch27
-rw-r--r--games/brainparty/slack-desc19
8 files changed, 165 insertions, 0 deletions
diff --git a/games/brainparty/README b/games/brainparty/README
new file mode 100644
index 0000000000..e60eb503c2
--- /dev/null
+++ b/games/brainparty/README
@@ -0,0 +1,10 @@
+Brain Party is a fun, free puzzle game for all the family that's made up of 36
+minigames designed to push your brain to its limits by testing memory, logic,
+mathematics, reaction time and more! Brain Party is split into two modes: test
+mode gives you five minigames in a row and adds up your brain weight to see how
+smart you are, and practise mode lets you play your favourite minigames as often
+as you want. If you do well enough, there are six extra minigames that can be
+unlocked as well as a new game mode designed to keep you playing and enjoying
+your favourite games even longer.
+
+Brainparty requires SDL_gfx.
diff --git a/games/brainparty/brainparty.SlackBuild b/games/brainparty/brainparty.SlackBuild
new file mode 100644
index 0000000000..1692c6037d
--- /dev/null
+++ b/games/brainparty/brainparty.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for brainparty
+
+# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
+
+PRGNAM=brainparty
+VERSION=${VERSION:-0.5}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+tar xvf $CWD/${PRGNAM}${VERSION}.tar.gz
+cd $PRGNAM
+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 {} \;
+
+# Save directory patch. Data directory patch. Use custom SLKCFLAGS.
+patch -p1 < $CWD/patches/brainparty-0.5-savegame.patch
+patch -p1 < $CWD/patches/brainparty-0.5-data-directory.patch
+sed -i 's|CXXFLAGS =|CXXFLAGS +=|g' Makefile
+
+CXXFLAGS="$SLKCFLAGS" make
+
+mkdir -p $PKG/usr/bin $PKG/usr/share/$PRGNAM/Content
+install -m 0644 Content/* $PKG/usr/share/$PRGNAM/Content
+install -m 0755 $PRGNAM $PKG/usr/bin
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications
+install -m 0644 Content/icon.bmp $PKG/usr/share/pixmaps/$PRGNAM.bmp
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING CREDITS 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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/brainparty/brainparty.desktop b/games/brainparty/brainparty.desktop
new file mode 100644
index 0000000000..a37eb02e10
--- /dev/null
+++ b/games/brainparty/brainparty.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Name=Brainparty
+GenericName=Cross platform puzzle game
+Comment=Brain Party is a fun and free puzzle game
+Icon=/usr/share/pixmaps/brainparty.bmp
+Exec=brainparty
+Categories=Game;
+Terminal=false
+StartupNotify=false
diff --git a/games/brainparty/brainparty.info b/games/brainparty/brainparty.info
new file mode 100644
index 0000000000..ac0e0e0389
--- /dev/null
+++ b/games/brainparty/brainparty.info
@@ -0,0 +1,10 @@
+PRGNAM="brainparty"
+VERSION="0.5"
+HOMEPAGE="http://www.tuxradar.com/brainparty"
+DOWNLOAD="http://www.tuxradar.com/files/brainparty/brainparty0.5.tar.gz"
+MD5SUM="dca5314fd32fa0b0f502eec5846ff5e9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Larry Hajali"
+EMAIL="larryhaja[at]gmail[dot]com"
+APPROVED="dsomero"
diff --git a/games/brainparty/doinst.sh b/games/brainparty/doinst.sh
new file mode 100644
index 0000000000..4e8ba7071d
--- /dev/null
+++ b/games/brainparty/doinst.sh
@@ -0,0 +1,4 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/games/brainparty/patches/brainparty-0.5-data-directory.patch b/games/brainparty/patches/brainparty-0.5-data-directory.patch
new file mode 100644
index 0000000000..10a35fc0eb
--- /dev/null
+++ b/games/brainparty/patches/brainparty-0.5-data-directory.patch
@@ -0,0 +1,12 @@
+diff -Naur brainparty.orig/main.cpp brainparty/main.cpp
+--- brainparty.orig/main.cpp 2010-03-11 00:15:34.000000000 +0000
++++ brainparty/main.cpp 2010-04-03 22:35:45.000000000 +0000
+@@ -26,6 +26,8 @@
+ BPGame* Game;
+
+ int main(int argc, char *argv[]) {
++ chdir("/usr/share/brainparty");
++
+ if ( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) {
+ fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
+ exit(1);
diff --git a/games/brainparty/patches/brainparty-0.5-savegame.patch b/games/brainparty/patches/brainparty-0.5-savegame.patch
new file mode 100644
index 0000000000..1b7b437ab4
--- /dev/null
+++ b/games/brainparty/patches/brainparty-0.5-savegame.patch
@@ -0,0 +1,27 @@
+--- a/BPGame.cpp 2010-03-11 00:15:34.000000000 +0000
++++ b/BPGame.cpp 2010-04-02 04:17:02.640735675 +0100
+@@ -1294,8 +1294,10 @@ void BPGame::LoadSettings() {
+ Secret1 = Secret2 = Secret3 = Secret4 = false;
+ NumUnlockedGames = 0;
+
++ string file = string("/.brainparty");
++ file.insert(0, getenv("HOME"));
+ ifstream ifs;
+- ifs.open(".brainparty");
++ ifs.open(file.c_str());
+
+ FirstRun = false;
+
+@@ -1425,8 +1428,11 @@ void BPGame::LoadSettings() {
+ }
+
+ void BPGame::SaveSettings() {
++ string file = string("/.brainparty");
++ file.insert(0, getenv("HOME"));
++
+ ofstream savefile;
+- savefile.open(".brainparty");
++ savefile.open(file.c_str());
+ savefile << EnableSound << endl;
+ savefile << EnableMusic << endl;
+ savefile << endl;
diff --git a/games/brainparty/slack-desc b/games/brainparty/slack-desc
new file mode 100644
index 0000000000..894f8601ac
--- /dev/null
+++ b/games/brainparty/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+brainparty: brainparty (puzzle game)
+brainparty:
+brainparty: Brain Party is a fun, free puzzle game for all the family that's made
+brainparty: up of 36 minigames designed to push your brain to its limits by
+brainparty: testing memory, logic, mathematics, reaction time and more!
+brainparty:
+brainparty: Homepage: http://www.tuxradar.com/brainparty
+brainparty:
+brainparty:
+brainparty:
+brainparty: