1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages mit-krb5)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages bison)
22 #:use-module (gnu packages perl)
23 #:use-module (gnu packages gcc)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
29 (define-public mit-krb5
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"))
39 "1daiaxgkxcryqs37w28v4x1vajqmay4l144d1zd9c2d7jjxr9gcs"))))
40 (build-system gnu-build-system)
42 `(("patch/init-fix" ,(search-patch "mit-krb5-init-fix.patch"))
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.
53 (lambda* (#:key source #:allow-other-keys)
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")))
62 ;; XXX The current patch system does not support unusual
63 ;; source unpack methods, so we have to apply this patch in a
65 (zero? (system* "patch" "-p1" "--batch" "-i"
66 (assoc-ref %build-inputs "patch/init-fix"))))))
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
84 (synopsis "MIT Kerberos 5")
86 "Massachusetts Institute of Technology implementation of Kerberos.
87 Kerberos is a network authentication protocol designed to provide strong
88 authentication for client/server applications by using secret-key cryptography.")
89 (license (bsd-style "file://NOTICE"
90 "See NOTICE in the distribution."))
91 (home-page "http://web.mit.edu/kerberos/")))