aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2018-06-10 23:42:14 +0800
committer宋文武 <iyzsong@member.fsf.org>2018-06-10 23:42:14 +0800
commit670a5e543033022a66d930d62a7dbff510f095db (patch)
tree570111a7a9d7c787f85156560f3b29e3243b3991
parentaf09dabf70659a891bc1cb392aeff1ff5b8aeded (diff)
downloadpatches-670a5e543033022a66d930d62a7dbff510f095db.tar
patches-670a5e543033022a66d930d62a7dbff510f095db.tar.gz
gnu: keepalived: Install info documentation.
* gnu/packages/cluster.scm (keepalived)[arguments]: Add phases 'build-info' and 'install-info'. [native-inputs]: Add texinfo.
-rw-r--r--gnu/packages/cluster.scm24
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/cluster.scm b/gnu/packages/cluster.scm
index 429b0885a0..7cfd04f008 100644
--- a/gnu/packages/cluster.scm
+++ b/gnu/packages/cluster.scm
@@ -24,6 +24,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tls))
(define-public keepalived
@@ -48,10 +49,29 @@
;; output of 'pkg-config'.
(substitute* "configure"
(("PKG_CONFIG --libs") "PKG_CONFIG --libs-only-l"))
- #t)))))
+ #t))
+ (add-after 'build 'build-info
+ (lambda _
+ (invoke "make" "-C" "doc" "texinfo")
+ ;; Put images in a subdirectory as recommended by 'texinfo'.
+ (install-file "doc/build/texinfo/software_design.png"
+ "doc/build/texinfo/keepalived-figures")
+ (substitute* "doc/build/texinfo/keepalived.texi"
+ (("@image\\{software_design,")
+ "@image{keepalived-figures/software_design,"))
+ (invoke "make" "-C" "doc/build/texinfo")))
+ (add-after 'install 'install-info
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (infodir (string-append out "/share/info")))
+ (install-file "doc/build/texinfo/keepalived.info" infodir)
+ (install-file "doc/build/texinfo/software_design.png"
+ (string-append infodir "/keepalived-figures"))
+ #t))))))
(native-inputs
`(("pkg-config" ,pkg-config)
- ("python-sphinx" ,python-sphinx)))
+ ("python-sphinx" ,python-sphinx)
+ ("texinfo" ,texinfo)))
(inputs
`(("openssl" ,openssl)
("libnfnetlink" ,libnfnetlink)