summaryrefslogtreecommitdiff
path: root/games/assaultcube/assaultcube.SlackBuild
diff options
context:
space:
mode:
authorlarryhaja <larryhaja@gmail.com>2013-11-13 18:57:06 -0800
committerRobby Workman <rworkman@slackbuilds.org>2013-11-14 00:04:01 -0600
commit9c616aa23c66f6845e3ef8319334489b092fa63e (patch)
treeba075d6406172a6936be0d4bfbcc36b63abd9db9 /games/assaultcube/assaultcube.SlackBuild
parenta701db839e8e70c993eec5c9e9776b28abca0cde (diff)
downloadslackbuilds-9c616aa23c66f6845e3ef8319334489b092fa63e.tar.gz
games/assaultcube: Upgraded to 1.2.0.1
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'games/assaultcube/assaultcube.SlackBuild')
-rw-r--r--games/assaultcube/assaultcube.SlackBuild50
1 files changed, 36 insertions, 14 deletions
diff --git a/games/assaultcube/assaultcube.SlackBuild b/games/assaultcube/assaultcube.SlackBuild
index ae43cf2c14..233f0eec0e 100644
--- a/games/assaultcube/assaultcube.SlackBuild
+++ b/games/assaultcube/assaultcube.SlackBuild
@@ -2,12 +2,30 @@
# Slackware build script for assaultcube
-# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
+# Copyright 2011-2013 Larry Hajali <larryhaja[at]gmail[dot]com>
+# 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.
SRCNAM=AssaultCube
PRGNAM=assaultcube
-VERSION=1.1.0.4
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-1.2.0.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -38,11 +56,11 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $VERSION
-tar xvf $CWD/${SRCNAM}_v${VERSION}_source.tar.bz2
+rm -rf ${SRCNAM}_v${VERSION}
tar xvf $CWD/${SRCNAM}_v${VERSION}.tar.bz2
-cd $VERSION
+cd ${SRCNAM}_v${VERSION}
chown -R root:root .
+find . -type f ! -name configure -exec chmod 644 '{}' \;
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
@@ -51,12 +69,11 @@ find . \
# Use custom SLKCFLAGS and remove precompiled binaries.
patch -p1 < $CWD/Makefile.patch
-# From upstream. Missing -Xll
-patch -p1 < $CWD/missing-X11.patch
+sed -i 's/\r//g' changelog.txt
sed -i "s|-O2|$SLKCFLAGS|" source/enet/configure
rm -f bin_unix/*
-
-#autoreconf -ivf source/enet
+# Fix an illegal string literal.
+sed -i "s|Couldn.t|Couldn't|" source/src/bot/bot_waypoint.cpp
EXTRA_CXXFLAGS="$SLKCFLAGS" \
make -C source/src
@@ -64,11 +81,12 @@ EXTRA_CXXFLAGS="$SLKCFLAGS" \
make -C source/src install
mkdir -p $PKG/usr/games $PKG/usr/share/$PRGNAM
-sed -i "/^CUBE_DIR/s|=.*|=\"/usr/share/${PRGNAM}\"|" $PRGNAM.sh
+sed -i "/^CUBE_DIR/s|=.*|=\"/usr/share/${PRGNAM}\"|" $PRGNAM.sh server.sh
install -m 0755 $PRGNAM.sh $PKG/usr/games/$PRGNAM
+install -m 0755 server.sh $PKG/usr/games/$PRGNAM-server
chmod 0755 bin_unix/*
cp -ar \
- bin_unix config demos mods packages screenshots \
+ bin_unix bot config demos mods packages screenshots scripts \
$PKG/usr/share/$PRGNAM
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -76,11 +94,15 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mkdir -p $PKG/usr/share/applications
install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications
-install -D -m 0644 $CWD/$PRGNAM.svg $PKG/usr/share/pixmaps/$PRGNAM.svg
+for i in 16 24 32 48 64 96 128 256; do
+ convert docs/images/icon.png -resize ${i}x${i}! $PRGNAM-$i.png
+ install -D -m 0644 $PRGNAM-$i.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png
+done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- source/*.txt source/src/*.txt docs README.html \
+ changelog.txt source/*.txt source/src/*.txt docs/*.txt README.html \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild