aboutsummaryrefslogtreecommitdiff
path: root/games/warsow/warsow.SlackBuild
diff options
context:
space:
mode:
authorgoarilla <goarilla@gmail.com>2014-09-21 11:26:30 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-22 08:23:48 +0700
commitd5747e4dd48cbebeac349d9f8f1b27b7501206fd (patch)
treea1d725702d5b7eaaac2a30b5badda1501b5091c9 /games/warsow/warsow.SlackBuild
parent96eb0adf5684b906f899c0b46ad2aa181c577e5e (diff)
games/warsow: Updated for version 1.51 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/warsow/warsow.SlackBuild')
-rw-r--r--games/warsow/warsow.SlackBuild59
1 files changed, 35 insertions, 24 deletions
diff --git a/games/warsow/warsow.SlackBuild b/games/warsow/warsow.SlackBuild
index 366dcf580eff0..49662dc33520f 100644
--- a/games/warsow/warsow.SlackBuild
+++ b/games/warsow/warsow.SlackBuild
@@ -21,13 +21,15 @@
# Written by Andre Barboza <bmg.andre@gmail.com>
# Updated by drhouse <housegregory299@gmail.com>
+# Updated by goarilla <goarilla@gmail.com>
+# It now packages the unified tarball instead of compiling the source and merging the data
PRGNAM=warsow
-VERSION=${VERSION:-1.02}
+VERSION=${VERSION:-1.51}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-BASE_VERSION=${BASE_VERSION:-1.02}
+BASE_VERSION=${BASE_VERSION:-1.51}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -49,42 +51,49 @@ else
fi
set -e
-
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP/$PRGNAM-$VERSION $PKG $OUTPUT
cd $TMP/$PRGNAM-$VERSION
-tar -xvvzf $CWD/"$PRGNAM"_"$BASE_VERSION"_sdk.tar.gz
-tar -xvvzf $CWD/"$PRGNAM"_"$BASE_VERSION".tar.gz
-cd "$PRGNAM"_"$BASE_VERSION"_sdk/source/
-make -j1
-cp -rv $TMP/$PRGNAM-$VERSION/"$PRGNAM"_"$BASE_VERSION"_sdk/source/release/* $TMP/$PRGNAM-$VERSION/"$PRGNAM"_"$BASE_VERSION"/
-cd $TMP/$PRGNAM-$VERSION/"$PRGNAM"_"$BASE_VERSION"
-#unzip -o $CWD/"$PRGNAM"_"$VERSION"_update.zip
+tar -xvvzf "$CWD"/"$PRGNAM"_"$BASE_VERSION"_unified.tar.gz
+
+# warsow 1.51_unified base dir is warsow_15
+cd "$PRGNAM"_"15"
+
+# remove windows files
+find -L . -type f -iname '*.dll' -exec rm -vf -- '{}' \;
+find -L . -type f -iname '*.exe' -exec rm -vf -- '{}' \;
+
+# correct permissions
chown -R root:root .
+# goarilla: plus 700
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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-mkdir -p $PKG/usr/share/warsow/libs
-install -D -m 0755 warsow.$EXESUFFIX $PKG/usr/share/warsow
-install -D -m 0755 wsw_server.$EXESUFFIX $PKG/usr/share/warsow
-install -D -m 0755 wswtv_server.$EXESUFFIX $PKG/usr/share/warsow
+ \( -perm 777 -o -perm 700 -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 {} \;
mkdir -p $PKG/usr/games
+
+# fix and place the wrapper scripts
cat warsow | sed 's|^BINARY_DIR=$|BINARY_DIR=/usr/share/warsow|' > $PKG/usr/games/warsow
cat wsw_server | sed 's|^BINARY_DIR=$|BINARY_DIR=/usr/share/warsow|' > $PKG/usr/games/wsw_server
cat wswtv_server | sed 's|^BINARY_DIR=$|BINARY_DIR=/usr/share/warsow|' > $PKG/usr/games/wswtv_server
(cd $PKG/usr/games; chmod 0755 *)
-install -D -m 0755 libs/angelwrap_$EXESUFFIX.so $PKG/usr/share/warsow/libs
-install -D -m 0755 libs/irc_$EXESUFFIX.so $PKG/usr/share/warsow/libs
-install -D -m 0755 libs/snd_openal_$EXESUFFIX.so $PKG/usr/share/warsow/libs
-install -D -m 0755 libs/snd_qf_$EXESUFFIX.so $PKG/usr/share/warsow/libs
-
mkdir -p $PKG/usr/share/warsow/basewsw/
+
+# copy executables
+cp -a warsow.* "$PKG"/usr/share/warsow/
+cp -a wsw_server.* "$PKG"/usr/share/warsow/
+cp -a wswtv_server.* "$PKG"/usr/share/warsow/
+
+# copy libs
+cp -ra libs "$PKG"/usr/share/warsow/
+
+# copy data
cp -ra basewsw/* $PKG/usr/share/warsow/basewsw/
+
+# copy icons and slacbuild
mkdir -p $PKG/usr/share/pixmaps/
cat $CWD/warsow.png > $PKG/usr/share/pixmaps/warsow.png
mkdir -p $PKG/usr/share/applications
@@ -94,9 +103,11 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# set up install/
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+# build package
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}