From ac23335a6a657ba2391b028bcb394e97d92dc76c Mon Sep 17 00:00:00 2001 From: Dugan Chen Date: Wed, 17 Aug 2016 23:24:47 +0700 Subject: games/doomretro: Adds the .desktop file and icon. Signed-off-by: Willy Sudiarto Raharjo --- games/doomretro/doinst.sh | 9 +++++++++ games/doomretro/doomretro.SlackBuild | 9 ++++++++- games/doomretro/doomretro.desktop | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 games/doomretro/doinst.sh create mode 100644 games/doomretro/doomretro.desktop diff --git a/games/doomretro/doinst.sh b/games/doomretro/doinst.sh new file mode 100644 index 0000000000..3e5691a052 --- /dev/null +++ b/games/doomretro/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/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 diff --git a/games/doomretro/doomretro.SlackBuild b/games/doomretro/doomretro.SlackBuild index 0c1a483161..f8573ada3b 100644 --- a/games/doomretro/doomretro.SlackBuild +++ b/games/doomretro/doomretro.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=doomretro VERSION=${VERSION:-2.2.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -82,6 +82,12 @@ cd .. 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/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +mkdir -p $PKG/usr/share/pixmaps +convert res/$PRGNAM.ico[1] $PKG/usr/share/pixmaps/$PRGNAM.png + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ AUTHORS LICENSE README.md \ @@ -90,6 +96,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/doomretro/doomretro.desktop b/games/doomretro/doomretro.desktop new file mode 100644 index 0000000000..73ad4a0761 --- /dev/null +++ b/games/doomretro/doomretro.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Doom Retro +GenericName=Classic refined DOOM source port +Icon=doomretro +Exec=/usr/bin/doomretro %F +Terminal=false +Categories=Game;ActionGame; -- cgit v1.2.3