gnu: keepalived: Update to 2.0.4.
[jackhill/guix/guix.git] / gnu / packages / cluster.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages cluster)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix download)
24 #:use-module (guix packages)
25 #:use-module (gnu packages linux)
26 #:use-module (gnu packages pkg-config)
27 #:use-module (gnu packages python)
28 #:use-module (gnu packages texinfo)
29 #:use-module (gnu packages tls))
30
31 (define-public keepalived
32 (package
33 (name "keepalived")
34 (version "2.0.4")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append
38 "http://www.keepalived.org/software/keepalived-"
39 version ".tar.gz"))
40 (sha256
41 (base32
42 "0qf46bfxv4w7qx7d73qq26pp72cvbyfjvna3hxn208vynvapalh0"))))
43 (build-system gnu-build-system)
44 (arguments
45 '(#:phases
46 (modify-phases %standard-phases
47 (add-after 'build 'build-info
48 (lambda _
49 (invoke "make" "-C" "doc" "texinfo")
50 ;; Put images in a subdirectory as recommended by 'texinfo'.
51 (install-file "doc/build/texinfo/software_design.png"
52 "doc/build/texinfo/keepalived-figures")
53 (substitute* "doc/build/texinfo/keepalived.texi"
54 (("@image\\{software_design,")
55 "@image{keepalived-figures/software_design,"))
56 (invoke "make" "-C" "doc/build/texinfo")))
57 (add-after 'install 'install-info
58 (lambda* (#:key outputs #:allow-other-keys)
59 (let* ((out (assoc-ref outputs "out"))
60 (infodir (string-append out "/share/info")))
61 (install-file "doc/build/texinfo/keepalived.info" infodir)
62 (install-file "doc/build/texinfo/software_design.png"
63 (string-append infodir "/keepalived-figures"))
64 #t))))))
65 (native-inputs
66 `(("pkg-config" ,pkg-config)
67 ("python-sphinx" ,python-sphinx)
68 ("texinfo" ,texinfo)))
69 (inputs
70 `(("openssl" ,openssl)
71 ("libnfnetlink" ,libnfnetlink)
72 ("libnl" ,libnl)))
73 (home-page "http://www.keepalived.org/")
74 (synopsis "Loadbalancing and high-availability frameworks")
75 (description
76 "Keepalived provides frameworks for both load balancing and high
77 availability. The load balancing framework relies on the Linux Virtual
78 Server (IPVS) kernel module. High availability is achieved by the Virtual
79 Redundancy Routing Protocol (VRRP). Each Keepalived framework can be used
80 independently or together to provide resilient infrastructures.")
81 (license license:gpl2+)))