diff options
author | B. Watson <yalhcru@gmail.com> | 2021-11-15 17:26:13 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-04 10:08:55 +0700 |
commit | 5437d1ffdaccdee7c401fb599d2359710410521f (patch) | |
tree | c171b9c83c779abf6f068e5fe9ff7f98f84bb598 /games | |
parent | 9be4a33425f8f6952a45a8edfd7ddef1575ff071 (diff) |
games/noteye: Updated for version 8.4.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/noteye/README | 6 | ||||
-rw-r--r-- | games/noteye/doinst.sh | 16 | ||||
-rw-r--r-- | games/noteye/hydraslayer.desktop | 2 | ||||
-rw-r--r-- | games/noteye/hydraslayer.png | bin | 2426 -> 0 bytes | |||
-rw-r--r-- | games/noteye/mtrand.h.xz | bin | 0 -> 2552 bytes | |||
-rw-r--r-- | games/noteye/noteye.SlackBuild | 68 | ||||
-rw-r--r-- | games/noteye/noteye.desktop | 2 | ||||
-rw-r--r-- | games/noteye/noteye.info | 8 | ||||
-rw-r--r-- | games/noteye/noteye.png | bin | 3842 -> 0 bytes | |||
-rw-r--r-- | games/noteye/slack-desc | 18 |
10 files changed, 67 insertions, 53 deletions
diff --git a/games/noteye/README b/games/noteye/README index e86f64085b8fd..85ece1a3faf9e 100644 --- a/games/noteye/README +++ b/games/noteye/README @@ -1,9 +1,9 @@ noteye (fontend for roguelike games; includes hydraslayer) -Necklace of the Eye (NotEye in short) is a roguelike frontend. It can +Necklace of the Eye (NotEye for short) is a roguelike frontend. It can modify the output of console and libtcod roguelikes, and it also works -as a library which allows to easily port old ASCII roguelikes like ADOM -into 21st century. +as a library which allows easily porting old ASCII roguelikes like +ADOM into 21st century. Hydra Slayer is a Roguelike game focused on one thing: slaying Hydras. It is inspired by Greek mythology, Dungeon Crawl, MathRL seven diff --git a/games/noteye/doinst.sh b/games/noteye/doinst.sh index 9fa0d8b3fa6d0..3e5691a052b5b 100644 --- a/games/noteye/doinst.sh +++ b/games/noteye/doinst.sh @@ -1,13 +1,9 @@ - -# create empty high score file only if there isn't one -if [ ! -e var/games/hydrascores.sav ]; then - touch var/games/hydrascores.sav -fi - -# always reset perms/ownership -chmod 660 var/games/hydrascores.sav -chown root:games var/games/hydrascores.sav - 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/noteye/hydraslayer.desktop b/games/noteye/hydraslayer.desktop index ba3ff91e5da63..5f25a9ea052e4 100644 --- a/games/noteye/hydraslayer.desktop +++ b/games/noteye/hydraslayer.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Hydra Slayer -Exec=hydraslayer +Exec=/usr/games/hydraslayer Icon=hydraslayer Type=Application Terminal=false diff --git a/games/noteye/hydraslayer.png b/games/noteye/hydraslayer.png Binary files differdeleted file mode 100644 index 3b7612743e076..0000000000000 --- a/games/noteye/hydraslayer.png +++ /dev/null diff --git a/games/noteye/mtrand.h.xz b/games/noteye/mtrand.h.xz Binary files differnew file mode 100644 index 0000000000000..d4fbf3255904c --- /dev/null +++ b/games/noteye/mtrand.h.xz diff --git a/games/noteye/noteye.SlackBuild b/games/noteye/noteye.SlackBuild index 02e4ef4005b77..ba6ed6fbf5f5c 100644 --- a/games/noteye/noteye.SlackBuild +++ b/games/noteye/noteye.SlackBuild @@ -6,10 +6,20 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211115 bkw: +# - update for v8.4. +# - compile with g++ again (needs -std=gnu++98). +# - new-style icons. +# - s/lua/luajit/ in REQUIRES. +# - get rid of shared high score file in /var. it's now per-user +# in ~/.config/noteye. +# - don't install binary setgid games. +# - add hydraslayer info to slack-desc. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=noteye -VERSION=${VERSION:-7.6} +VERSION=${VERSION:-8.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,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 @@ -62,11 +69,8 @@ rm -rf $PRGNAM eval unzip $CWD/$PRGNAM-$SRCVER.zip $EXCLUDES cd $PRGNAM chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # these don't need to be executable. chmod 0644 common/*.noe games/*.noe @@ -78,16 +82,14 @@ chmod 0644 common/*.noe games/*.noe # to Slack-specific sbopkg. patch -p1 < $CWD/sbo.diff -# apparently Ubuntu has liblua-5.1.so, we just have liblua.so (same version). -sed -i 's,-llua5.1,-llua,g' src/Makefile - -# store the writable high score file in /var, not /usr/share. -sed -i 's,"hydrascores.sav","/var/games/hydrascores.sav",' hydra/hydra.cpp +# fix underlinking. +sed -i '/-lGLU *\$(TGT) *$/s,$, -lSDL2,' src/Makefile -# use clang++ as the code won't build with gcc >= 5.x -sed -i 's|g++ |clang++ |' src/Makefile +# release tarball for 8.4 is missing this header (so use a copy +# from upstream's github) +xzcat $CWD/mtrand.h.xz > hydra/mtrand.h -make -C src CFLAGS="$SLKCFLAGS" +make -C src CFLAGS="$SLKCFLAGS -std=gnu++98 -fpermissive" # The 'make install' target is bad and wrong. Don't use. PKGLIB=$PKG/usr/lib$LIBDIRSUFFIX @@ -97,9 +99,8 @@ SOVER=$( echo $VERSION | cut -d. -f1 ) mkdir -p $PKG/usr/games $PKGLIB/$PRGNAM $PKGSHARE # shared lib needs to be in /usr/lib(64), *not* /usr/share. -# also put the game binary in a private dir instead of /usr/share, -# and make it setgid games so the high score file can be updated. -install -s -m2755 -oroot -ggames $PRGNAM $PKGLIB/$PRGNAM/ +# also put the game binary in a private dir instead of /usr/share. +install -s -m0755 $PRGNAM $PKGLIB/$PRGNAM/ install -s -m0755 lib$PRGNAM.so $PKGLIB/lib$PRGNAM.so.$VERSION ln -s lib$PRGNAM.so.$VERSION $PKGLIB/lib$PRGNAM.so.$SOVER ln -s lib$PRGNAM.so.$VERSION $PKGLIB/lib$PRGNAM.so @@ -126,12 +127,29 @@ sed -i \ "s,^\$NOTEYEDIR/,/usr/lib$LIBDIRSUFFIX/$PRGNAM/," \ $PKG/usr/games/* -# don't install a highscore file here, see doinst.sh. +# this results in better-looking noteye icons than if we extracted +# noteye.ico, which is only 48x36. hydra.ico is 48x48 and there's +# no larger version of the image in the source (it's composed of +# even smaller pieces, from the hydraslayer graphics). +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 \ + -extent 400x400 \ + -gravity center \ + -resize $size \ + gfx/noteye-logo.png \ + $dir/$PRGNAM.png + [ "$px" -le "48" ] && \ + convert 'hydra/hydra.ico[2]' -resize $px $dir/hydraslayer.png +done # icons extracted from the .ico files in the source, with icotool. -mkdir -p $PKG/usr/share/pixmaps -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png -cat $CWD/hydraslayer.png > $PKG/usr/share/pixmaps/hydraslayer.png +PIXMAPS=$PKG/usr/share/pixmaps +mkdir -p $PIXMAPS +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PIXMAPS/$PRGNAM.png +ln -s ../icons/hicolor/48x48/apps/hydraslayer.png $PIXMAPS/hydraslayer.png # .desktop files written for this build. mkdir -p $PKG/usr/share/applications @@ -146,7 +164,7 @@ gzip -9c $CWD/hydraslayer.6 > $PKG/usr/man/man6/hydraslayer.6.gz # We don't need licenses/* as we're linking with system-wide libs, which # have already installed their own licenses in /usr/doc. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING README.txt sample $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md sample $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/noteye/noteye.desktop b/games/noteye/noteye.desktop index 888d1ad02d041..be688c388a4c2 100644 --- a/games/noteye/noteye.desktop +++ b/games/noteye/noteye.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Necklace of the Eye -Exec=noteye +Exec=/usr/games/noteye Icon=noteye Type=Application Terminal=false diff --git a/games/noteye/noteye.info b/games/noteye/noteye.info index 2300ed29e91d7..c35d185a6fcb2 100644 --- a/games/noteye/noteye.info +++ b/games/noteye/noteye.info @@ -1,10 +1,10 @@ PRGNAM="noteye" -VERSION="7.6" +VERSION="8.4" HOMEPAGE="http://www.roguetemple.com/z/noteye.php" -DOWNLOAD="https://slackware.uk/~urchlay/src/noteye-76.zip" -MD5SUM="650d0fd56b6d5ba72527737596c92766" +DOWNLOAD="http://www.roguetemple.com/z/noteye/noteye-84.zip" +MD5SUM="deeb32461838caa7fab8339508350d09" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="lua" +REQUIRES="luajit" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/games/noteye/noteye.png b/games/noteye/noteye.png Binary files differdeleted file mode 100644 index d25930f04beda..0000000000000 --- a/games/noteye/noteye.png +++ /dev/null diff --git a/games/noteye/slack-desc b/games/noteye/slack-desc index b449fa645c716..2b205fd467ec3 100644 --- a/games/noteye/slack-desc +++ b/games/noteye/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -noteye: noteye (frontend for roguelike games; includes hydraslayer) -noteye: -noteye: Necklace of the Eye (NotEye in short) is a roguelike frontend. It -noteye: can modify the output of console and libtcod roguelikes, and it also -noteye: works as a library which allows to easily port old ASCII roguelikes -noteye: like ADOM into 21st century. -noteye: -noteye: -noteye: +noteye: noteye (fontend for roguelike games; includes hydraslayer) noteye: +noteye: Necklace of the Eye (NotEye for short) is a roguelike frontend. It can +noteye: modify the output of console and libtcod roguelikes, and it also works +noteye: as a library which allows easily porting old ASCII roguelikes like +noteye: ADOM into 21st century. noteye: +noteye: Hydra Slayer is a Roguelike game focused on one thing: slaying +noteye: Hydras. It is inspired by Greek mythology, Dungeon Crawl, MathRL +noteye: seven day roguelike, and some mathematical puzzles about brave heroes +noteye: slaying many headed beasts. |