[bug#34523] Add tetrinet

Message ID E1gytDD-0006xH-NR@rmmprod05.runbox
State Accepted
Headers show
Series [bug#34523] Add tetrinet | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

pkill9 Feb. 27, 2019, 7:01 a.m. UTC
> A ha, I completely missed the imbedded server. Maybe we should mention in the description that it includes a client and server.

Ok I added that

On Tue, 26 Feb 2019 21:40:34 +0100, swedebugia <swedebugia@riseup.net> wrote:

> pkill9@runbox.com skrev: (26 februari 2019 16:44:44 CET)
> >Here is a patch that:
> > - Removes the full stop after 'no tests'
> >- Changes the synopsis from "Multiplayer tetris" to "Multiplayer tetris
> >game".
> > - Replaces the description with what you (swedebugia) suggested.
> >
> >> As an aside I did not find a working server anywhere ... There is a
> >possibility to host your own server with jetrix though.
> >
> >Oh I realised you meant a server program - the tetrinet package builds
> >one called 'tetrinet-server', I tested it just now by running these
> >commands in separate terminals:
> >
> >`tetrinet-server`
> >`tetrinet player1 localhost`
> >`tetrinet player2 localhost`
> >
> >Sending messages as the two different players shows up correctly in
> >each tetrinet client, so I think the server works fine.
> >
> >On Tue, 26 Feb 2019 15:20:28 +0000 (GMT), <pkill9@runbox.com> wrote:
> >
> >> Hi Swedebugia,
> >> 
> >> > having looked it up online I prefer the WP synopsis:
> >> > "TetriNET is a console multiplayer online Tetris game for up to six
> >people."
> >> > 
> >> > There is a gnome version also. We should state clearly that this is
> >a
> >> > console/text-mode client.
> >> 
> >> What does 'WP' mean?
> >> 
> >> > As an aside I did not find a working server anywhere and the
> >homepage of
> >> > the project is dead. There is a possibility to host your own server
> >with
> >> > jetrix though.
> >> 
> >> I played Tetrinet with someone over a server, but I can't remember
> >what the address was.
> >> 
> >> You can't access the homepage of the project? I can access
> >http://tetrinet.or.cz fine. Or do you mean it hasn't been updated in
> >ages?
> >> 
> >> > There could be trademark issues with the name/game also see
> >> > https://en.wikipedia.org/wiki/The_Tetris_Company
> >> 
> >> Regarding the potential trademark issues, both FSF-approved distros
> >Parabola and PureOS have Tetrinet in their repositories[1][2], so I
> >think it would be acceptable to add it to Guix. And if a copyright
> >claim is made in the future it can always be removed.
> >> 
> >> [1] Tetrinet in Parabola -
> >https://www.parabola.nu/packages/?q=tetrinet
> >> [2] Tetrinet in PureOS -
> >https://software.pureos.net/search_pkg?term=tetrinet
> >> 
> >> Thanks
> >> 
> >> On Sat, 23 Feb 2019 07:23:43 +0100, swedebugia
> ><swedebugia@riseup.net> wrote:
> >> 
> >> > On 2019-02-23 10:26, swedebugia wrote:
> >> > > For the sake of making it easy to find when searching synopsies I
> >> > > suggest you add "game" to the end of yours.
> >> > > -- 
> >> > > Sent from my k-9 mail for Android.
> >> > 
> >> > having looked it up online I prefer the WP synopsis:
> >> > "TetriNET is a console multiplayer online Tetris game for up to six
> >people."
> >> > 
> >> > There is a gnome version also. We should state clearly that this is
> >a
> >> > console/text-mode client.
> >> > 
> >> > As an aside I did not find a working server anywhere and the
> >homepage of
> >> > the project is dead. There is a possibility to host your own server
> >with
> >> > jetrix though.
> >> > 
> >> > There could be trademark issues with the name/game also see
> >> > https://en.wikipedia.org/wiki/The_Tetris_Company
> >> > 
> >> > -- 
> >> > Cheers Swedebugia
> 
> A ha, I completely missed the imbedded server. Maybe we should mention in the description that it includes a client and server.
> -- 
> Sent from my k-9 mail for Android.

Patch

From a033d578d57b2d777f5e9b8277dcb4cd42a26ea3 Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Wed, 27 Feb 2019 06:54:46 +0000
Subject: [PATCH] gnu: Add tetrinet.

* gnu/packages/games.scm (tetrinet): New variable.
---
 gnu/packages/games.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f82af0e8c..dedaa922d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -36,6 +36,7 @@ 
 ;;; Copyright © 2018 Madalin Ionel-Patrascu <madalinionel.patrascu@mdc-berlin.de>
 ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6102,3 +6103,44 @@  to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.")
     (home-page "https://www.stepmania.com")
     (license license:expat)))
 
+(define-public tetrinet
+  (package
+    (name "tetrinet")
+    (version "0.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://tetrinet.or.cz/download/tetrinet-"
+             version
+             ".tar.bz2"))
+       (sha256
+        (base32
+         "0b4pddqz6is1771qmvcj8qqlr4in2djdbkk13agvp9yhfah2v8x7"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags '("CC=gcc")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure) ; no configure script.
+                  (add-after 'unpack 'fix-install-dir
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (mkdir-p (string-append out "/bin"))
+                        (substitute* "Makefile"
+                          (("/usr/games") (string-append out "/bin"))))))
+                  (add-after 'install 'install-documentation
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (doc (string-append out "/share/doc/" ,name "-" ,version)))
+                        (for-each (lambda (file)
+                                    (install-file file doc))
+                                  (list "README" "tetrinet.txt"))
+                        #t))))))
+    (home-page "http://tetrinet.or.cz")
+    (synopsis "Multiplayer tetris game")
+    (description "TetriNET is a console multiplayer online Tetris game for
+up to six people.  This package includes the server.")
+    (license license:public-domain)))
-- 
2.20.1