guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: knot-resolver: Move manual, examples to separate "doc" outpu


From: guix-commits
Subject: 02/02: gnu: knot-resolver: Move manual, examples to separate "doc" output
Date: Sun, 6 Dec 2020 05:39:39 -0500 (EST)

iyzsong pushed a commit to branch master
in repository guix.

commit 74e3c37ae0cf8d614c78d6ff0c9da1425025e503
Author: Simon South <simon@simonsouth.net>
AuthorDate: Tue Dec 1 09:45:20 2020 -0500

    gnu: knot-resolver: Move manual, examples to separate "doc" output
    
    * gnu/packages/dns.scm (knot-resolver)[outputs]: Add "doc" output.
    [arguments]<phases>: Add "move-doc" phase, which moves the manual (in both
    HTML and Info formats) and example configuration files to the "doc" output.
    
    Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
 gnu/packages/dns.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 85196e7..d417902 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -949,6 +949,7 @@ synthesis, and on-the-fly re-configuration.")
                 (search-patches
                  "knot-resolver-fix-map-command-on-32-bit.patch"))))
     (build-system meson-build-system)
+    (outputs '("out" "doc"))
     (arguments
      '(#:configure-flags '("-Ddoc=enabled")
        #:phases
@@ -963,6 +964,20 @@ synthesis, and on-the-fly re-configuration.")
          (add-after 'build 'build-doc
            (lambda _
              (invoke "ninja" "doc")))
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Move the manual and the example configuration files to the
+             ;; "doc" output.
+             (let ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/doc/knot-resolver"))
+               (for-each
+                (lambda (dir)
+                  (rename-file (string-append out "/share/" dir)
+                               (string-append doc "/share/" dir)))
+                '("doc/knot-resolver/examples"
+                  "doc/knot-resolver/html"
+                  "info")))))
          (add-after 'install 'wrap-binary
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))



reply via email to

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