From: Georgi Kirilov <kirilov.georgi.s@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: A postinst equivalent in Guix?
Date: Sat, 21 Jan 2017 18:36:36 +0200 [thread overview]
Message-ID: <20170121163636.jyieflzslmyrtrmw@gmail.com> (raw)
In-Reply-To: <87wpdojujk.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Sat, Jan 21, 2017 at 04:34:55PM +0100, Ludovic Courtès wrote:
>To make things more concrete, we could discuss specific packages you are
>interested in and see how we could provide them in Guix{,SD}.
The package is the old bsd-games bundle. Some of the games need to write
score files under /var/lib/bsdgames/
You can find attached my patch so far.
--
Thanks,
Georgi
[-- Attachment #2: games-bsd-games.patch --]
[-- Type: text/x-diff, Size: 4201 bytes --]
From aaac9e7f8d6bb088bc390099445e33135e6bfbc3 Mon Sep 17 00:00:00 2001
From: TwoFinger <Two-Finger@users.noreply.github.com>
Date: Sat, 21 Jan 2017 18:13:48 +0200
Subject: [PATCH] gnu: Add bsd-games
* gnu/packages/games.scm (bsd-games): New variable
* gnu/packages/patches/bsd-games.patch: New file
---
gnu/packages/games.scm | 39 +++++++++++++++++++++++++++++++++++
gnu/packages/patches/bsd-games.patch | 40 ++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
create mode 100644 gnu/packages/patches/bsd-games.patch
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c449f5954..ad4b4f2da 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3068,3 +3068,42 @@ symbols, the game needs graphics to render the non-euclidean world.")
for Un*x systems with X11.")
(home-page "http://olofson.net/kobodl/")
(license license:gpl2+)))
+
+(define-public bsd-games
+ (let ((commit "1e6f16ee747a7c8b6a0b836b12847f79024d0ab6"))
+ (package
+ (name "bsd-games")
+ (version (git-version "2.17" "1" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append "https://github.com/msharov/" name ".git"))
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (patches
+ (search-patches (string-append name ".patch")))
+ (sha256
+ (base32
+ "15hazzgy0z5c17rqzvahaw4z0c4n2sdq56mi8lsja56yr1w5n6y3"))))
+ (build-system gnu-build-system)
+ (inputs `(("ncurses" ,ncurses)))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "CC" "gcc")
+ (let* ((out (assoc-ref outputs "out"))
+ (var (string-append out "/var")))
+ (zero?
+ (system* "./configure"
+ (string-append "--prefix=" out)
+ (string-append "--localstatedir=" var)))))))))
+ (home-page "https://www.polyomino.org.uk/computer/software/bsd-games/")
+ (synopsis "Linux port of the collection of BSD command line games")
+ (description "Port of most of the games from NetBSD-current.
+Games included:
+atc battlestar caesar cribbage dab drop4 fish gomoku
+hack hangman klondike robots sail snake worm wump")
+ (license license:bsd-4))))
diff --git a/gnu/packages/patches/bsd-games.patch b/gnu/packages/patches/bsd-games.patch
new file mode 100644
index 000000000..9a153f535
--- /dev/null
+++ b/gnu/packages/patches/bsd-games.patch
@@ -0,0 +1,40 @@
+commit 5a7ed4b23b20b239b0788b2cefe1d2819c80aa1a
+Author: TwoFinger <Two-Finger@users.noreply.github.com>
+Date: Sat Jan 21 14:22:30 2017 +0200
+
+ No chgrp /var/lib/bsdgames
+
+diff --git a/Config.mk.in b/Config.mk.in
+index fbdae93..851421a 100644
+--- a/Config.mk.in
++++ b/Config.mk.in
+@@ -13,7 +13,7 @@ INSTALL := @INSTALL@
+
+ INSTALLEXE := ${INSTALL} -D -p -m 755 -s
+ INSTALLDATA := ${INSTALL} -D -p -m 644
+-INSTALLSCORE := ${INSTALL} -D -p -m 664 -g users
++INSTALLSCORE := ${INSTALL} -D -p -m 664
+ RMPATH := rmdir -p --ignore-fail-on-non-empty
+
+ ################ Destination #########################################
+@@ -21,7 +21,7 @@ RMPATH := rmdir -p --ignore-fail-on-non-empty
+ prefix := @prefix@
+ BINDIR := @bindir@
+ MANDIR := @mandir@
+-STATEDIR := @localstatedir@/${NAME}
++STATEDIR := @localstatedir@/lib/${NAME}
+ DATADIR := @datadir@/${NAME}
+
+ WORDLIST := @wordlist@
+diff --git a/hack/Module.mk b/hack/Module.mk
+index 971bcf1..4ab0eb6 100644
+--- a/hack/Module.mk
++++ b/hack/Module.mk
+@@ -51,7 +51,6 @@ ${hack/SCOREI}: ${STATEDIR}/hack
+ ${STATEDIR}/hack:
+ @echo "Creating hack dir and score files ..."
+ @mkdir -m 755 ${STATEDIR}/hack
+- @chgrp users ${STATEDIR}/hack
+ @${INSTALLSCORE} /dev/null ${STATEDIR}/hack/perm
+ @${INSTALLSCORE} /dev/null ${STATEDIR}/hack/record
+
--
2.11.0
next prev parent reply other threads:[~2017-01-21 16:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 18:30 A postinst equivalent in Guix? Georgi Kirilov
2017-01-20 6:23 ` John Darrington
2017-01-20 14:09 ` Ludovic Courtès
2017-01-21 14:39 ` Georgi Kirilov
2017-01-21 15:34 ` Ludovic Courtès
2017-01-21 16:36 ` Georgi Kirilov [this message]
2017-01-23 9:34 ` Ludovic Courtès
2017-01-25 0:26 ` Christopher Allan Webber
2017-01-25 13:15 ` Ludovic Courtès
2017-01-25 13:42 ` John Darrington
2017-01-25 16:19 ` Christopher Allan Webber
2017-01-25 14:54 ` Georgi Kirilov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170121163636.jyieflzslmyrtrmw@gmail.com \
--to=kirilov.georgi.s@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).