games/VASSAL: Better desktop support.

Signed-off-by: Benjamin Trigona-Harany <slackbuilds@jaxartes.net>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Benjamin Trigona-Harany 2020-05-18 00:21:43 -07:00 committed by Willy Sudiarto Raharjo
parent acc629b862
commit 0c66428868
No known key found for this signature in database
GPG key ID: 3F617144D7238786
5 changed files with 46 additions and 6 deletions

View file

@ -1,3 +0,0 @@
#!/bin/sh
cd /usr/share/games/VASSAL
./VASSAL.sh

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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