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 ;;;
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 mit-krb5)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages bison)
23 #:use-module (gnu packages perl)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix build-system gnu))
29
30 (define-public mit-krb5
31 (package
32 (name "mit-krb5")
33 (version "1.14.2")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "http://web.mit.edu/kerberos/dist/krb5/"
37 (version-major+minor version)
38 "/krb5-" version ".tar.gz"))
39 (sha256
40 (base32
41 "09wbv969ak4fqlqr1ip5bi62fny1zlp1vwjarvj6a6cdfzkdgjkb"))))
42 (build-system gnu-build-system)
43 (native-inputs
44 `(("bison" ,bison)
45 ("perl" ,perl)))
46 (arguments
47 `(;; Work around "No rule to make target '../../include/gssapi/gssapi.h',
48 ;; needed by 'authgss_prot.so'."
49 #:parallel-build? #f
50
51 ;; Likewise with tests.
52 #:parallel-tests? #f
53
54 ;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call
55 ;; while running the tests in 'src/tests'.
56 #:tests? ,(string=? (%current-system) "x86_64-linux")
57
58 #:phases
59 (modify-phases %standard-phases
60 (add-after 'unpack 'enter-source-directory
61 (lambda _
62 (chdir "src")
63 #t))
64 (add-before 'check 'pre-check
65 (lambda* (#:key inputs #:allow-other-keys)
66 (let ((perl (assoc-ref inputs "perl")))
67 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
68 (("/bin/cat") (string-append perl "/bin/perl"))
69 (("D/bin/sh") (string-append "D" (which "bash")))
70 (("bindir=/bin/.") (string-append "bindir=" perl "/bin"))))
71
72 ;; avoid service names since /etc/services is unavailable
73 (substitute* "tests/resolve/Makefile"
74 (("-p telnet") "-p 23"))
75 #t)))))
76 (synopsis "MIT Kerberos 5")
77 (description
78 "Massachusetts Institute of Technology implementation of Kerberos.
79 Kerberos is a network authentication protocol designed to provide strong
80 authentication for client/server applications by using secret-key
81 cryptography.")
82 (license (non-copyleft "file://NOTICE"
83 "See NOTICE in the distribution."))
84 (home-page "http://web.mit.edu/kerberos/")))