guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: colobot: Update to 0.1.12-alpha.


From: guix-commits
Subject: 01/01: gnu: colobot: Update to 0.1.12-alpha.
Date: Tue, 26 Feb 2019 18:35:31 -0500 (EST)

ngz pushed a commit to branch master
in repository guix.

commit 2dad4c910ab9b0ca1cb86592e101b5c6d50ce3f1
Author: Nicolas Goaziou <address@hidden>
Date:   Wed Feb 27 00:21:58 2019 +0100

    gnu: colobot: Update to 0.1.12-alpha.
    
    * gnu/packages/games.scm (colobot): Update to 0.1.12-alpha.
    [source]: Do not use unstable tarball.
    [native-inputs]: Remove "colobot-data", now fetched with recursive
    `git-fetch'.
---
 gnu/packages/games.scm | 61 +++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ac53979..9976216 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5225,54 +5225,49 @@ Github or Gitlab.")
 (define-public colobot
   (package
     (name "colobot")
-    (version "0.1.11.1-alpha")
+    (version "0.1.12-alpha")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/colobot/colobot/archive/";
-                           "colobot-gold-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/colobot/colobot.git";)
+             (commit (string-append "colobot-gold-" version))
+             (recursive? #t)))          ;for "data/" subdir
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "0h6f4icarramhjkxxbzz6siv3v11z5r8ghqisgr1rscw217vhmwf"))))
+         "1c181cclkrnspgs07lvndg2c81cjq3smkv7qim8c470cj88rcrp2"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ;no test
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-data
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((data (assoc-ref inputs "colobot-data")))
-               (invoke "tar" "-xvf" data "-Cdata" "--strip-components=1")
-               #t)))
-         (add-after 'unpack-data 'install-music
+         (add-after 'unpack 'make-git-checkout-writable
+           (lambda _
+             (for-each make-file-writable (find-files "."))
+             #t))
+         (add-after 'unpack 'fix-directories
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("(\\$\\{CMAKE_INSTALL_PREFIX\\})/games" _ prefix)
+                (string-append prefix "/bin"))
+               (("(\\$\\{CMAKE_INSTALL_PREFIX\\}/share)/games/colobot" _ 
prefix)
+                (string-append prefix "/colobot")))
+             #t))
+         (add-after 'fix-directories 'install-music
+           ;; Retrieve and install music files.
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Installation process tries to download music files using
-             ;; "wget" if not already present.  Since we are going to install
-             ;; them, skip "wget" command check.
+             ;; "wget" if not already present.  Since we are going another
+             ;; route, skip "wget" command check.
              (substitute* "data/music/CMakeLists.txt"
                (("find_program\\(WGET wget\\)") ""))
-             ;; Effectively install music.
+             ;; Populate "music/" directory.
              (let ((data (assoc-ref inputs "colobot-music")))
-               (invoke "tar" "-xvf" data "-Cdata/music")
-               #t)))
-         (add-after 'install 'fix-install-directory
-           ;; Move binary from "games/" to "bin/".
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (rename-file (string-append out "/games")
-                            (string-append out "/bin"))
-               #t))))))
+               (invoke "tar" "-xvf" data "-Cdata/music"))
+             #t)))))
     (native-inputs
-     `(("colobot-data"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append
-                 "https://github.com/colobot/colobot-data/archive/";
-                 "colobot-gold-" version ".tar.gz"))
-           (sha256
-            (base32
-             "0riznycx2jbxmg4m9nn3mcpqws2c0s7cn2m9skz9zj1w39r5qpjy"))))
-       ("colobot-music"
+     `(("colobot-music"
         ,(origin
            (method url-fetch)
            (uri (string-append "https://colobot.info/files/music/";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]