summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-11-16 13:18:55 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-16 13:58:36 -0600
commitcd8bb83a702bf531528426c939de8b8740350996 (patch)
treef62ce83aea6af9afbe476dd58fb8d59e6b34cd2b
parent067849a1a0bb1f6ee5857f83d8521900f8aac11b (diff)
downloadslackbuilds-cd8bb83a702bf531528426c939de8b8740350996.tar.gz
games/foobillardplus: Added (opengl billard game).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--games/foobillardplus/README2
-rw-r--r--games/foobillardplus/doinst.sh9
-rw-r--r--games/foobillardplus/foobillardplus.SlackBuild116
-rw-r--r--games/foobillardplus/foobillardplus.desktop10
-rw-r--r--games/foobillardplus/foobillardplus.info10
-rw-r--r--games/foobillardplus/slack-desc19
6 files changed, 166 insertions, 0 deletions
diff --git a/games/foobillardplus/README b/games/foobillardplus/README
new file mode 100644
index 0000000000..b1c5a582b7
--- /dev/null
+++ b/games/foobillardplus/README
@@ -0,0 +1,2 @@
+FooBillard++ is a free (libre; licensed under GPL2) OpenGL billard game
+based on FooBillard by Florian Berger.
diff --git a/games/foobillardplus/doinst.sh b/games/foobillardplus/doinst.sh
new file mode 100644
index 0000000000..3e5691a052
--- /dev/null
+++ b/games/foobillardplus/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/foobillardplus/foobillardplus.SlackBuild b/games/foobillardplus/foobillardplus.SlackBuild
new file mode 100644
index 0000000000..6f078a722f
--- /dev/null
+++ b/games/foobillardplus/foobillardplus.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Slackware build script for foobillardplus
+
+# Copyright 2013 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 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.
+
+# forked from the foobillard's one, written
+# by Zbigniew Baniewski, zbigniew.baniewski@gmail.com
+
+PRGNAM=foobillardplus
+VERSION=${VERSION:-3.42beta}
+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
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+aclocal --force
+autoconf -f
+autoheader -f
+automake -a -c -f
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr/share \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG \
+ prefix=$PKG/usr/share datadir=$PKG/usr/share/$PRGNAM/data
+
+find $PKG -print0 | xargs -0 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/pixmaps $PKG/usr/share/applications \
+ $PKG/usr/bin $PKG/usr/doc/$PRGNAM-$VERSION
+ln -s /usr/share/$PRGNAM/bin/$PRGNAM $PKG/usr/bin/$PRGNAM
+
+( cd $PKG/usr/share
+ rm -f INSTALL
+ mv $PRGNAM.png $PRGNAM.xbm $PKG/usr/share/pixmaps
+ mv $PRGNAM.desktop $PKG/usr/share/applications
+ mv AUTHORS ChangeLog COPYING README TODO $PKG/usr/doc/$PRGNAM-$VERSION )
+
+# Fix hardcoded paths in the desktop file
+sed -i \
+ -e "s|/opt/foobillardplus/bin/|/usr/bin/|" \
+ -e "s|/opt/foobillardplus/|/usr/share/pixmaps/|" \
+ $PKG/usr/share/applications/$PRGNAM.desktop
+
+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/foobillardplus/foobillardplus.desktop b/games/foobillardplus/foobillardplus.desktop
new file mode 100644
index 0000000000..ff52ee0609
--- /dev/null
+++ b/games/foobillardplus/foobillardplus.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=FooBillard++
+GenericName=OpenGL billard game
+Comment=Free OpenGL billard game for Linux
+Exec=foobillard
+Icon=foobillard
+Terminal=false
+Type=Application
+Categories=Game;
diff --git a/games/foobillardplus/foobillardplus.info b/games/foobillardplus/foobillardplus.info
new file mode 100644
index 0000000000..9793c120dc
--- /dev/null
+++ b/games/foobillardplus/foobillardplus.info
@@ -0,0 +1,10 @@
+PRGNAM="foobillardplus"
+VERSION="3.42beta"
+HOMEPAGE="http://foobillard.sourceforge.net/"
+DOWNLOAD="http://downloads.sourceforge.net/foobillardplus/foobillardplus-3.42beta.tar.gz"
+MD5SUM="a28beae7247fbd925335f1aea9b20b73"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Matteo Bernardini"
+EMAIL="ponce@slackbuilds.org"
diff --git a/games/foobillardplus/slack-desc b/games/foobillardplus/slack-desc
new file mode 100644
index 0000000000..a7bb475f23
--- /dev/null
+++ b/games/foobillardplus/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+foobillardplus: FooBillard++
+foobillardplus:
+foobillardplus: OpenGL billard game
+foobillardplus:
+foobillardplus: http://foobillardplus.sourceforge.net/
+foobillardplus:
+foobillardplus:
+foobillardplus:
+foobillardplus:
+foobillardplus:
+foobillardplus: