diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-24 15:39:52 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-29 17:07:23 +0700 |
commit | 0acc8c3dc64724524698906016d62836125e7377 (patch) | |
tree | ba94cbc0e87a23f61fad6dacaa7eb56b0664a993 | |
parent | 7ae7eadf4890496619033b60115d4ca647134dfb (diff) |
games/open-adventure: New-style icons, HTML docs.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/open-adventure/advent.png | bin | 4875 -> 0 bytes | |||
-rw-r--r-- | games/open-adventure/doinst.sh | 7 | ||||
-rw-r--r-- | games/open-adventure/open-adventure.SlackBuild | 30 |
3 files changed, 26 insertions, 11 deletions
diff --git a/games/open-adventure/advent.png b/games/open-adventure/advent.png Binary files differdeleted file mode 100644 index 8e1a8fdc5298a..0000000000000 --- a/games/open-adventure/advent.png +++ /dev/null diff --git a/games/open-adventure/doinst.sh b/games/open-adventure/doinst.sh new file mode 100644 index 0000000000000..9a8ded3c60349 --- /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 3eb9d4732a197..378a53960187c 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 |