Commit | Line | Data |
---|---|---|
af09dabf SB |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org> | |
36de28ff | 3 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
af09dabf SB |
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) | |
670a5e54 | 28 | #:use-module (gnu packages texinfo) |
af09dabf SB |
29 | #:use-module (gnu packages tls)) |
30 | ||
31 | (define-public keepalived | |
32 | (package | |
33 | (name "keepalived") | |
fef7f8f6 | 34 | (version "2.0.5") |
af09dabf SB |
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 | |
fef7f8f6 | 42 | "021a7c1lq4aqx7dbwhlm5km6w039hapfzp5hf6wb5bfq79s25g38")))) |
af09dabf SB |
43 | (build-system gnu-build-system) |
44 | (arguments | |
45 | '(#:phases | |
46 | (modify-phases %standard-phases | |
670a5e54 SB |
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)))))) | |
af09dabf SB |
65 | (native-inputs |
66 | `(("pkg-config" ,pkg-config) | |
670a5e54 SB |
67 | ("python-sphinx" ,python-sphinx) |
68 | ("texinfo" ,texinfo))) | |
af09dabf SB |
69 | (inputs |
70 | `(("openssl" ,openssl) | |
71 | ("libnfnetlink" ,libnfnetlink) | |
72 | ("libnl" ,libnl))) | |
73 | (home-page "http://www.keepalived.org/") | |
34a05e8f | 74 | (synopsis "Load balancing and high-availability frameworks") |
af09dabf SB |
75 | (description |
76 | "Keepalived provides frameworks for both load balancing and high | |
77 | availability. The load balancing framework relies on the Linux Virtual | |
34a05e8f TGR |
78 | Server (@dfn{IPVS}) kernel module. High availability is achieved by the Virtual |
79 | Redundancy Routing Protocol (@dfn{VRRP}). Each Keepalived framework can be used | |
af09dabf SB |
80 | independently or together to provide resilient infrastructures.") |
81 | (license license:gpl2+))) |