From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georgi Kirilov Subject: Re: A postinst equivalent in Guix? Date: Sat, 21 Jan 2017 18:36:36 +0200 Message-ID: <20170121163636.jyieflzslmyrtrmw@gmail.com> References: <87efzxakmi.fsf@gnu.org> <20170121143923.vdmmljvc3ngksuze@gmail.com> <87wpdojujk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="atttfnddblvya7qk" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUyel-0005Dn-QN for guix-devel@gnu.org; Sat, 21 Jan 2017 11:36:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUyej-00055a-VN for guix-devel@gnu.org; Sat, 21 Jan 2017 11:36:47 -0500 Content-Disposition: inline In-Reply-To: <87wpdojujk.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org --atttfnddblvya7qk Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --atttfnddblvya7qk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="games-bsd-games.patch" >From aaac9e7f8d6bb088bc390099445e33135e6bfbc3 Mon Sep 17 00:00:00 2001 From: TwoFinger 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 +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 --atttfnddblvya7qk--