summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJože Zobec <jozze.zepl@gmail.com>2012-12-29 19:25:57 +0100
committerMatteo Bernardini <ponce@slackbuilds.org>2012-12-29 19:26:58 +0100
commit881f6be2d508dcf466ad98cc83f790aefb7b69b4 (patch)
tree5f1e1784d2a9cec98e0f6bcfdb9358cd5ef03e9c
parent5b4d7565250281b9d9da048bdf72be57ba520da7 (diff)
downloadslackbuilds-881f6be2d508dcf466ad98cc83f790aefb7b69b4.tar.gz
games/ufoai: Added (opengl tactical strategy game).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--games/ufoai/README9
-rw-r--r--games/ufoai/doinst.sh9
-rw-r--r--games/ufoai/slack-desc19
-rw-r--r--games/ufoai/ufoai.SlackBuild138
-rw-r--r--games/ufoai/ufoai.info12
5 files changed, 187 insertions, 0 deletions
diff --git a/games/ufoai/README b/games/ufoai/README
new file mode 100644
index 0000000000..327d8413d4
--- /dev/null
+++ b/games/ufoai/README
@@ -0,0 +1,9 @@
+UFO: Alien Invasion
+
+This is a squad based tactical strategy game, heavily inspired by the
+X-COM PC games, but with twist. Old veterans will appreciate how the
+game captures the spirit of the UFO: Enemy Unknown, the first one in
+the X-COM series. It tries to combine military realism with science
+fiction with the weirdness of an alien invasion. The game, however,
+is not a remake or a sequel.
+It runs on a modified Quake 2 game engine.
diff --git a/games/ufoai/doinst.sh b/games/ufoai/doinst.sh
new file mode 100644
index 0000000000..3e5691a052
--- /dev/null
+++ b/games/ufoai/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/ufoai/slack-desc b/games/ufoai/slack-desc
new file mode 100644
index 0000000000..1ed8212173
--- /dev/null
+++ b/games/ufoai/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------------------------------------------------------|
+ufoai: UFO: Alien Invasion
+ufoai:
+ufoai: This is a squad based tactical strategy game, heavily inspired by the
+ufoai: X-COM PC games, but with twist. Old veterans will appreciate how the
+ufoai: game captures the spirit of the UFO: Enemy Unknown, the first one in
+ufoai: the X-COM series. It tries to combine military realim with science
+ufoai: fiction with the weirdness of an alien invasion. The game, however,
+ufoai: is not a remake or a sequel.
+ufoai: It runs on a modified Quake 2 game engine.
+ufoai:
+ufoai: Homepage: http://ufoai.org
diff --git a/games/ufoai/ufoai.SlackBuild b/games/ufoai/ufoai.SlackBuild
new file mode 100644
index 0000000000..901b5abacb
--- /dev/null
+++ b/games/ufoai/ufoai.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Slackware build script for ufoai
+
+# Written by Joze Zobec <jozze.zepl@gmail.com>
+
+# 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=ufoai
+VERSION=${VERSION:-2.4}
+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
+
+# If gtksourceview is available build the radiant editor
+# This seems broken ATM, but we will be ready when it will start working
+if pkg-config --exists gtksourceview-2.0 ; then
+ radiant=""
+ # radiant="--enable-uforadiant"
+else
+ radiant=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2
+mv $PRGNAM-$VERSION-source $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-data.tar
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --datadir=/usr/share/games/$PRGNAM \
+ --enable-release \
+ --enable-sse \
+ --enable-profiling \
+ --enable-memory \
+ --enable-ufo \
+ --enable-ufoded \
+ --enable-ufoslicer \
+ $radiant
+
+make
+make lang
+make maps
+make pk3
+
+BINARIES=
+
+# Manual install: first the data...
+mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin
+cp -a base $PKG/usr/share/games/$PRGNAM/
+if [ "$radiant" = "--enable-uforadiant" ]; then
+ cp -a radiant $PKG/usr/share/games/$PRGNAM/
+ rm -f $PKG/usr/share/games/$PRGNAM/radiant/uforadiant
+ BINARIES="radiant/uforadiant"
+fi
+
+# ...then the binaries
+BINARIES="$BINARIES ufo ufoded ufo2map ufomodel memory ufoslicer"
+install -m 0755 $BINARIES $PKG/usr/bin/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneded 2> /dev/null || true
+
+# .desktop files, icons and man pages...
+mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps $PKG/usr/man/man6
+install -m 0644 debian/*.desktop $PKG/usr/share/applications/
+install -m 0644 debian/*.xpm $PKG/usr/share/pixmaps/
+install -m 0644 debian/*.6 $PKG/usr/man/man6/
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+# Remove wrong execution path from .desktop files
+# and get rid of uforadiant stuff if we don't have uforadiant
+sed -i "s|/usr/games/||" $PKG/usr/share/applications/*.desktop
+[ "$radiant" = "" ] && rm $PKG/usr/share/applications/uforadiant.desktop \
+ $PKG/usr/man/man6/uforadiant.6.gz $PKG/usr/share/pixmaps/uforadiant.xpm
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSES README COPYING \
+ $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/ufoai/ufoai.info b/games/ufoai/ufoai.info
new file mode 100644
index 0000000000..bc52fdfc75
--- /dev/null
+++ b/games/ufoai/ufoai.info
@@ -0,0 +1,12 @@
+PRGNAM="ufoai"
+VERSION="2.4"
+HOMEPAGE="http://ufoai.org"
+DOWNLOAD="http://downloads.sourceforge.net/ufoai/ufoai-2.4-source.tar.bz2 \
+ http://downloads.sourceforge.net/ufoai/ufoai-2.4-data.tar"
+MD5SUM="d7e88aee0ea94149c8b9d90eb6c21ba9 \
+ 4f3f343754a4aae401582021901c4737"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Jože Zobec"
+EMAIL="jozze.zepl@gmail.com"