From 0acc8c3dc64724524698906016d62836125e7377 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 24 Oct 2021 15:39:52 -0400 Subject: games/open-adventure: New-style icons, HTML docs. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/open-adventure/advent.png | Bin 4875 -> 0 bytes games/open-adventure/doinst.sh | 7 ++++++ games/open-adventure/open-adventure.SlackBuild | 30 ++++++++++++++++--------- 3 files changed, 26 insertions(+), 11 deletions(-) delete mode 100644 games/open-adventure/advent.png create mode 100644 games/open-adventure/doinst.sh (limited to 'games') diff --git a/games/open-adventure/advent.png b/games/open-adventure/advent.png deleted file mode 100644 index 8e1a8fdc52..0000000000 Binary files a/games/open-adventure/advent.png and /dev/null differ diff --git a/games/open-adventure/doinst.sh b/games/open-adventure/doinst.sh new file mode 100644 index 0000000000..9a8ded3c60 --- /dev/null +++ b/games/open-adventure/doinst.sh @@ -0,0 +1,7 @@ +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 diff --git a/games/open-adventure/open-adventure.SlackBuild b/games/open-adventure/open-adventure.SlackBuild index 3eb9d4732a..378a539601 100644 --- a/games/open-adventure/open-adventure.SlackBuild +++ b/games/open-adventure/open-adventure.SlackBuild @@ -6,6 +6,7 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211024 bkw: BUILD=2, new-style icons, HTML docs. # 20201024 bkw: Update for v1.9. # 20191211 bkw: Update for v1.8. # 20181203 bkw: Update for v1.6. @@ -31,9 +32,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -91,6 +89,7 @@ sed -i "s,-O2,$SLKCFLAGS," Makefile # might someday. So -j1. make -j1 make $EXE.6 +make html notes.html # no 'make install' target: mkdir -p $PKG/usr/games $PKG/usr/man/man6 @@ -101,19 +100,28 @@ gzip -9c < $EXE.6 > $PKG/usr/man/man6/$EXE.6.gz ln -s $EXE.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz ln -s $EXE $PKG/usr/games/$PRGNAM -# icon converted from advent.svg (rather not script that here) mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps -cat $EXE.desktop > $PKG/usr/share/applications/$EXE.desktop -cat $CWD/$EXE.png > $PKG/usr/share/pixmaps/$EXE.png - -# don't bother with advent.adoc, it's the man page. -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING NEWS README.adoc TODO h*.adoc $PKG/usr/doc/$PRGNAM-$VERSION +sed 's,Exec=,&/usr/games/,' $EXE.desktop > $PKG/usr/share/applications/$EXE.desktop + +# The icon doesn't look that great when scaled down; shrug. +for px in 16 32 48 64 128; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -background none -resize $size $EXE.svg $dir/$EXE.png +done + +ln -s ../icons/hicolor/48x48/apps/$EXE.png $PKG/usr/share/pixmaps/$EXE.png + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html +rm -f INSTALL* +cp -a COPYING NEWS *.adoc TODO $PKG/usr/doc/$PRGNAM-$VERSION +cp -a *.html $PKG/usr/doc/$PRGNAM-$VERSION/html 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 # someday I may make a .desktop file +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE -- cgit v1.2.3