guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: liblinphone: Move documentation and tester to separate outpu


From: guix-commits
Subject: 03/03: gnu: liblinphone: Move documentation and tester to separate outputs.
Date: Mon, 27 Apr 2020 00:58:09 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 9c63165d9ee33a7a7e9017d7a36f658b5c2c415c
Author: Maxim Cournoyer <address@hidden>
AuthorDate: Mon Apr 27 00:50:48 2020 -0400

    gnu: liblinphone: Move documentation and tester to separate outputs.
    
    * gnu/packages/linphone.scm (liblinphone)[outputs]: Add a "doc" and "tester"
    outputs.
    [phases]: Add a separate-outputs phase.  Move the
    glib-or-gtk-compile-schemas and glib-or-gtk-wrap phases after it.
---
 gnu/packages/linphone.scm | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 09d5a11..e7d3cf7 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -416,6 +416,7 @@ decoding, and rendering.")
                        "/linphone-" version ".tar.gz"))
        (sha256
         (base32 "0phhkx55xdyg28d4wn8l8q4yvsmdgzmjiw584d4s190sq1azm91x"))))
+    (outputs '("out" "doc" "tester"))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; No test target
@@ -436,16 +437,37 @@ decoding, and rendering.")
                   (guix build utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'glib-or-gtk-compile-schemas
-           (assoc-ref glib-or-gtk:%standard-phases 
'glib-or-gtk-compile-schemas))
-         (add-after 'install 'glib-or-gtk-wrap
-           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
          (add-after 'unpack 'patch
            (lambda _
              (substitute* "gtk/main.c"
                (("#include \"liblinphone_gitversion.h\"")
                 ""))
-             #t)))))
+             #t))
+         (add-after 'install 'separate-outputs
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc"))
+                    (tester (assoc-ref outputs "tester"))
+                    (tester-name (string-append ,name "_tester")))
+               ;; Copy the tester executable.
+               (mkdir-p (string-append tester "/bin"))
+               (rename-file (string-append out "/bin/" tester-name)
+                            (string-append tester "/bin/" tester-name))
+               ;; Copy the tester data files.
+               (mkdir-p (string-append tester "/share/"))
+               (rename-file (string-append out "/share/" tester-name)
+                            (string-append tester "/share/" tester-name))
+               ;; Copy the HTML and XML documentation.
+               (copy-recursively
+                (string-append out "/share/doc/linphone-" ,version)
+                (string-append doc "/share/doc/" ,name "-" ,version))
+               (delete-file-recursively
+                (string-append out "/share/doc/linphone-" ,version))
+               #t)))
+         (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
+           (assoc-ref glib-or-gtk:%standard-phases 
'glib-or-gtk-compile-schemas))
+         (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
+           (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("udev" ,eudev)                  ;for libudev.h



reply via email to

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