aboutsummaryrefslogtreecommitdiff
path: root/games/astromenace
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2014-04-22 17:01:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-23 07:52:06 +0700
commit44939e2bae7e8ab6d668aeb878a393f704b6a9fa (patch)
tree8f682fa23bff79d08d1e39fe8b2dce0d04ef23ab /games/astromenace
parent541be06d0d32285278f45e6f88c3fa0fe3e713e5 (diff)
games/astromenace: Script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/astromenace')
-rw-r--r--games/astromenace/astromenace.SlackBuild25
-rw-r--r--games/astromenace/astromenace.desktop6
-rw-r--r--games/astromenace/astromenace.sh4
-rw-r--r--games/astromenace/doinst.sh10
4 files changed, 22 insertions, 23 deletions
diff --git a/games/astromenace/astromenace.SlackBuild b/games/astromenace/astromenace.SlackBuild
index df2db799656b7..a85d3086133ab 100644
--- a/games/astromenace/astromenace.SlackBuild
+++ b/games/astromenace/astromenace.SlackBuild
@@ -22,10 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=astromenace
SRCNAM=astromenace-src
+PRGNAM=$(echo $SRCNAM | cut -c1-11)
VERSION=${VERSION:-1.3.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,23 +71,28 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
mkdir -p build
- cmake ./
- make
- ./AstroMenace --pack --rawdata=./RAW_VFS_DATA
+ cmake ./ # create Makefile
+ make # build game
+ ./AstroMenace --pack --rawdata=./RAW_VFS_DATA # create game data
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
-mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
-cp -rf * $PKG/usr/share/games/$PRGNAM-$VERSION
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/CMakeFiles
-rm -rf $PKG/usr/share/games/$PRGNAM-$VERSION/AstroMenaceSource
+mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin
+
+# copy game data
+cp -rf RAW_VFS_DATA $PKG/usr/share/games/$PRGNAM
+cp -a gamedata.vfs $PKG/usr/share/games/$PRGNAM
+
+# install executables
+install -D -m0755 AstroMenace $PKG/usr/share/games/$PRGNAM
+install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
-install -D -m644 astromenace_128.png $PKG/usr/share/pixmaps/$PRGNAM.svg
+install -D -m644 $PRGNAM\_128.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/games/astromenace/astromenace.desktop b/games/astromenace/astromenace.desktop
index 871393110b218..090124a77dd92 100644
--- a/games/astromenace/astromenace.desktop
+++ b/games/astromenace/astromenace.desktop
@@ -1,10 +1,10 @@
[Desktop Entry]
Name=AstroMenace
Name[he]= AstroMenace
-Comment=Action
-Exec=/usr/share/games/astromenace-1.3.2/AstroMenace
+Comment=Space shooter
+Exec=astromenace
Icon=astromenace
Terminal=false
Type=Application
-Categories=Game;Action
+Categories=Game;ArcadeGame;
GenericName=Game
diff --git a/games/astromenace/astromenace.sh b/games/astromenace/astromenace.sh
new file mode 100644
index 0000000000000..4b082a6a626c9
--- /dev/null
+++ b/games/astromenace/astromenace.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /usr/share/games/astromenace
+./AstroMenace
diff --git a/games/astromenace/doinst.sh b/games/astromenace/doinst.sh
index 9424ce43ff572..5fb28930db0b9 100644
--- a/games/astromenace/doinst.sh
+++ b/games/astromenace/doinst.sh
@@ -1,13 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
-
-if [ -x /usr/bin/update-mime-database ]; then
- /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
-fi
-
-if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
- if [ -x /usr/bin/gtk-update-icon-cache ]; then
- /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
- fi
-fi