aboutsummaryrefslogtreecommitdiff
path: root/games/nevernoid/nevernoid.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-06-03 00:16:29 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-06-07 22:10:11 +0700
commitd957a1094204e6555213845dff34a7e954dd50c2 (patch)
tree37ac9cebc670abf6ec55d565b50300e60b815f6c /games/nevernoid/nevernoid.SlackBuild
parent7e08821cf97f9d10be70dd280ee37b26c4fa54da (diff)
games/nevernoid: Added 64-bit support.
Diffstat (limited to 'games/nevernoid/nevernoid.SlackBuild')
-rw-r--r--games/nevernoid/nevernoid.SlackBuild32
1 files changed, 24 insertions, 8 deletions
diff --git a/games/nevernoid/nevernoid.SlackBuild b/games/nevernoid/nevernoid.SlackBuild
index 31e846f5661e7..d131d0ba5591b 100644
--- a/games/nevernoid/nevernoid.SlackBuild
+++ b/games/nevernoid/nevernoid.SlackBuild
@@ -7,18 +7,32 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=nevernoid
-ARCHIVE="NeverNoid_v12_linux_x86.tar.gz"
VERSION=${VERSION:-1.2}
-ARCH=i486 # which might be a lie! (we dunno how it was compiled)
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
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}
# Binary-only package, so no CFLAGS here
+case "$ARCH" in
+ i?86) PARCH=x86 ; ARCH=i486 ;;
+ x86_64) PARCH=x64 ;;
+ *) echo "Unsupported ARCH '$ARCH'" 1>&2 ; exit 1 ;;
+esac
+
+PVER=${VERSION//./}
+ARCHIVE="NeverNoid_v${PVER}_linux_${PARCH}.tar.gz"
set -e
@@ -28,12 +42,14 @@ cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$ARCHIVE
cd $PRGNAM
+
+# Upstream fixed a bug in one of the maps, as a separate download.
+unzip $CWD/"watch the birdy.zip"
+mv "watch the birdy.map" maps/
+
chown -R root:root .
-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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find . -type f -print0 | xargs -0 chmod 644
+find . -type d -print0 | xargs -0 chmod 755
mkdir -p $PKG/usr/libexec $PKG/usr/games $PKG/usr/share/$PRGNAM
install -m0755 -o root -g root $PRGNAM $PKG/usr/libexec