summaryrefslogtreecommitdiff
path: root/games/UrbanTerror/UrbanTerror.SlackBuild
diff options
context:
space:
mode:
authorMatthew Fillpot <mfilpot@gmail.com>2010-05-12 23:29:04 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 23:29:04 +0200
commita12b2d1a1dd57eef106d70e0e7432c0b00848e27 (patch)
tree84ebcef25df964b859fb19b9b7db7c88fb675639 /games/UrbanTerror/UrbanTerror.SlackBuild
parent9b3543e49f8c69b8a71603647b28f9ca7d086dba (diff)
downloadslackbuilds-a12b2d1a1dd57eef106d70e0e7432c0b00848e27.tar.gz
games/UrbanTerror: Added to 12.2 repository
Diffstat (limited to 'games/UrbanTerror/UrbanTerror.SlackBuild')
-rw-r--r--games/UrbanTerror/UrbanTerror.SlackBuild104
1 files changed, 104 insertions, 0 deletions
diff --git a/games/UrbanTerror/UrbanTerror.SlackBuild b/games/UrbanTerror/UrbanTerror.SlackBuild
new file mode 100644
index 0000000000..5947c1fe0c
--- /dev/null
+++ b/games/UrbanTerror/UrbanTerror.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Slackware build script for <UrbanTerror>
+
+# Written by (Matthew Fillpot) (mfilpot at gmail.com)
+
+# urbanterror game is utilizing materials that are covered under the following
+# licenses:
+# Quake 3 SDK license - the game engine source code is closed source
+# GPL license - ioUrbanTerror uses the GPL license and its source code
+# is openly available
+#
+# Full copies of the licenses wil lbe installed in /usr/doc/urbanterror-4.1
+
+# TODO LIST:
+# Move binaries from /usr/libexec to /usr/games
+# setup symlinks in /usr/bin to the execs
+#
+# DATA FILES - /usr/share/games X
+# BIN - /usr/games/
+# exec - symlinks in /usr/bin
+
+PRGNAM=UrbanTerror
+VERSION=${VERSION:-4.1}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+SRCVER=$(echo $VERSION|tr -d ".")
+
+if [ "$ARCH" = "i486" ]; then
+ EXEC="i386"
+elif [ "$ARCH" = "i686" ]; then
+ EXEC="i386"
+elif [ "$ARCH" = "x86_64" ]; then
+ EXEC="x86_64"
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $PKG
+unzip $CWD/${PRGNAM}_${SRCVER}_FULL.zip -d $PKG
+
+mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
+mv $PRGNAM $PKG/usr/share/games/$PRGNAM-$VERSION
+
+# Make the current arch execs executable
+chmod a+x $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.${EXEC}
+chmod a+x $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrTded.${EXEC}
+
+# Move the executables
+mkdir -p $PKG/usr/games/$PRGNAM
+mv $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.${EXEC} \
+ $PKG/usr/games/$PRGNAM/urbanterror
+mv $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrTded.${EXEC} \
+ $PKG/usr/games/$PRGNAM/ioUrTded.${EXEC}
+
+# Make symlinks to allow the executables to use the data files
+cd $PKG/usr/games/$PRGNAM
+ ln -s ../../share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.app .
+ ln -s ../../share/games/$PRGNAM-$VERSION/$PRGNAM/q3ut4 .
+cd -
+
+# Setup symlinks to binaries in /usr/bin
+mkdir -p $PKG/usr/bin
+cd $PKG/usr/bin
+ ln -s ../games/$PRGNAM/urbanterror .
+ ln -s ../games/$PRGNAM/ioUrTded.${EXEC} .
+cd -
+
+# Place the icon and .desktop files
+mkdir $PKG/usr/share/{applications,pixmaps}
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+cat $CWD/q3ut.png > $PKG/usr/share/pixmaps/q3ut.png
+
+# Remove unused files
+rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.exe \
+ $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.url
+if [ $EXEC = i386 ]; then
+ rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.x86_64
+elif [ $EXEC = x86_64 ]; then
+ rm -f $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/*.i386
+fi
+rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/ioUrbanTerror.app/Contents/MacOS
+rm -rf "$PKG/usr/share/games/$PRGNAM-$VERSION/$PRGNAM/q3ut4/Urban Terror on the Web.url"
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/games/$PRGNAM-$VERSION/${PRGNAM}/*.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir $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.tgz