unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/1] gnu: offlineimap: Install documentation.
@ 2016-10-26  2:18 Marius Bakke
  2016-10-26  8:22 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Marius Bakke @ 2016-10-26  2:18 UTC (permalink / raw)
  To: guix-devel; +Cc: Marius Bakke

* gnu/packages/mail.scm (offlineimap)[native-inputs]: Add asciidoc and
libxslt.
[arguments]: Add phases 'build-documentation' and
'install-documentation' to build and install manpages. Also remove
unneeded key 'inputs' from 'wrap-binary' phase.
---
 gnu/packages/mail.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index eee7d18..c89b436 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,6 +48,7 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages dns)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages ghostscript)
@@ -319,6 +321,9 @@ and corrections.  It is based on a Bayesian filter.")
                (base32
                 "0smxh5ag3cbn92kp49jq950j5m2pivs9kr04prpd1lw62hy7gnhr"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("libxslt" ,libxslt)))  ; for xsltproc
     (inputs `(("python2-pysqlite" ,python2-pysqlite)
               ("python2-six" ,python2-six)))
     (arguments
@@ -328,8 +333,21 @@ and corrections.  It is based on a Bayesian filter.")
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'wrap-binary
-           (lambda* (#:key inputs outputs #:allow-other-keys)
+         (add-after 'build 'build-documentation
+           (lambda _
+             (substitute* "docs/Makefile"
+               ;; Prevent xmllint and xsltproc from downloading a DTD file.
+               (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
+             (zero? (system* "make" "-C" "docs" "man"))))
+         (add-after 'install 'install-documentation
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man")))
+               (install-file "docs/offlineimap.1" (string-append man "/man1"))
+               (install-file "docs/offlineimapui.7" (string-append man "/man7"))
+               #t)))
+         (add-after 'install-documentation 'wrap-binary
+           (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin/offlineimap")))
                (wrap-program bin
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] gnu: offlineimap: Install documentation.
  2016-10-26  2:18 [PATCH 1/1] gnu: offlineimap: Install documentation Marius Bakke
@ 2016-10-26  8:22 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-10-26  8:22 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke <mbakke@fastmail.com> skribis:

> * gnu/packages/mail.scm (offlineimap)[native-inputs]: Add asciidoc and
> libxslt.
> [arguments]: Add phases 'build-documentation' and
> 'install-documentation' to build and install manpages. Also remove
> unneeded key 'inputs' from 'wrap-binary' phase.

LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-26  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26  2:18 [PATCH 1/1] gnu: offlineimap: Install documentation Marius Bakke
2016-10-26  8:22 ` Ludovic Courtès

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).