aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-02-11 00:04:18 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-02-11 09:30:38 +0700
commit22d97a85cbacb1cee0f82687efc7db55c37c6f88 (patch)
treea8810ec674638ebf2902164831ae31c8b8a57af3
parent244fcb2dd5358c3afa1c4e2c052559605d8a7b23 (diff)
games/gtetrinet: Added (multiplayer networked Tetris-like game)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/gtetrinet/README5
-rw-r--r--games/gtetrinet/doinst.sh15
-rw-r--r--games/gtetrinet/git2tarxz.sh50
-rw-r--r--games/gtetrinet/gtetrinet.SlackBuild107
-rw-r--r--games/gtetrinet/gtetrinet.info10
-rw-r--r--games/gtetrinet/slack-desc19
6 files changed, 206 insertions, 0 deletions
diff --git a/games/gtetrinet/README b/games/gtetrinet/README
new file mode 100644
index 000000000000..b8995f2aea01
--- /dev/null
+++ b/games/gtetrinet/README
@@ -0,0 +1,5 @@
+gtetrinet (multiplayer networked Tetris-like game)
+
+GTetrinet is a clone of the popular Tetrinet game for Win95/NT. It is
+designed to be fully compatible with, and to be identical in gameplay
+to the original Tetrinet.
diff --git a/games/gtetrinet/doinst.sh b/games/gtetrinet/doinst.sh
new file mode 100644
index 000000000000..0254ea06d878
--- /dev/null
+++ b/games/gtetrinet/doinst.sh
@@ -0,0 +1,15 @@
+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
+
+if [ -e usr/share/glib-2.0/schemas ]; then
+ if [ -x /usr/bin/glib-compile-schemas ]; then
+ /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1
+ fi
+fi
diff --git a/games/gtetrinet/git2tarxz.sh b/games/gtetrinet/git2tarxz.sh
new file mode 100644
index 000000000000..b084ee153a47
--- /dev/null
+++ b/games/gtetrinet/git2tarxz.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version number.
+
+# This is not a generic git2tarxz script, it's specific to gtetrinet.
+# Upstream doesn't use tags for version bumps, so the version number
+# is extracted from configure.ac.
+
+# Takes one optional argument, which is the commit or tag to create a
+# tarball of. With no arg, HEAD is used.
+
+# Version number example: 0.0.1+20200227_ad7ec17
+
+## Config:
+PRGNAM=gtetrinet
+CLONE_URL=https://github.com/tatankat/gtetrinet
+## End of config.
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERMAIN="$( grep AC_INIT configure.ac | cut -d, -f2 | sed 's,\[\(.*\)\],\1,' )"
+VERSION=${VERMAIN}_${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=\"$VERSION\""
+echo "MD5SUM=\"$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )\""
diff --git a/games/gtetrinet/gtetrinet.SlackBuild b/games/gtetrinet/gtetrinet.SlackBuild
new file mode 100644
index 000000000000..cd0b68e3106b
--- /dev/null
+++ b/games/gtetrinet/gtetrinet.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+# Slackware build script for gtetrinet
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This game has been around since the 90s, I used to play it on
+# Slackware back when Slackware still had GNOME.
+# For a long time, gtetrinet required a lot of gnome dependencies,
+# so I never bothered making a SlackBuild for it. Thanks to r0ni for
+# finding this gtk3 port of it.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=gtetrinet
+VERSION=${VERSION:-0.8.0_20220828_6d816ee}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# desktop-file-validate complains a bit... also use absolute path
+# to binary.
+sed -i -e 's,GNOME;Application;,,' \
+ -e '/^Exec/s,gtetrinet,/usr/games/&,' \
+ $PRGNAM.desktop.in
+
+autoreconf -if
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --bindir=/usr/games \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+gzip $PKG/usr/man/man?/*
+
+# only icon included is 40x40, pre-upscale to 48x48 too.
+HICOLOR=$PKG/usr/share/icons/hicolor
+mkdir -p $HICOLOR/{40x40,48x48}/apps
+ln -s ../../../../pixmaps/$PRGNAM.png $HICOLOR/40x40/apps/$PRGNAM.png
+convert -resize 48x48 $PRGNAM.png $HICOLOR/48x48/apps/$PRGNAM.png
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS COPYING NEWS README* TODO $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
diff --git a/games/gtetrinet/gtetrinet.info b/games/gtetrinet/gtetrinet.info
new file mode 100644
index 000000000000..87a7df925c88
--- /dev/null
+++ b/games/gtetrinet/gtetrinet.info
@@ -0,0 +1,10 @@
+PRGNAM="gtetrinet"
+VERSION="0.8.0_20220828_6d816ee"
+HOMEPAGE="https://github.com/tatankat/gtetrinet"
+DOWNLOAD="https://slackware.uk/~urchlay/src/gtetrinet-0.8.0_20220828_6d816ee.tar.xz"
+MD5SUM="149e03efb889f7e2ae7ab80584e6007a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/gtetrinet/slack-desc b/games/gtetrinet/slack-desc
new file mode 100644
index 000000000000..89db12ef6615
--- /dev/null
+++ b/games/gtetrinet/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gtetrinet: gtetrinet (multiplayer networked Tetris-like game)
+gtetrinet:
+gtetrinet: GTetrinet is a clone of the popular Tetrinet game for Win95/NT. It is
+gtetrinet: designed to be fully compatible with, and to be identical in gameplay
+gtetrinet: to the original Tetrinet.
+gtetrinet:
+gtetrinet:
+gtetrinet:
+gtetrinet:
+gtetrinet:
+gtetrinet: