diff options
author | Matthew Fillpot <mfilpot@gmail.com> | 2010-05-13 00:25:55 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 00:25:55 +0200 |
commit | b08f62b597f64b47dc525631126d6b5c5c54476d (patch) | |
tree | 9a280b3162f97a4e11012044a4875e4db47f7399 /games/UrbanTerror/UrbanTerror.SlackBuild | |
parent | 5963015b2455c7e6e2527bbb3e6a986a68156c2b (diff) | |
download | slackbuilds-b08f62b597f64b47dc525631126d6b5c5c54476d.tar.gz |
games/UrbanTerror: Updated for version 4.1
Diffstat (limited to 'games/UrbanTerror/UrbanTerror.SlackBuild')
-rw-r--r-- | games/UrbanTerror/UrbanTerror.SlackBuild | 86 |
1 files changed, 35 insertions, 51 deletions
diff --git a/games/UrbanTerror/UrbanTerror.SlackBuild b/games/UrbanTerror/UrbanTerror.SlackBuild index 5947c1fe0c..4cf3998323 100644 --- a/games/UrbanTerror/UrbanTerror.SlackBuild +++ b/games/UrbanTerror/UrbanTerror.SlackBuild @@ -10,20 +10,12 @@ # 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 +# Full copies of the licenses will be installed in /usr/doc/urbanterror-4.1 PRGNAM=UrbanTerror VERSION=${VERSION:-4.1} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -31,74 +23,66 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -SRCVER=$(echo $VERSION|tr -d ".") +ZIP_VERS=$(echo $VERSION|tr -d ".") if [ "$ARCH" = "i486" ]; then EXEC="i386" + LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} elif [ "$ARCH" = "i686" ]; then EXEC="i386" + LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} elif [ "$ARCH" = "x86_64" ]; then EXEC="x86_64" + LIBDIRSUFFIX=${LIBDIRSUFFIX:-"64"} +else + echo "Unrecognized architecture type! Check the script: $0" + exit 1 fi +CLIENT_EXEC=${CLIENT_EXEC:-ioUrbanTerror.${EXEC}} +SERVER_EXEC=${SERVER_EXEC:-ioUrTded.${EXEC}} + 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 +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX} +unzip $CWD/${PRGNAM}_${ZIP_VERS}_FULL.zip -d $PKG/usr/lib${LIBDIRSUFFIX} # 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 - +chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/{${CLIENT_EXEC},${SERVER_EXEC}} -# 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} . +# Create symlinks in /usr/games +mkdir -p $PKG/usr/games +cd $PKG/usr/games + ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/${CLIENT_EXEC} urbanterror + ln -s ../lib${LIBDIRSUFFIX}/$PRGNAM/${SERVER_EXEC} . cd - -# Place the icon and .desktop files -mkdir $PKG/usr/share/{applications,pixmaps} +# Correct the curl dependancy +echo -e "seta cl_cURLLib \"libcurl.so.4.1.1\"" >> \ + $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/q3ut4/autoexec.cfg + +# Add a menu entry and icon +mkdir -p $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" +# Remove unused files from the package +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/{,q3ut4/}*.{doc,exe,url} +rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/ioUrbanTerror.app/Contents/MacOS +[ "$EXEC" != "i386" ] && rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/*.i386 +[ "$EXEC" != "x86_64" ] && rm -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/*.x86_64 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -mv $PKG/usr/share/games/$PRGNAM-$VERSION/${PRGNAM}/*.txt \ - $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/ioUrbanTerror_* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cp $CWD/docs/*.txt $PKG/usr/doc/$PRGNAM-$VERSION/ mkdir $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +cp -p $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 +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |