summaryrefslogtreecommitdiffstats
path: root/games/tetrinet
diff options
context:
space:
mode:
Diffstat (limited to 'games/tetrinet')
-rw-r--r--games/tetrinet/README21
-rw-r--r--games/tetrinet/man/tetrinet-server.6135
-rw-r--r--games/tetrinet/man/tetrinet.6180
-rw-r--r--games/tetrinet/patches/check_term_size.diff19
-rw-r--r--games/tetrinet/patches/compilefix.diff93
-rw-r--r--games/tetrinet/patches/gcc10.diff25
-rw-r--r--games/tetrinet/patches/tab_key.diff52
-rw-r--r--games/tetrinet/patches/vikeys.diff35
-rw-r--r--games/tetrinet/slack-desc19
-rw-r--r--games/tetrinet/tetrinet.SlackBuild122
-rw-r--r--games/tetrinet/tetrinet.info10
11 files changed, 711 insertions, 0 deletions
diff --git a/games/tetrinet/README b/games/tetrinet/README
new file mode 100644
index 0000000000..60b530aba6
--- /dev/null
+++ b/games/tetrinet/README
@@ -0,0 +1,21 @@
+tetrinet (networked multiplayer deathmatch Tetris)
+
+Gee, Tetris? Whats that? Yeah, yeah, so it's been done 2 billion
+times before (give or take a few bil), but this is different!
+Yes, all you tetris addicts out there be prepared for even MORE
+excitement.. internet tetris! Now you can play your five best buddies
+in one of the most well known games in existence!
+
+This contains the (n)curses client and the server. Note that you'll
+have to run the client in a terminal window at least 50 lines high.
+Resize or maximize your xterm/konsole/etc window. If you're at the
+framebuffer console, try loading a smaller-sized font.
+
+If your F1/F2/F3 keys don't work in this game, you can press Tab to
+cycle between the three windows instead. Also, if your arrow keys
+don't work (or if you just prefer vi bindings), you can use H J K
+L instead.
+
+The tetrinet-server included here is fairly bare-bones, compared to
+tetrinetx. However, unlike tetrinetx, it does support the TetriFAST
+game mode.
diff --git a/games/tetrinet/man/tetrinet-server.6 b/games/tetrinet/man/tetrinet-server.6
new file mode 100644
index 0000000000..c2b40d8a11
--- /dev/null
+++ b/games/tetrinet/man/tetrinet-server.6
@@ -0,0 +1,135 @@
+.TH "TETRINET-SERVER" "6" "2023-02-13"
+.\" Please adjust this date whenever revising the manpage.
+.SH "NAME"
+tetrinet-server \- server program for tetrinet
+
+
+.SH "SYNOPSIS"
+.B tetrinet\-server
+
+
+.SH "DESCRIPTION"
+.B tetrinet\-server
+is a server program for
+.BR tetrinet (6),
+a networked version of tetris. You can use it to serve both a TetriFast and an
+original server for up to 6 people to connect and play. It doesn't support any
+fancy features like different channels, but still includes support for
+configurable cookie mode and a small winlist.
+
+.PP
+
+.SH "OPTIONS"
+.B tetrinet-server
+doesn't take any options at all. It reads all its settings from
+.I ~/.tetrinet
+on startup and creates a default file if there isn't one already there.
+
+.SH "NOTE"
+
+.B tetrinet\-server
+does not fork into the background or run as a daemon. If you want to
+run it this way, start it with a command like:
+
+.BI\ nohup\ tetrinet\-server\ >tetsrv.log\ 2>&1\ </dev/null\ &
+
+.SH "EXAMPLES"
+This is a short explanation of the configuration file
+.I ~/.tetrinet
+together with its default entries. It is written after every game or when the
+server quits. If it is not there, it will be created automatically.
+
+.TP
+.BI winlist\ "Alcan;0;3;1 AndrewK;0;2;1"
+This is the winlist the server keeps. Each parameter consists of four
+semicolon-seperated fields:
+.IR Name ; Team ; Points ; Games .\ Team
+is a flag which is either
+.I 1
+if the entry is for a team or
+.I 0
+if the entry is for a player.
+.I Points
+is just the number of points for the entry, and
+.I Games
+is the number of games the entry has participated.
+
+.TP
+.BI classic\ 1
+Sets classic mode for the game - that means, no cookies.
+
+.TP
+.BI initiallevel\ 1
+Sets the level in which the game will start.
+
+.TP
+.BI linesperlevel\ 2
+Defines how many lines will issue a level increase.
+
+.TP
+.BI levelinc\ 1
+How many levels are increased per
+.B linesperlevel
+removed lines.
+
+.TP
+.BI averagelevels\ 1
+The levels of all player get averaged if this is set to
+.IR 1 .
+
+.TP
+.BI speciallines\ 1
+How many lines must be removed to get specials.
+
+.TP
+.BI specialcount\ 1
+The number of specials that are added each time
+.BR speciallines '
+lines are removed.
+
+.TP
+.BI specialcapacity\ 18
+This number tells you how many specials you can hold.
+
+.TP
+.BI pieces\ "14 14 15 14 14 14 15"
+Sets the likeliness of the different pieces. Must sum up to 100. The order is:
+bar (dark blue), square (yellow), reverse-L (green), L (purple), Z (red), S
+(light blue), and T (yellow).
+
+.TP
+.BI specials\ "18 18 3 12 0 16 3 12 18"
+Sets the likeliness of the different specials. Must sum up to 100. The order
+is: A, C, N, R, S, B, G, Q, O.
+
+.TP
+.BI linuxmode\ 0
+This setting selects whether the client should try to remain compatible with
+Windows clients. This only affects the winlist display; if
+.B linuxmode
+is set to
+.IR 1 ,
+the server will send the number of games played by each player as well as
+points won. This is set to zero by default.
+
+.TP
+.BI ipv6_only\ 0
+Listen on ipv6 only.
+
+
+.SH "FILES"
+.TP
+.I ~/.tetrinet
+The configuration file for
+.BR tetrinet-server .
+
+
+.SH "AUTHOR"
+This manual page was written by Gerfried Fuchs <alfie@ist.org>,
+and modified by B. Watson <urchlay@slackware.uk>.
+
+
+.SH "SEE ALSO"
+.BR tetrinet (6),
+.BR gtetrinet (6),
+.BR tetrinetx (6).
diff --git a/games/tetrinet/man/tetrinet.6 b/games/tetrinet/man/tetrinet.6
new file mode 100644
index 0000000000..c754c026f1
--- /dev/null
+++ b/games/tetrinet/man/tetrinet.6
@@ -0,0 +1,180 @@
+.TH TETRINET 6 "2023-02-13"
+.\" Please adjust this date whenever revising the manpage.
+
+.SH NAME
+tetrinet \- textmode client program for tetrinet
+
+
+.SH SYNOPSIS
+.B tetrinet
+.RB [\| \-fancy \|]
+.RB [\| \-fast \|]
+.RB [\| \-log
+.IR file \|]
+.RB [\| \-noshadow \|]
+.RB [\| \-noslide \|]
+.RB [\| \-slide \|]
+.RB [\| \-shadow \|]
+.RB [\| \-windows \|]
+.I nickname server
+
+
+.SH DESCRIPTION
+.B tetrinet
+is a textmode client program for tetrinet, a networked version of tetris. You
+can play both on TetriFast server and on the original servers with it. Please
+notice that your terminal needs to be at least 50 lines high, to be able to play it.
+
+
+.SH OPTIONS
+A summary of options is included below.
+
+
+.TP
+.B \-fancy
+Use "fancy" TTY graphics. (Note that this will slow down redraws somewhat.)
+
+
+.TP
+.B \-fast
+Use the "tetrifast" mode to connect to the server. This mode eliminates the
+delay before a new cube appears, thus speeding the game up noticeably. This
+mode is incompatible with the classic mode and the server has to support it.
+If in doubt, ask the other players.
+
+
+.TP
+.BI \-log\ file
+Log network traffic to the given file. All lines start with an absolute time
+(seconds) in brackets. Lines sent from the client to the server are prefixed
+with ">>>", and lines from the server to the client are prefixed with "<<<".
+This could be used with a utility program to replay a game later on (though
+such a program is not currently included in the Tetrinet distribution.)
+
+
+.TP
+.B \-noshadow
+Do not make pieces cast "shadows" when they are slowly falling. (Normally the
+area under piece is filled by dim dots to help to determine where the piece
+would hit the ground if one would press the spacebar.)
+
+
+.TP
+.B \-noslide
+Do not allow pieces to "slide" after being dropped with the spacebar.
+(Normally, there is a short time after pressing the spacebar during which a
+piece can "slide" left or right before it solidifies.)
+
+
+.TP
+.B \-shadow
+Opposite of
+.BR \-noshadow ;
+make the pieces cast "shadows". Can speed up gameplay considerably, but it can
+be considered as cheating by some people since some other tetrinet clients lack
+this.
+
+
+.TP
+.B \-slide
+Opposite of
+.BR \-noslide ;
+allows pieces to "slide" after being dropped. If both
+.BR \-slide\ and\ \-noslide
+are given,
+.B \-slide
+takes precedence. If both
+.BR \-windows\ and\ \-slide
+are given, this overrides the "no sliding" part of
+.B \-windows
+without affecting the other changes in program behavior.
+
+
+.TP
+.B \-windows
+Behave as much like the Windows version of Tetrinet as possible. Implies
+.BR \-noslide\ and\ \-noshadow .
+
+
+.SH USAGE
+When you start
+.B tetrinet
+you will find yourself in the partyline. In here you can chat with the other
+players. With
+.I /help
+you will get the list of the server supported commands. You can switch between
+three screens with
+.I F1
+through
+.IR F3 ,
+or with the
+.I Tab
+key.
+.P
+With
+.I /start
+you can start a game (if you are in position one). You will have to switch over
+to the Fields with the
+.I F1
+key (an automatic switch over on game start is planned). To pause a running game
+you have to enter
+.I /pause
+in the partyline. To restart the game you enter
+.IR /unpause .
+.SH CONTROLS
+You can use either the arrow keys or vi\-style movement keys.
+.TP
+.B Left, h
+Move the piece left.
+.TP
+.B Right, l
+Move the piece right.
+.TP
+.B Up, k, x
+Rotate clockwise.
+.TP
+.B Down, j
+Move the piece down.
+.TP
+.B z
+Rotate counterclockwise.
+.TP
+.B Space
+Drop (move piece down until it hits something).
+.TP
+.B 1 to 6
+Use special block on player number 1 to 6.
+.TP
+.B d
+Drop (get rid of) unwanted special block.
+.TP
+.B t
+Talk (chat).
+.SH GAMEPLAY
+You have to fill the lines completely, because complete lines
+will get removed from the display. The more lines you can eliminate with a
+single stone the better. If the play room supports specials you will eventually
+see a list of letters below your playfield that you can use with the number
+keys from
+.I 1
+to
+.IR 6
+for the corresponding playfield.
+If you want to get rid of a special, drop it with
+.IR d .
+You can also chat in the playfield, to open the chat box press
+.I t
+(for
+.BR t alk.)
+That's it, more or less.
+
+
+.SH AUTHOR
+This manual page was written by Gerfried Fuchs <alfie@ist.org>,
+and modified by B. Watson <urchlay@slackware.uk>.
+
+
+.SH "SEE ALSO"
+.BR tetrinet-server (6),
+.BR gtetrinet (6),
+.BR tetrinetr (6).
diff --git a/games/tetrinet/patches/check_term_size.diff b/games/tetrinet/patches/check_term_size.diff
new file mode 100644
index 0000000000..31c1896ec4
--- /dev/null
+++ b/games/tetrinet/patches/check_term_size.diff
@@ -0,0 +1,19 @@
+diff -Naur tetrinet-0.11/tty.c tetrinet-0.11.patched/tty.c
+--- tetrinet-0.11/tty.c 2003-09-11 16:26:53.000000000 -0400
++++ tetrinet-0.11.patched/tty.c 2020-11-21 00:53:04.798758121 -0500
+@@ -237,6 +237,15 @@
+ if ((has_color = has_colors()))
+ start_color();
+ getmaxyx(stdscr, scrheight, scrwidth);
++
++ if(scrheight < 50 || scrwidth < 80) {
++ screen_cleanup();
++ fprintf(stderr,
++ "Terminal size %dx%d is too small. Minimum is 80x50.\n",
++ scrwidth, scrheight);
++ exit(-1);
++ }
++
+ scrwidth--; /* Don't draw in last column--this can cause scroll */
+
+ /* Cancel all this when we exit. */
diff --git a/games/tetrinet/patches/compilefix.diff b/games/tetrinet/patches/compilefix.diff
new file mode 100644
index 0000000000..868e55aa3b
--- /dev/null
+++ b/games/tetrinet/patches/compilefix.diff
@@ -0,0 +1,93 @@
+diff -Naur tetrinet-0.11/server.c tetrinet-0.11.patched/server.c
+--- tetrinet-0.11/server.c 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11.patched/server.c 2020-11-20 22:06:44.851665337 -0500
+@@ -839,7 +839,7 @@
+
+ if (listen_sock >= 0 && FD_ISSET(listen_sock, &fds)) {
+ struct sockaddr_in sin;
+- int len = sizeof(sin);
++ socklen_t len = sizeof(sin);
+ fd = accept(listen_sock, (struct sockaddr *)&sin, &len);
+ if (fd >= 0) {
+ for (i = 0; i < 6 && player_socks[i] != -1; i++)
+@@ -857,7 +857,7 @@
+ #ifdef HAVE_IPV6
+ if (listen_sock6 >= 0 && FD_ISSET(listen_sock6, &fds)) {
+ struct sockaddr_in6 sin6;
+- int len = sizeof(sin6);
++ socklen_t len = sizeof(sin6);
+ fd = accept(listen_sock6, (struct sockaddr *)&sin6, &len);
+ if (fd >= 0) {
+ for (i = 0; i < 6 && player_socks[i] != -1; i++)
+diff -Naur tetrinet-0.11/sockets.c tetrinet-0.11.patched/sockets.c
+--- tetrinet-0.11/sockets.c 2003-09-09 15:15:04.000000000 -0400
++++ tetrinet-0.11.patched/sockets.c 2020-11-20 22:06:44.852665337 -0500
+@@ -66,7 +66,7 @@
+ if (c == 0xFF)
+ ptr--;
+ *ptr = 0;
+- if (log) {
++ if (logging) {
+ if (!logfile)
+ logfile = fopen(logname, "a");
+ if (logfile) {
+@@ -89,7 +89,7 @@
+ unsigned char c = 0xFF;
+ int n = 0;
+
+- if (log) {
++ if (logging) {
+ if (!logfile)
+ logfile = fopen(logname, "a");
+ if (logfile) {
+diff -Naur tetrinet-0.11/tetrinet.c tetrinet-0.11.patched/tetrinet.c
+--- tetrinet-0.11/tetrinet.c 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11.patched/tetrinet.c 2020-11-20 22:09:01.677652899 -0500
+@@ -21,7 +21,7 @@
+ /*************************************************************************/
+
+ int fancy = 0; /* Fancy TTY graphics? */
+-int log = 0; /* Log network traffic to file? */
++int logging = 0; /* Log network traffic to file? */
+ char *logname; /* Log filename */
+ int windows_mode = 0; /* Try to be just like the Windows version? */
+ int noslide = 0; /* Disallow piece sliding? */
+@@ -83,7 +83,7 @@
+ winlist[i].team = 0;
+ s++;
+ strncpy(winlist[i].name, s, sizeof(winlist[i].name)-1);
+- winlist[i].name[sizeof(winlist[i].name)] = 0;
++ winlist[i].name[sizeof(winlist[i].name)-1] = 0;
+ winlist[i].points = atoi(t);
+ if ((t = strchr(t, ';')) != NULL)
+ winlist[i].games = atoi(t+1);
+@@ -560,7 +560,7 @@
+ char *nick = NULL, *server = NULL;
+ char buf[1024];
+ char nickmsg[1024];
+- unsigned char ip[4];
++ char ip[4];
+ char iphashbuf[32];
+ int len;
+ #ifdef BUILTIN_SERVER
+@@ -590,7 +590,7 @@
+ if (strcmp(av[i], "-fancy") == 0) {
+ fancy = 1;
+ } else if (strcmp(av[i], "-log") == 0) {
+- log = 1;
++ logging = 1;
+ i++;
+ if (i >= ac) {
+ fprintf(stderr, "Option -log requires an argument\n");
+diff -Naur tetrinet-0.11/tetrinet.h tetrinet-0.11.patched/tetrinet.h
+--- tetrinet-0.11/tetrinet.h 2003-09-07 12:12:51.000000000 -0400
++++ tetrinet-0.11.patched/tetrinet.h 2020-11-20 22:06:44.852665337 -0500
+@@ -74,7 +74,7 @@
+ /* Externs */
+
+ extern int fancy;
+-extern int log;
++extern int logging;
+ extern char *logname;
+ extern int windows_mode;
+ extern int noslide;
diff --git a/games/tetrinet/patches/gcc10.diff b/games/tetrinet/patches/gcc10.diff
new file mode 100644
index 0000000000..d71d5a2fbb
--- /dev/null
+++ b/games/tetrinet/patches/gcc10.diff
@@ -0,0 +1,25 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Fix FTBFS with GCC 10
+Bug-Debian: https://bugs.debian.org/957872
+
+--- a/tetris.c
++++ b/tetris.c
+@@ -32,6 +32,7 @@
+ signed char specials[MAX_SPECIALS] = {-1}; /* Special block inventory */
+ int next_piece; /* Next piece to fall */
+
++PieceData piecedata[7][4];
+ static struct timeval timeout; /* Time of next action */
+ int current_piece; /* Current piece number */
+ int current_rotation; /* Current rotation value */
+--- a/tetris.h
++++ b/tetris.h
+@@ -50,7 +50,7 @@
+ char shape[4][4]; /* Shape data for the piece */
+ } PieceData;
+
+-PieceData piecedata[7][4];
++extern PieceData piecedata[7][4];
+
+ extern int current_piece, current_rotation;
+
diff --git a/games/tetrinet/patches/tab_key.diff b/games/tetrinet/patches/tab_key.diff
new file mode 100644
index 0000000000..d938330640
--- /dev/null
+++ b/games/tetrinet/patches/tab_key.diff
@@ -0,0 +1,52 @@
+diff -Naur tetrinet-0.11/tetrinet.c tetrinet-0.11.patched/tetrinet.c
+--- tetrinet-0.11/tetrinet.c 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11.patched/tetrinet.c 2020-11-21 00:43:40.956809377 -0500
+@@ -688,6 +688,18 @@
+ else
+ timeout = -1;
+ i = io->wait_for_input(timeout);
++
++/* 20201121 bkw: make the Tab key cycle between windows. It's 2020
++ and we *still* can't get F-keys working in all terminals. */
++ if(i == 9) {
++ if(dispmode == MODE_FIELDS)
++ i = K_F2;
++ else if(dispmode == MODE_PARTYLINE)
++ i = K_F3;
++ else
++ i = K_F1;
++ }
++
+ if (i == -1) {
+ char buf[1024];
+ if (sgets(buf, sizeof(buf), server_sock))
+diff -Naur tetrinet-0.11/tty.c tetrinet-0.11.patched/tty.c
+--- tetrinet-0.11/tty.c 2003-09-11 16:26:53.000000000 -0400
++++ tetrinet-0.11.patched/tty.c 2020-11-21 00:46:25.038794461 -0500
+@@ -534,7 +534,7 @@
+ hline(MY_HLINE2, scrwidth);
+ attrset(MY_BOLD);
+ move(scrheight-1, 0);
+- addstr("F1=Show Fields F2=Partyline F3=Winlist");
++ addstr("F1=Show Fields F2=Partyline F3=Winlist Tab=Next Window");
+ move(scrheight-1, scrwidth-8);
+ addstr("F10=Quit");
+ attrset(A_NORMAL);
+@@ -978,7 +978,7 @@
+ hline(MY_HLINE2, scrwidth);
+ attrset(MY_BOLD);
+ move(scrheight-1, 0);
+- addstr("F1=Show Fields F2=Partyline F3=Winlist");
++ addstr("F1=Show Fields F2=Partyline F3=Winlist Tab=Next Window");
+ move(scrheight-1, scrwidth-8);
+ addstr("F10=Quit");
+ attrset(A_NORMAL);
+@@ -1057,7 +1057,7 @@
+ hline(MY_HLINE2, scrwidth);
+ attrset(MY_BOLD);
+ move(scrheight-1, 0);
+- addstr("F1=Show Fields F2=Partyline F3=Winlist");
++ addstr("F1=Show Fields F2=Partyline F3=Winlist Tab=Next Window");
+ move(scrheight-1, scrwidth-8);
+ addstr("F10=Quit");
+ attrset(A_NORMAL);
diff --git a/games/tetrinet/patches/vikeys.diff b/games/tetrinet/patches/vikeys.diff
new file mode 100644
index 0000000000..c69d186c6d
--- /dev/null
+++ b/games/tetrinet/patches/vikeys.diff
@@ -0,0 +1,35 @@
+diff -Naur tetrinet-0.11/tetris.c tetrinet-0.11.patched/tetris.c
+--- tetrinet-0.11/tetris.c 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11.patched/tetris.c 2020-11-21 00:32:56.473867963 -0500
+@@ -902,6 +902,7 @@
+ switch (c) {
+ case K_UP: /* Rotate clockwise */
+ case 'x':
++ case 'k':
+ if (piece_waiting)
+ break;
+ rnew = (current_rotation+1) % 4;
+@@ -942,6 +943,7 @@
+ break;
+
+ case K_LEFT: /* Move left */
++ case 'h':
+ if (piece_waiting)
+ break;
+ if (x + pd->left > 0) {
+@@ -957,6 +959,7 @@
+ break;
+
+ case K_RIGHT: /* Move right */
++ case 'l':
+ if (piece_waiting)
+ break;
+ if (x + pd->right < FIELD_WIDTH-1) {
+@@ -972,6 +975,7 @@
+ break;
+
+ case K_DOWN: /* Down one space */
++ case 'j':
+ if (piece_waiting)
+ break;
+ step_down();
diff --git a/games/tetrinet/slack-desc b/games/tetrinet/slack-desc
new file mode 100644
index 0000000000..4f7b00d605
--- /dev/null
+++ b/games/tetrinet/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------------------------------------------------------|
+tetrinet: tetrinet (networked multiplayer deathmatch Tetris)
+tetrinet:
+tetrinet: Gee, Tetris? Whats that? Yeah, yeah, so it's been done 2 billion
+tetrinet: times before (give or take a few bil), but this is different!
+tetrinet: Yes, all you tetris addicts out there be prepared for even MORE
+tetrinet: excitement.. internet tetris! Now you can play your five best buddies
+tetrinet: in one of the most well known games in existence!
+tetrinet:
+tetrinet:
+tetrinet:
+tetrinet:
diff --git a/games/tetrinet/tetrinet.SlackBuild b/games/tetrinet/tetrinet.SlackBuild
new file mode 100644
index 0000000000..8ef23c8dbf
--- /dev/null
+++ b/games/tetrinet/tetrinet.SlackBuild
@@ -0,0 +1,122 @@
+#!/bin/bash
+
+# Slackware build script for tetrinet
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# I started writing this SlackBuid in 2020 and just now remembered to
+# finish it. It's the same version packaged by Debian, so it should
+# interoperate with servers running Debian.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=tetrinet
+VERSION=${VERSION:-0.11+cvs20070911}
+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
+tar xvf $CWD/${PRGNAM}_${VERSION^^}.orig.tar.gz
+cd $PRGNAM
+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 {} \+
+
+# 20230213 bkw: patch came from Debian:
+# http://deb.debian.org/debian/pool/main/t/tetrinet/tetrinet_0.11+CVS20070911-2.1.debian.tar.xz
+patch -p1 < $CWD/patches/gcc10.diff
+
+# 20201120 bkw: fix compiler warnings, at least the ones that look like
+# they might cause real problems.
+patch -p1 < $CWD/patches/compilefix.diff
+
+# 20201120 bkw: we're not building the server into the client, so don't
+# offer it as an option in the help message.
+sed -i '/^" *-server/d' $PRGNAM.c
+
+# 20201121 bkw: since we can't seem to get all the various terminals
+# and ncurses to agree on the escape sequences for F1/F2/F3, allow
+# switching windows with the Tab key. Grr.
+patch -p1 < $CWD/patches/tab_key.diff
+
+# 20201121 bkw: allow vi HJKL movement along with arrow keys. Also
+# make the existing letter keystrokes case-insensitive.
+patch -p1 < $CWD/patches/vikeys.diff
+
+# 20201121 bkw: actually check the terminal size and abort if too
+# small. This won't help if the user resizes the terminal while the
+# game is running, but it's better than starting up an unplayable
+# game.
+patch -p1 < $CWD/patches/check_term_size.diff
+
+# No other way to apply our flags...
+sed -i "/CFLAGS/s|-g|$SLKCFLAGS|" Makefile
+
+# *Finally*:
+make
+
+# Do not use 'make install', no DESTDIR or PREFIX/etc support.
+PKGMAN6=$PKG/usr/man/man6
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/games $PKGMAN6 $PKGDOC
+
+# Man pages come from upstream post-release CVS. I've fixed some
+# typos, cleaned up the formatting, and documented all the stuff the
+# patches do.
+for i in $PRGNAM $PRGNAM-server; do
+ install -s -m0755 $i $PKG/usr/games
+ gzip -9c < $CWD/man/$i.6 > $PKGMAN6/$i.6.gz
+done
+
+# Original upstream calls the client "tetrinet", Debian calls it
+# "tetrinet-client". Use symlinks to support both names.
+ln -s $PRGNAM $PKG/usr/games/$PRGNAM-client
+ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-client.6.gz
+
+cp -a AUTHORS Change* README TODO $PRGNAM.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/tetrinet/tetrinet.info b/games/tetrinet/tetrinet.info
new file mode 100644
index 0000000000..44a5e42fe8
--- /dev/null
+++ b/games/tetrinet/tetrinet.info
@@ -0,0 +1,10 @@
+PRGNAM="tetrinet"
+VERSION="0.11+cvs20070911"
+HOMEPAGE="http://tetrinet.or.cz/"
+DOWNLOAD="http://deb.debian.org/debian/pool/main/t/tetrinet/tetrinet_0.11+CVS20070911.orig.tar.gz"
+MD5SUM="fc42d250e99b65105e61ef34543d598b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"