Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / mit-krb5.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages mit-krb5)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages bison)
25 #:use-module (gnu packages perl)
26 #:use-module (guix licenses)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix utils)
30 #:use-module (guix build-system gnu))
31
32 (define-public mit-krb5
33 (package
34 (name "mit-krb5")
35 (version "1.14.3")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "http://web.mit.edu/kerberos/dist/krb5/"
39 (version-major+minor version)
40 "/krb5-" version ".tar.gz"))
41 (sha256
42 (base32
43 "1jgjiyh1sp72lkxvk437lz5hzcibvw99jc4ihzfz03fg43aj0ind"))))
44 (build-system gnu-build-system)
45 (native-inputs
46 `(("bison" ,bison)
47 ("perl" ,perl)))
48 (arguments
49 `(;; Work around "No rule to make target '../../include/gssapi/gssapi.h',
50 ;; needed by 'authgss_prot.so'."
51 #:parallel-build? #f
52
53 ;; Likewise with tests.
54 #:parallel-tests? #f
55
56 ;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
57 ;; while running the tests in 'src/tests'.
58 #:tests? ,(string=? (%current-system) "x86_64-linux")
59
60 #:phases
61 (modify-phases %standard-phases
62 (add-after 'unpack 'enter-source-directory
63 (lambda _
64 (chdir "src")
65 #t))
66 (add-before 'check 'pre-check
67 (lambda* (#:key inputs #:allow-other-keys)
68 (let ((perl (assoc-ref inputs "perl")))
69 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
70 (("/bin/cat") (string-append perl "/bin/perl"))
71 (("D/bin/sh") (string-append "D" (which "bash")))
72 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
73
74 ;; avoid service names since /etc/services is unavailable
75 (substitute* "tests/resolve/Makefile"
76 (("-p telnet") "-p 23"))
77 #t)))))
78 (synopsis "MIT Kerberos 5")
79 (description
80 "Massachusetts Institute of Technology implementation of Kerberos.
81 Kerberos is a network authentication protocol designed to provide strong
82 authentication for client/server applications by using secret-key
83 cryptography.")
84 (license (non-copyleft "file://NOTICE"
85 "See NOTICE in the distribution."))
86 (home-page "http://web.mit.edu/kerberos/")))