gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / mit-krb5.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
079fca3b 2;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
9dc6f288 3;;;
233e7676 4;;; This file is part of GNU Guix.
9dc6f288 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
9dc6f288
AE
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
9dc6f288
AE
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
9dc6f288 18
1ffa7090 19(define-module (gnu packages mit-krb5)
59a43334 20 #:use-module (gnu packages)
1ffa7090
LC
21 #:use-module (gnu packages bison)
22 #:use-module (gnu packages perl)
df8a09c7 23 #:use-module (gnu packages gcc)
9dc6f288
AE
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
28
29(define-public mit-krb5
30 (package
df8a09c7
LC
31 (name "mit-krb5")
32 (version "1.11.3")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "http://web.mit.edu/kerberos/www/dist/krb5/"
36 (string-copy version 0 (string-rindex version #\.))
37 "/krb5-" version "-signed.tar"))
38 (sha256 (base32
39 "1daiaxgkxcryqs37w28v4x1vajqmay4l144d1zd9c2d7jjxr9gcs"))))
40 (build-system gnu-build-system)
41 (native-inputs
42 `(("patch/init-fix" ,(search-patch "mit-krb5-init-fix.patch"))
43 ("bison" ,bison)
44 ("perl" ,perl)
45
46 ;; XXX: When built with GCC 4.8, the 'db_test' test program enters an
47 ;; infinite loop. As a stopgap measure, build with GCC 4.7.
48 ("gcc" ,gcc-4.7)))
49 (arguments
50 '(#:phases
12abb19d 51 (alist-replace
df8a09c7
LC
52 'unpack
53 (lambda* (#:key source #:allow-other-keys)
54 (let ((inner
55 (substring source
56 (string-index-right source #\k)
57 (string-index-right source #\-))))
58 (and (zero? (system* "tar" "xvf" source))
59 (zero? (system* "tar" "xvf" (string-append inner ".tar.gz")))
60 (chdir inner)
61 (chdir "src")
62 ;; XXX The current patch system does not support unusual
63 ;; source unpack methods, so we have to apply this patch in a
64 ;; non-standard way.
65 (zero? (system* "patch" "-p1" "--batch" "-i"
66 (assoc-ref %build-inputs "patch/init-fix"))))))
67 (alist-replace
68 'check
69 (lambda* (#:key inputs #:allow-other-keys #:rest args)
70 (let ((perl (assoc-ref inputs "perl"))
71 (check (assoc-ref %standard-phases 'check)))
72 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
73 (("/bin/cat") (string-append perl "/bin/perl")))
74 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
75 (("D/bin/sh") (string-append "D" (which "bash"))))
76 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
77 (("bindir=/bin/.") (string-append "bindir=" perl "/bin")))
78 ;; use existing files and directories in test
79 (substitute* "tests/resolve/Makefile"
80 (("-p telnet") "-p 23"))
81 ;; avoid service names since /etc/services is unavailable
82 (apply check args)))
83 %standard-phases))))
84 (synopsis "MIT Kerberos 5")
85 (description
86 "Massachusetts Institute of Technology implementation of Kerberos.
9dc6f288
AE
87Kerberos is a network authentication protocol designed to provide strong
88authentication for client/server applications by using secret-key cryptography.")
df8a09c7
LC
89 (license (bsd-style "file://NOTICE"
90 "See NOTICE in the distribution."))
91 (home-page "http://web.mit.edu/kerberos/")))