1 --- netris-0.52.orig/robot.c
2 +++ netris-0.52/robot.c
4 { NULL, 0, FT_read, -1, RobotGenFunc, EM_robot };
6 static int robotProcess;
8 +static FILE *toRobot = NULL;
9 static int toRobotFd, fromRobotFd;
11 static char robotBuf[128];
13 ExtFunc void CloseRobot(void)
15 RemoveEventGen(&robotGen);
16 - if (robotProcess > 0)
17 - RobotCmd(1, "Exit\n");
21 + if (robotProcess > 0)
22 + RobotCmd(1, "Exit\n");
29 static MyEventType RobotGenFunc(EventGenRec *gen, MyEvent *event)
30 --- netris-0.52.orig/curses.c
31 +++ netris-0.52/curses.c
33 static int boardYPos[MAX_SCREENS], boardXPos[MAX_SCREENS];
34 static int statusYPos, statusXPos;
36 +static int screens_dirty = 0;
38 static char *term_vi; /* String to make cursor invisible */
39 static char *term_ve; /* String to make cursor visible */
43 AtExit(CleanupScreens);
45 RestoreSignals(NULL, &oldMask);
50 ExtFunc void CleanupScreens(void)
52 - RemoveEventGen(&keyGen);
54 - OutputTermStr(term_ve, 1);
55 + if (screens_dirty) {
56 + RemoveEventGen(&keyGen);
58 + OutputTermStr(term_ve, 1);
63 ExtFunc void GetTermcapInfo(void)
65 for (y = boardVisible[scr] - 1; y >= 0; --y) {
66 move(boardYPos[scr] - y, boardXPos[scr] - 1);
68 + for (x = boardWidth[scr] - 1; x >= 0; --x)
70 move(boardYPos[scr] - y, boardXPos[scr] + 2 * boardWidth[scr]);
75 ExtFunc void ShowDisplayInfo(void)
77 + if (game == GT_classicTwo) {
78 + move(statusYPos - 5, statusXPos);
79 + printw("Enemy lines: %3d/%4d", enemyLinesCleared, enemyTotalLinesCleared);
81 + move(statusYPos - 4, statusXPos);
82 + printw("My lines: %3d/%4d", myLinesCleared, myTotalLinesCleared);
83 + move(statusYPos - 3, statusXPos);
84 + printw("Won: %3d", won);
85 + move(statusYPos - 2, statusXPos);
86 + printw("Lost: %3d", lost);
88 + move(statusYPos - 1, statusXPos);
90 + case STATE_WAIT_CONNECTION:
91 + addstr("Waiting for opponent... ");
93 + case STATE_WAIT_KEYPRESS:
94 + addstr("Press the key for a new game.");
100 move(statusYPos - 9, statusXPos);
101 printw("Seed: %d", initSeed);
104 printw("Speed: %dms", speed / 1000);
107 - move(statusYPos - 6, statusXPos);
108 + move(statusYPos - 7, statusXPos);
110 addstr("Controlled by a fair robot");
115 if (opponentFlags & SCF_usingRobot) {
116 - move(statusYPos - 5, statusXPos);
117 + move(statusYPos - 6, statusXPos);
118 if (opponentFlags & SCF_fairRobot)
119 addstr("The opponent is a fair robot");
121 --- netris-0.52.orig/game.c
122 +++ netris-0.52/game.c
124 #include <netinet/in.h>
126 enum { KT_left, KT_rotate, KT_right, KT_drop, KT_down,
127 - KT_toggleSpy, KT_pause, KT_faster, KT_redraw, KT_numKeys };
128 + KT_toggleSpy, KT_pause, KT_faster, KT_redraw, KT_new, KT_numKeys };
130 static char *keyNames[KT_numKeys+1] = {
131 "Left", "Rotate", "Right", "Drop", "Down", "ToggleSpy", "Pause",
132 - "Faster", "Redraw", NULL };
133 + "Faster", "Redraw", "New", NULL };
135 static char *gameNames[GT_len] = { "OnePlayer", "ClassicTwo" };
138 static int dropModeEnable = 0;
139 static char *robotProg;
141 +static int wonLast = 0;
142 +int lost = 0, won = 0;
143 +enum States gameState = STATE_STARTING;
145 ExtFunc void MapKeys(char *newKeys)
152 + myLinesCleared = enemyLinesCleared = 0;
153 speed = stepDownInterval;
160 - ClearFullLines(scr2);
162 + int cleared = ClearFullLines(scr2);
164 + enemyLinesCleared += cleared;
165 + enemyTotalLinesCleared += cleared;
185 - linesCleared = ClearFullLines(scr);
186 + myLinesCleared += linesCleared = ClearFullLines(scr);
187 + myTotalLinesCleared += linesCleared;
188 + if (linesCleared) {
192 if (linesCleared > 0 && spied)
193 SendPacket(NP_clear, 0, NULL);
194 if (game == GT_classicTwo && linesCleared > 1) {
195 @@ -350,14 +369,17 @@
196 SendPacket(NP_giveJunk, sizeof(data), data);
205 ExtFunc int main(int argc, char **argv)
207 - int initConn = 0, waitConn = 0, ch;
208 + int initConn = 0, waitConn = 0, ch, done = 0;
209 char *hostStr = NULL, *portStr = NULL;
212 standoutEnable = colorEnable = 1;
213 stepDownInterval = DEFAULT_INTERVAL;
214 @@ -422,112 +444,139 @@
215 if (fairRobot && !robotEnable)
216 fatal("You can't use the -F option without the -r option");
219 - InitRobot(robotProg);
222 - if (initConn || waitConn) {
225 - game = GT_classicTwo;
227 - InitiateConnection(hostStr, portStr);
229 - WaitForConnection(portStr);
234 - data[0] = hton4(MAJOR_VERSION);
235 - data[1] = hton4(PROTOCOL_VERSION);
236 - SendPacket(NP_version, sizeof(data), data);
237 - if (WaitMyEvent(&event, EM_net) != E_net)
238 - fatal("Network negotiation failed");
239 - memcpy(data, event.u.net.data, sizeof(data));
240 - major = ntoh4(data[0]);
241 - protocolVersion = ntoh4(data[1]);
242 - if (event.u.net.type != NP_version || major < MAJOR_VERSION)
243 - fatal("Your opponent is using an old, incompatible version\n"
244 - "of Netris. They should get the latest version.");
245 - if (major > MAJOR_VERSION)
246 - fatal("Your opponent is using an newer, incompatible version\n"
247 - "of Netris. Get the latest version.");
248 - if (protocolVersion > PROTOCOL_VERSION)
249 - protocolVersion = PROTOCOL_VERSION;
251 - if (protocolVersion < 3 && stepDownInterval != DEFAULT_INTERVAL)
252 - fatal("Your opponent's version of Netris predates the -i option.\n"
253 - "For fairness, you shouldn't use the -i option either.");
259 - if (protocolVersion >= 3)
260 - len = sizeof(data);
262 - len = sizeof(netint4[2]);
263 - if ((myFlags & SCF_setSeed))
269 - data[0] = hton4(myFlags);
270 - data[1] = hton4(seed);
271 - data[2] = hton4(stepDownInterval);
272 - SendPacket(NP_startConn, len, data);
273 - if (WaitMyEvent(&event, EM_net) != E_net ||
274 - event.u.net.type != NP_startConn)
275 - fatal("Network negotiation failed");
276 - memcpy(data, event.u.net.data, len);
277 - opponentFlags = ntoh4(data[0]);
278 - seed = ntoh4(data[1]);
280 - if ((opponentFlags & SCF_setSeed) != (myFlags & SCF_setSeed))
281 - fatal("If one player sets the random number seed, "
283 - if ((myFlags & SCF_setSeed) && seed != initSeed)
284 - fatal("Both players have set the random number seed, "
285 - "and they are unequal.");
286 - if (protocolVersion >= 3 && stepDownInterval != ntoh4(data[2]))
287 - fatal("Your opponent is using a different step-down "
288 - "interval (-i).\nYou must both use the same one.");
293 + InitRobot(robotProg);
297 + if (initConn || waitConn) {
298 + game = GT_classicTwo;
299 + if(gameState != STATE_STARTING) {
300 + gameState = STATE_WAIT_CONNECTION;
305 + InitiateConnection(hostStr, portStr);
307 + WaitForConnection(portStr);
308 + gameState = STATE_PLAYING;
315 + data[0] = hton4(MAJOR_VERSION);
316 + data[1] = hton4(PROTOCOL_VERSION);
317 + SendPacket(NP_version, sizeof(data), data);
318 + if (WaitMyEvent(&event, EM_net) != E_net)
319 + fatal("Network negotiation failed");
320 + memcpy(data, event.u.net.data, sizeof(data));
321 + major = ntoh4(data[0]);
322 + protocolVersion = ntoh4(data[1]);
323 + if (event.u.net.type != NP_version || major < MAJOR_VERSION)
324 + fatal("Your opponent is using an old, incompatible version\n"
325 + "of Netris. They should get the latest version.");
326 + if (major > MAJOR_VERSION)
327 + fatal("Your opponent is using an newer, incompatible version\n"
328 + "of Netris. Get the latest version.");
329 + if (protocolVersion > PROTOCOL_VERSION)
330 + protocolVersion = PROTOCOL_VERSION;
332 + if (protocolVersion < 3 && stepDownInterval != DEFAULT_INTERVAL)
333 + fatal("Your opponent's version of Netris predates the -i option.\n"
334 + "For fairness, you shouldn't use the -i option either.");
340 + if (protocolVersion >= 3)
341 + len = sizeof(data);
343 + len = sizeof(netint4[2]);
344 + if ((myFlags & SCF_setSeed))
350 + data[0] = hton4(myFlags);
351 + data[1] = hton4(seed);
352 + data[2] = hton4(stepDownInterval);
353 + SendPacket(NP_startConn, len, data);
354 + if (WaitMyEvent(&event, EM_net) != E_net ||
355 + event.u.net.type != NP_startConn)
356 + fatal("Network negotiation failed");
357 + memcpy(data, event.u.net.data, len);
358 + opponentFlags = ntoh4(data[0]);
359 + seed = ntoh4(data[1]);
361 + if ((opponentFlags & SCF_setSeed) != (myFlags & SCF_setSeed))
362 + fatal("If one player sets the random number seed, "
364 + if ((myFlags & SCF_setSeed) && seed != initSeed)
365 + fatal("Both players have set the random number seed, "
366 + "and they are unequal.");
367 + if (protocolVersion >= 3 && stepDownInterval != ntoh4(data[2]))
368 + fatal("Your opponent is using a different step-down "
369 + "interval (-i).\nYou must both use the same one.");
377 + userName = getenv("LOGNAME");
378 + if (!userName || !userName[0])
379 + userName = getenv("USER");
380 + if (!userName || !userName[0])
381 + strcpy(userName, "???");
382 + len = strlen(userName)+1;
383 + if (len > sizeof(opponentName))
384 + len = sizeof(opponentName);
385 + SendPacket(NP_userName, len, userName);
386 + if (WaitMyEvent(&event, EM_net) != E_net ||
387 + event.u.net.type != NP_userName)
388 + fatal("Network negotiation failed");
389 + strncpy(opponentName, event.u.net.data,
390 + sizeof(opponentName)-1);
391 + opponentName[sizeof(opponentName)-1] = 0;
392 + for (i = 0; opponentName[i]; ++i)
393 + if (!isprint(opponentName[i]))
394 + opponentName[i] = '?';
395 + for (i = 0; opponentHost[i]; ++i)
396 + if (!isprint(opponentHost[i]))
397 + opponentHost[i] = '?';
405 - userName = getenv("LOGNAME");
406 - if (!userName || !userName[0])
407 - userName = getenv("USER");
408 - if (!userName || !userName[0])
409 - strcpy(userName, "???");
410 - len = strlen(userName)+1;
411 - if (len > sizeof(opponentName))
412 - len = sizeof(opponentName);
413 - SendPacket(NP_userName, len, userName);
414 - if (WaitMyEvent(&event, EM_net) != E_net ||
415 - event.u.net.type != NP_userName)
416 - fatal("Network negotiation failed");
417 - strncpy(opponentName, event.u.net.data,
418 - sizeof(opponentName)-1);
419 - opponentName[sizeof(opponentName)-1] = 0;
420 - for (i = 0; opponentName[i]; ++i)
421 - if (!isprint(opponentName[i]))
422 - opponentName[i] = '?';
423 - for (i = 0; opponentHost[i]; ++i)
424 - if (!isprint(opponentHost[i]))
425 - opponentHost[i] = '?';
427 + game = GT_onePlayer;
434 + WaitMyEvent(&event, EM_net);
440 + gameState = STATE_WAIT_KEYPRESS;
443 + while(getchar() != keyTable[KT_new])
449 - game = GT_onePlayer;
456 --- netris-0.52.orig/inet.c
457 +++ netris-0.52/inet.c
460 ExtFunc void InitNet(void)
467 --- netris-0.52.orig/netris.h
468 +++ netris-0.52/netris.h
471 #define DEFAULT_PORT 9284 /* Very arbitrary */
473 -#define DEFAULT_KEYS "jkl mspf^l"
474 +#define DEFAULT_KEYS "jkl mspf^ln"
476 /* Protocol versions */
477 #define MAJOR_VERSION 1
479 typedef int (*ShapeDrawFunc)(int scr, int y, int x,
480 BlockType type, void *data);
485 + STATE_WAIT_CONNECTION,
486 + STATE_WAIT_KEYPRESS
490 EXT int boardHeight[MAX_SCREENS];
491 EXT int boardVisible[MAX_SCREENS], boardWidth[MAX_SCREENS];
492 @@ -167,11 +174,19 @@
494 EXT int myFlags, opponentFlags;
497 +EXT enum States gameState;
499 EXT char scratch[1024];
501 extern ShapeOption stdOptions[];
502 extern char *version_string;
504 +EXT int myLinesCleared;
505 +EXT int enemyLinesCleared;
506 +EXT int myTotalLinesCleared;
507 +EXT int enemyTotalLinesCleared;
511 #endif /* NETRIS_H */
512 --- netris-0.52.orig/util.c
513 +++ netris-0.52/util.c
515 " -p <port> Set port number (default is %d)\n"
516 " -k <keys> Remap keys. The argument is a prefix of the string\n"
517 " containing the keys in order: left, rotate, right, drop,\n"
518 - " down-faster, toggle-spying, pause, faster, redraw.\n"
519 + " down-faster, toggle-spying, pause, faster, redraw, new.\n"
520 " \"^\" prefixes controls. (default is \"%s\")\n"
521 " -i <sec> Set the step-down interval, in seconds\n"
522 " -r <robot> Execute <robot> (a command) as a robot controlling\n"
525 ExtFunc volatile void fatal(char *msg)
528 fprintf(stderr, "%s\n", msg);
531 --- netris-0.52.orig/board.c
532 +++ netris-0.52/board.c
535 ExtFunc void InitBoard(int scr)
539 + for(s = 0 ; s < MAX_SCREENS ; s++)
540 + for(h = 0 ; h < MAX_BOARD_HEIGHT ; h++)
541 + for(w = 0 ; w < MAX_BOARD_WIDTH ; w++) {
542 + board[s][h][w] = 0;
543 + oldBoard[s][h][w] = 0;
546 + oldFalling[s][w] = 0;
550 boardHeight[scr] = MAX_BOARD_HEIGHT;
551 boardVisible[scr] = 20;
552 boardWidth[scr] = 10;
553 --- netris-0.52.orig/debian/watch
554 +++ netris-0.52/debian/watch
557 +# Site/Directory/Pattern Version Script
558 +ftp://ftp.netris.org/pub/netris/netris-([\d\.]+)\.tar\.gz debian uupdate
559 --- netris-0.52.orig/debian/changelog
560 +++ netris-0.52/debian/changelog
562 +netris (0.52-6) unstable; urgency=low
564 + * #include <time.h> in curses.c (closes: #345305)
565 + * Add patch to display line count, contributed by Piotr Krukowiecki
567 + * Bumped Standards-Version to 3.7.2, no changes needed.
568 + * Updated FSF address in copyright file.
570 + -- Gerfried Fuchs <alfie@debian.org> Fri, 08 Sep 2006 14:08:42 -0500
572 +netris (0.52-5) unstable; urgency=low
574 + * Erm, add small fix for 64bit machines from #325926 which was meant to be
575 + in the former upload already.... (closes: #325926)
577 + -- Gerfried Fuchs <alfie@debian.org> Mon, 05 Sep 2005 15:08:18 +0200
579 +netris (0.52-4) unstable; urgency=low
581 + * Bumped standards version, no changes needed.
582 + * Moved menu file from /usr/lib/menu to /usr/share/menu.
584 + -- Gerfried Fuchs <alfie@debian.org> Mon, 05 Sep 2005 14:22:50 +0200
586 +netris (0.52-3) unstable; urgency=low
588 + * Quote all entries in the menu file.
589 + * Fix -s setting, patch from Piotr Krukowiecki, thanks (closes: #300125)
590 + * Fixed short description to not include an upercased article at the start.
591 + * Slightly reformated copyright file a bit.
593 + -- Gerfried Fuchs <alfie@debian.org> Fri, 18 Mar 2005 18:04:22 +0100
595 +netris (0.52-2) unstable; urgency=low
597 + * Applied patch from Per von Zweigbergk for staircase effect (closes: #83039)
598 + * Bumped to policy 3.6.1: No changes needed.
600 + -- Gerfried Fuchs <alfie@debian.org> Thu, 25 Nov 2004 14:24:01 +0100
602 +netris (0.52-1) unstable; urgency=high
604 + * New upstream release which fixes buffer overflow vulnerability
605 + CAN-2003-0685 (closes: #205113) -- no other changes.
606 + * Updated to policy 3.6.0: No changes needed.
608 + -- Gerfried Fuchs <alfie@debian.org> Mon, 18 Aug 2003 21:25:09 +0200
610 +netris (0.5-7) unstable; urgency=low
612 + * Added 'n'ew game key to -k handling option (updated manual page wrt/
613 + this). Don't know though how to make the correct key show up in the
614 + message so simply changed it.
616 + -- Gerfried Fuchs <alfie@debian.org> Fri, 18 Oct 2002 19:35:13 +0200
618 +netris (0.5-6) unstable; urgency=low
620 + * Applied multi game patch with scoring from Tomas Berndtsson, received via
622 + * Removed /usr/doc -> /usr/share/doc handling.
623 + * Removed some superfluous commas from the long description.
625 + -- Gerfried Fuchs <alfie@debian.org> Thu, 26 Sep 2002 22:47:20 +0200
627 +netris (0.5-5) unstable; urgency=low
629 + * Updated watchfile to uscan version=2.
630 + * Updated to policy 3.5.7: Added support for DEB_BUILD_OPTIONS too.
631 + * Remove Makefile, .depend and config.h in clean target, too.
633 + -- Gerfried Fuchs <alfie@debian.org> Mon, 09 Sep 2002 18:19:59 +0200
635 +netris (0.5-4) unstable; urgency=medium
637 + * wrote man page for netris-sample-robot, finally (closes: #19373)
638 + * un-debhelper-ized the package.
639 + * urgency=medium for having the libncurses4 removed from woody (previous
640 + upload forgot to set urgency)
642 + -- Gerfried Fuchs <alfie@debian.org> Mon, 18 Feb 2002 12:59:56 +0100
644 +netris (0.5-3) unstable; urgency=low
647 + * Rebuild against libncurses5 (closes: #93943)
648 + * Added manual page (thanks to Edward Betts for writing it) -- this doesn't
649 + close 19373 though, netris-sample-robot still has no manual page.
650 + * Removed emacs-junk from the end of this file.
651 + * Updated to standards version 3.5.6:
652 + * Fixed the pointer to the GPL in the copyright file.
653 + * Added Build-Depends: debhelper, libncurses5-dev to control file.
654 + * Binaries are stripped (closes: #127381)
655 + * Added watch file.
657 + -- Gerfried Fuchs <alfie@debian.org> Mon, 11 Feb 2002 18:43:49 +0100
659 +netris (0.5-2) unstable; urgency=low
661 + * Change maintainer address
665 + -- Gergely Madarasz <gorgo@sztaki.hu> Tue, 7 Sep 1999 21:17:37 +0200
667 +netris (0.5-1) unstable; urgency=low
669 + * Compile with libncurses4
670 + * Update menu file and standards version
671 + * New upstream version
673 + -- Gergely Madarasz <gorgo@caesar.elte.hu> Thu, 3 Jun 1999 15:19:38 +0200
675 +netris (0.4-3) unstable; urgency=low
677 + * Fix spelling mistake in extended description (Closes: #18922)
678 + * Fix most lintian errors and warnings
679 + * Switch to debhelper
681 + -- Gergely Madarasz <gorgo@caesar.elte.hu> Tue, 10 Mar 1998 22:32:59 +0100
683 +netris (0.4-2) unstable; urgency=low
685 + * move sr.c.gz to /usr/doc/netris/examples (#16920)
687 + -- Gergely Madarasz <gorgo@caesar.elte.hu> Sun, 11 Jan 1998 00:55:16 +0100
689 +netris (0.4-1) unstable; urgency=low
691 + * Changed Configure to use ncurses
694 + -- Gergely Madarasz <gorgo@caesar.elte.hu> Wed, 6 Aug 1997 22:10:42 +0200
695 --- netris-0.52.orig/debian/menu
696 +++ netris-0.52/debian/menu
698 +?package(netris):needs="text" section="Games/Tetris-like" title="Netris" \
699 + command="/usr/games/netris" longtitle="Networked Tetris"
700 --- netris-0.52.orig/debian/control
701 +++ netris-0.52/debian/control
706 +Maintainer: Gerfried Fuchs <alfie@debian.org>
707 +Build-Depends: libncurses5-dev
708 +Standards-Version: 3.7.2
712 +Depends: ${shlibs:Depends}
713 +Description: free, networked version of T*tris
714 + Netris is a free, networked variant of Tetris.
716 + One-player mode is a tad boring at the moment because it never
717 + gets any faster and there's no scoring. This will be rectified
720 + Two players can play against each other. If you fill two or three
721 + lines with one piece your opponent gets respectively one or two
722 + unfilled lines at the bottom of his screen. If you fill even four lines
723 + with one piece your opponent will get four unfilled lines.
725 + This version at least partially supports robots. You can find the
726 + protocol description in the documentation and a sample robot in
728 --- netris-0.52.orig/debian/netris.6
729 +++ netris-0.52/debian/netris.6
731 +.TH netris 6 "3 Aug 2001" "0.5" "Netris"
733 +netris \- networked version of tetris
736 +.RB [\| \-wFDSCHR \|]
750 +The object of the game Tetris is to fit the shapes together forming complete
751 +rows, which then vanish. When the shapes fill up to the top, the game ends.
752 +This version of Tetris can be played against other people over a network.
756 +Wait for connection from another host running netris.
759 +Initiate connection to waiting netris running on
763 +Set the port number to use for connecting to netris, the default port is 9284.
766 +Remap keys, the argument is a prefix of the string containing the keys in
767 +order: left, rotate, right, drop, down-faster, toggle-spying, pause, faster,
768 +redraw and new game. Use the "^" character to prefixes controls. The default
769 +is to use "jkl mspf^ln".
772 +Set the step-down interval, in seconds.
777 +(a command) as a robot controlling the game instead of the keyboard.
780 +Use fair robot interface.
783 +Start with given random seed.
786 +Drops go into drop mode, this means that sliding off a cliff after a drop
788 +another drop automatically.
791 +Disable inverse/bold/color for slow terminals.
797 +Show distribution and warranty information.
800 +Show the rules of the game.
803 +It's just like normal Tetris except that when you clear more than one row with
804 +a single piece, the other player's board is moved up and junk rows are added
805 +to the bottom. If you clear 2, 3 or 4 rows, 1, 2 or 4 junk rows are added to
806 +your opponent's board, respectively. The junk rows have exactly one empty
807 +column. For each group of junk rows given, the empty columns will line up.
808 +This is intentional.
810 +The longest surviving player wins the game.
813 +This mode is currently very boring, because there's no scoring and it never
814 +gets any faster. This will be rectified at some point. I'm not very
815 +motivated to do it right now because I'm sick of one player Tetris. For now,
816 +use the "f" key (by default) to make the game go faster. Speed-ups cannot be
817 +reversed for the remainder of the game.
820 +Netris was written by Mark H. Weaver <mhw@netris.org>.
822 +This manual page was written by Edward Betts <edward@debian.org>, for
823 +the Debian GNU/Linux system (but may be used by others).
824 --- netris-0.52.orig/debian/copyright
825 +++ netris-0.52/debian/copyright
827 +This package was first debianized by Gergely Madarasz <gorgo@caesar.elte.hu> on
828 +Wed, 6 Aug 1997 22:10:42 +0200.
830 +It was downloaded from ftp://ftp.netris.org/pub/netris/
832 + Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
834 + This program is free software; you can redistribute it and/or modify it
835 + under the terms of the GNU General Public License as published by the
836 + Free Software Foundation; either version 2, or (at your option) any
839 + This program is distributed in the hope that it will be useful,
840 + but WITHOUT ANY WARRANTY; without even the implied warranty of
841 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
842 + GNU General Public License for more details.
844 + You should have received a copy of the GNU General Public License
845 + along with this program; if not, write to the Free Software
846 + Foundation, 51 Franklin Street, Fifth Floor,
847 + Boston, MA 02110-1301 USA.
849 +On Debian GNU/Linux systems, the complete text of the GNU General
850 +Public License can be found in `/usr/share/common-licenses/GPL'.
851 --- netris-0.52.orig/debian/README.Debian
852 +++ netris-0.52/debian/README.Debian
857 + I did apply the "new game" patch from Tomas Berndtsson <tomas@nocrew.org>.
858 +This patch is really nice because in multiplayer games, you don't have to exit
859 +and can press 'n' (or whatever key you bound the function to) to start a new
860 +game. For the keybinding stuff I had to patch the patch myself ,-)
862 + I have contacted the upstream maintainer about this patch in June but haven't
863 +heard from him since then. Last contact I had with Mark was in March. If you
864 +have any information about him feel free to contact me.
866 + Ah, and I have another patch sent in by Rob Hensley <zoid@staticky.com>
867 +pending but haven't found the time to examine it closer. It adds a line counter
868 +in single player game mode according to Rob but there is more in it. Some code
871 + -- Gerfried Fuchs <alfie@debian.org> Fri, 18 Oct 2002 19:35:13 +0200
872 --- netris-0.52.orig/debian/rules
873 +++ netris-0.52/debian/rules
876 +# rules file for netris
880 +INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644
881 +INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755
882 +INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755
883 +INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755
885 +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
890 +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
891 + INSTALL_PROGRAM += -s
898 + -rm -rf debian/netris debian/substvars debian/files \
899 + build-stamp install-stamp config.h .depend
908 + $(MAKE) COPT="$(COPT)"
912 +install: install-stamp
913 +install-stamp: build
916 + -rm -rf debian/netris
917 + $(INSTALL_DIR) debian/netris
918 + cd debian/netris && $(INSTALL_DIR) usr/games usr/share/man/man6 \
919 + usr/share/doc/netris/examples
920 + $(INSTALL_PROGRAM) netris debian/netris/usr/games
921 + $(INSTALL_PROGRAM) sr debian/netris/usr/games/netris-sample-robot
922 + $(INSTALL_FILE) debian/netris*.6 debian/netris/usr/share/man/man6
923 + $(INSTALL_FILE) FAQ robot_desc debian/netris/usr/share/doc/netris
924 + $(INSTALL_FILE) sr.c debian/netris/usr/share/doc/netris/examples
925 + gzip -9 debian/netris/usr/share/man/man6/netris*.6 \
926 + debian/netris/usr/share/doc/netris/FAQ \
927 + debian/netris/usr/share/doc/netris/robot_desc \
928 + debian/netris/usr/share/doc/netris/examples/sr.c
929 + touch install-stamp
932 +# Build architecture-independent files here.
934 +# We have nothing to do by default.
937 +# Build architecture-dependent files here.
938 +binary-arch: build install
941 + $(INSTALL_DIR) debian/netris/DEBIAN debian/netris/usr/share/menu
942 + $(INSTALL_FILE) debian/menu debian/netris/usr/share/menu/netris
943 + $(INSTALL_FILE) debian/copyright debian/README.Debian \
944 + debian/netris/usr/share/doc/netris
945 + $(INSTALL_FILE) debian/changelog \
946 + debian/netris/usr/share/doc/netris/changelog.Debian
947 + gzip -9 debian/netris/usr/share/doc/netris/changelog.Debian
948 + $(INSTALL_SCRIPT) debian/postinst debian/postrm \
949 + debian/netris/DEBIAN
950 + dpkg-shlibdeps -Tdebian/substvars -dDepends \
951 + debian/netris/usr/games/netris*
952 + dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars -pnetris \
954 + cd debian/netris && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
955 + xargs -r0 md5sum > DEBIAN/md5sums
956 + dpkg --build debian/netris ..
959 +binary: binary-indep binary-arch
962 + test -f debian/rules
966 + test root = "`whoami`"
969 +.PHONY: clean build install binary-indep binary-arch binary
970 --- netris-0.52.orig/debian/postinst
971 +++ netris-0.52/debian/postinst
974 +# postinst script for netris
976 +if [ "$1" != configure ]; then
980 +if [ -x /usr/bin/update-menus ]; then
983 --- netris-0.52.orig/debian/netris-sample-robot.6
984 +++ netris-0.52/debian/netris-sample-robot.6
986 +.TH netris-sample-robot 6 "16 Feb 2002" "0.5" "Netris Sample Robot"
988 +netris-sample-robot \- sample robot for netris
990 +.B netris-sample-robot
993 +The netris-sample-robot is a sample implementation of the robot protocol. It
994 +plays quite well but isn't too hard to beat. The robot should be started from
995 +netris with the option
997 +to connect or wait for another player to join. You can also let two robots play
998 +against each other in that way, if you like.
1003 +Writes some log information into the file
1005 +in the current working directory. If it can't it bails out.
1009 +To start the netris-sample-robot waiting for another connection with logfile use the following line:
1010 +netris -w -r 'netris-sample-robot -l'
1012 +You then just have to start netris somewhere else which connects to that robot.
1018 +One known bug of the netris-sample-robot is that it hangs quite often. This was
1019 +already filed as a bugreport against the package so please refrain from doing
1020 +so again. If you have an idea why this happens or know a solution how to fix
1021 +it feel free to mail me.
1024 +Netris was written by Mark H. Weaver <mhw@netris.org>.
1026 +This manual page was written by Gerfried Fuchs <alfie@debian.org> for
1027 +the Debian GNU/Linux system (but may be used by others).
1028 --- netris-0.52.orig/debian/postrm
1029 +++ netris-0.52/debian/postrm
1032 +# postrm script for netris
1034 +if [ -x /usr/bin/update-menus ]; then