diff options
-rw-r--r-- | games/smashbattle/smashbattle.SlackBuild | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/games/smashbattle/smashbattle.SlackBuild b/games/smashbattle/smashbattle.SlackBuild index 3f6ba04ee2..b8597812c1 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 |