aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <slackbuilds@jaxartes.net>2020-05-18 00:21:43 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-23 09:32:03 +0700
commit0c66428868ffb74051e673263fcc8bbed0d5e20b (patch)
tree7ea8008a4b9518a598d7cb9da84584c32a599547 /games
parentacc629b8625f6510c54aa7ebae32cfdcedff8a42 (diff)
games/VASSAL: Better desktop support.
Signed-off-by: Benjamin Trigona-Harany <slackbuilds@jaxartes.net> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/VASSAL/VASSAL3
-rw-r--r--games/VASSAL/VASSAL-mime.xml27
-rw-r--r--games/VASSAL/VASSAL.SlackBuild11
-rw-r--r--games/VASSAL/VASSAL.desktop1
-rw-r--r--games/VASSAL/doinst.sh10
5 files changed, 46 insertions, 6 deletions
diff --git a/games/VASSAL/VASSAL b/games/VASSAL/VASSAL
deleted file mode 100644
index 2f833e3399588..0000000000000
--- a/games/VASSAL/VASSAL
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /usr/share/games/VASSAL
-./VASSAL.sh
diff --git a/games/VASSAL/VASSAL-mime.xml b/games/VASSAL/VASSAL-mime.xml
new file mode 100644
index 0000000000000..9ce2e12f9c3e8
--- /dev/null
+++ b/games/VASSAL/VASSAL-mime.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-vnd.vassalengine.module">
+ <sub-class-of type="application/octet-stream"/>
+ <comment>VASSAL module</comment>
+ <glob pattern="*.vmod"/>
+ <icon name="VASSAL"/>
+ </mime-type>
+ <mime-type type="application/x-vnd.vassalengine.module-extension">
+ <sub-class-of type="application/octet-stream"/>
+ <comment>VASSAL module extension</comment>
+ <glob pattern="*.vmdx"/>
+ <icon name="VASSAL"/>
+ </mime-type>
+ <mime-type type="application/x-vnd.vassalengine.game-log">
+ <sub-class-of type="application/octet-stream"/>
+ <comment>VASSAL game log</comment>
+ <glob pattern="*.vlog"/>
+ <icon name="VASSAL"/>
+ </mime-type>
+ <mime-type type="application/x-vnd.vassalengine.saved-game">
+ <sub-class-of type="application/octet-stream"/>
+ <comment>VASSAL saved game</comment>
+ <glob pattern="*.vsav"/>
+ <icon name="VASSAL"/>
+ </mime-type>
+</mime-info>
diff --git a/games/VASSAL/VASSAL.SlackBuild b/games/VASSAL/VASSAL.SlackBuild
index 8fabf966a79fd..ade48ceb0f569 100644
--- a/games/VASSAL/VASSAL.SlackBuild
+++ b/games/VASSAL/VASSAL.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=VASSAL
VERSION=${VERSION:-3.2.17}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -72,12 +72,16 @@ find -L . \
mkdir -p $PKG/usr/bin $PKG/usr/share/games/$PRGNAM
cp -rf lib $PKG/usr/share/games/$PRGNAM
-install -D -m0755 $PRGNAM.sh $PKG/usr/share/games/$PRGNAM/$PRGNAM.sh
-install -D -m0755 $CWD/VASSAL $PKG/usr/bin
+sed -i "s|^\(INSTALL_DIR=\).*|\1/usr/share/games/$PRGNAM|" $PRGNAM.sh
+
+install -D -m0755 $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/mime/packages
+install -D -m644 $CWD/$PRGNAM-mime.xml $PKG/usr/share/mime/packages/$PRGNAM-mime.xml
+
mkdir -p $PKG/usr/share/pixmaps
install -m644 -D $CWD/$PRGNAM.svg $PKG/usr/share/pixmaps/$PRGNAM.svg
@@ -86,6 +90,7 @@ cp -a \
CHANGES LICENSE README doc \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+rm $PKG/usr/doc/$PRGNAM-$VERSION/doc/userguide/userguide.doc
ln -s /usr/doc/$PRGNAM-$VERSION/doc $PKG/usr/share/games/$PRGNAM/doc
mkdir -p $PKG/install
diff --git a/games/VASSAL/VASSAL.desktop b/games/VASSAL/VASSAL.desktop
index 54e024195605f..53988fad6c767 100644
--- a/games/VASSAL/VASSAL.desktop
+++ b/games/VASSAL/VASSAL.desktop
@@ -7,3 +7,4 @@ Terminal=false
Type=Application
Categories=Game
GenericName=Board and card game engine
+MimeType=application/x-vnd.vassalengine.module;application/x-vnd.vassalengine.module-extension;application/x-vnd.vassalengine.game-log;application/x-vnd.vassalengine.saved-game
diff --git a/games/VASSAL/doinst.sh b/games/VASSAL/doinst.sh
index 5fb28930db0b9..aea0f894eb32b 100644
--- a/games/VASSAL/doinst.sh
+++ b/games/VASSAL/doinst.sh
@@ -1,3 +1,13 @@
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 -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi