diff options
author | B. Watson <urchlay@slackware.uk> | 2024-08-18 03:36:15 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-24 11:55:24 +0700 |
commit | 23d3220f042893920a78b0a2e9d1e7f357fc800d (patch) | |
tree | 5b7c2cd7c5c37d15e520b9ea73490952efb4c86b | |
parent | be7a270ab9195a70084a626c528d99f24227e0bf (diff) |
games/njam: New maintainer, various tweaks.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/njam/README | 2 | ||||
-rw-r--r-- | games/njam/doinst.sh | 6 | ||||
-rw-r--r-- | games/njam/njam.6 | 19 | ||||
-rw-r--r-- | games/njam/njam.SlackBuild | 66 | ||||
-rw-r--r-- | games/njam/njam.desktop | 2 | ||||
-rw-r--r-- | games/njam/njam.info | 4 | ||||
-rw-r--r-- | games/njam/patches/fix_error_gcc.patch | 16 |
7 files changed, 73 insertions, 42 deletions
diff --git a/games/njam/README b/games/njam/README index 3a78f789ebc1..517e26288c84 100644 --- a/games/njam/README +++ b/games/njam/README @@ -1,3 +1,5 @@ +njam (The most addictive free pacman-like game) + NjAM is a full-featured cross-platform pacman like game. Features: diff --git a/games/njam/doinst.sh b/games/njam/doinst.sh index 5fb28930db0b..65c7e2eeb9aa 100644 --- a/games/njam/doinst.sh +++ b/games/njam/doinst.sh @@ -1,3 +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 -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/njam/njam.6 b/games/njam/njam.6 new file mode 100644 index 000000000000..073dd3118efd --- /dev/null +++ b/games/njam/njam.6 @@ -0,0 +1,19 @@ +.TH "NJAM" "6" +.SH "NAME" +njam - Pacman-like game with multiplayer support +.SH "SYNOPSIS" +.PP +\fBnjam\fR [\-w] [\-h] +.SH "DESCRIPTION" +.PP +This manual page documents briefly the +\fBnjam\fR command. +.PP +\fBnjam\fR is a pacman-like game with multiplayer support. +.SH "OPTIONS" +.PP +.IP "\fB\-w\fP " 10 +Start in windowed mode (as opposed to fullscreen) +.IP "\fB\-h\fP " 10 +use hardware surfaces (faster, doesn't work well with all graphic cards) + diff --git a/games/njam/njam.SlackBuild b/games/njam/njam.SlackBuild index 3930d342dc18..269d65f9e936 100644 --- a/games/njam/njam.SlackBuild +++ b/games/njam/njam.SlackBuild @@ -2,31 +2,22 @@ # Slackware build script for njam -# Copyright 2012-2021 Petar Petrov slackalaxy@gmail.com -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240817 bkw: BUILD=3 +# - new maintainer. +# - relicense as WTFPL. +# - get INSTALL and PREINSTALL out of doc dir (unneeded). +# - binary in /usr/games. +# - put icon in /usr/share/icons (symlink back to /usr/share/pixmaps). +# - include Debian's man page in the package. +# - gtk-update-icon-cache in doinst.sh. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=njam VERSION=${VERSION:-1.25} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +29,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 @@ -73,43 +61,43 @@ rm -rf $PRGNAM-$VERSION-src tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.gz cd $PRGNAM-$VERSION-src 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 {} + # Thanks to Debian for the patches (and the source tarball!) patch -p1 < $CWD/patches/changed_hiscore_name.patch patch -p1 < $CWD/patches/drop_gda.patch patch -p1 < $CWD/patches/gcc_46.patch +patch -p1 < $CWD/patches/fix_error_gcc.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --bindir=/usr/games \ --sysconfdir=/etc \ --localstatedir=/var \ + --datadir=/usr/share/games \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG -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 +# man page is minimal, comes from Debian. +mkdir -p $PKG/usr/man/man6 +gzip -9c < $CWD/njam.6 > $PKG/usr/man/man6/njam.6.gz -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - ChangeLog COPYING INSTALL PREINSTALL README TODO html \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a ChangeLog COPYING README TODO html $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild -mkdir -p $PKG/usr/share/{applications,pixmaps} +mkdir -p $PKG/usr/share/{applications,pixmaps,icons/hicolor/48x48/apps} cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications -cp $CWD/$PRGNAM.png $PKG/usr/share/pixmaps +cp $CWD/$PRGNAM.png $PKG/usr/share/icons/hicolor/48x48/apps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png -# Clean up rm -rf $PKG/usr/share/$PRGNAM/{html,README} mkdir -p $PKG/install diff --git a/games/njam/njam.desktop b/games/njam/njam.desktop index 23db327cc967..5b64a1c9df71 100644 --- a/games/njam/njam.desktop +++ b/games/njam/njam.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Type=Application Name=NjAM -Exec=njam -w +Exec=/usr/games/njam -w Icon=njam Categories=Game; Terminal=false diff --git a/games/njam/njam.info b/games/njam/njam.info index 4512872ecd7c..eac2f7704007 100644 --- a/games/njam/njam.info +++ b/games/njam/njam.info @@ -6,5 +6,5 @@ MD5SUM="231fda022d309e1ef4a0d993ca693462" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Petar Petrov" -EMAIL="slackalaxy@gmail.com" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/games/njam/patches/fix_error_gcc.patch b/games/njam/patches/fix_error_gcc.patch new file mode 100644 index 000000000000..d9bb30d11ee0 --- /dev/null +++ b/games/njam/patches/fix_error_gcc.patch @@ -0,0 +1,16 @@ +From: Daniel Echeverry <epsilon77@gmail.com> +Last-Update: 2013-01-04 +Description: fix_error_gcc +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3 +--- a/src/njamgame.cpp ++++ b/src/njamgame.cpp +@@ -228,7 +228,7 @@ void NjamEngine::StartGame(GameType Gt) + if (!temp) + { + printf("Loading file: %s", filename); +- printf(SDL_GetError()); ++ printf("%s", SDL_GetError()); + return; + } + |