aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2014-04-30 13:19:58 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-30 13:19:58 +0700
commitc93ddced1c29af69c1e116fb37bd2fa37b046b61 (patch)
tree78d8c31a0a022088d6431e9bea3cc05d8fc3c7b4 /games
parente067fc0e0058124ccf8511c36be6ec09fd7881c7 (diff)
games/smashbattle: Script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/smashbattle/smashbattle.SlackBuild29
1 files changed, 14 insertions, 15 deletions
diff --git a/games/smashbattle/smashbattle.SlackBuild b/games/smashbattle/smashbattle.SlackBuild
index 3f6ba04ee2da..b8597812c17d 100644
--- a/games/smashbattle/smashbattle.SlackBuild
+++ b/games/smashbattle/smashbattle.SlackBuild
@@ -24,8 +24,8 @@
PRGNAM=smashbattle
SRCVER=${SRCVER:-110224-src}
-VERSION=$(echo $SRCVER | grep -o "110224")
-BUILD=${BUILD:-1}
+VERSION=$(echo $SRCVER | cut -c1-6)
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -70,28 +70,27 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make
+make # compile source code
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# fix launcher paths
sed -i 's/\/local//' $TMP/battle/Battle/linux/smashbattle.desktop
sed -i 's/\/local//' $TMP/battle/Battle/linux/smashbattlefs.desktop
-mkdir -p $PKG/usr/share/games/$PRGNAM \
- $PKG/usr/share/games/$PRGNAM/gfx \
- $PKG/usr/share/games/$PRGNAM/sfx \
- $PKG/usr/share/games/$PRGNAM/music \
- $PKG/usr/share/games/$PRGNAM/stage \
- $PKG/usr/bin
-
-cp -R gfx/* $PKG/usr/share/games/$PRGNAM/gfx/
-cp -R sfx/* $PKG/usr/share/games/$PRGNAM/sfx/
-cp -R music/* $PKG/usr/share/games/$PRGNAM/music/
-cp -R stage/* $PKG/usr/share/games/$PRGNAM/stage/
+# install data game
+DATADIRS="gfx sfx music stage"
+for i in $DATADIRS; do
+ mkdir -p $PKG/usr/share/games/$PRGNAM/$i
+ cp -rf $i/* $PKG/usr/share/games/$PRGNAM/$i
+done
+
+# install the game executable and launcher
+mkdir -p $PKG/usr/bin
install -D -m755 battle $PKG/usr/share/games/$PRGNAM/
cd linux
-install -D -m755 smashbattle $PKG/usr/bin/smashbattle
+install -D -m755 $PRGNAM $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/usr/share/applications
install -D -m644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop