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 (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
28 (define-public mit-krb5
34 (uri (string-append "http://web.mit.edu/kerberos/www/dist/krb5/"
35 (string-copy version 0 (string-rindex version #\.))
36 "/krb5-" version "-signed.tar"))
38 "1daiaxgkxcryqs37w28v4x1vajqmay4l144d1zd9c2d7jjxr9gcs"))))
39 (build-system gnu-build-system)
41 `(("patch/init-fix" ,(search-patch "mit-krb5-init-fix.patch"))))
42 (inputs `(("bison" ,bison)
48 (lambda* (#:key source #:allow-other-keys)
51 (string-index-right source #\k)
52 (string-index-right source #\-))))
53 (and (zero? (system* "tar" "xvf" source))
54 (zero? (system* "tar" "xvf" (string-append inner ".tar.gz")))
57 ;; XXX The current patch system does not support unusual
58 ;; source unpack methods, so we have to apply this patch in a
60 (zero? (system* "patch" "-p1" "--batch" "-i"
61 (assoc-ref %build-inputs "patch/init-fix"))))))
64 (lambda* (#:key inputs #:allow-other-keys #:rest args)
65 (let ((perl (assoc-ref inputs "perl"))
66 (check (assoc-ref %standard-phases 'check)))
67 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
68 (("/bin/cat") (string-append perl "/bin/perl")))
69 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
70 (("D/bin/sh") (string-append "D" (which "bash"))))
71 (substitute* "plugins/kdb/db2/libdb2/test/run.test"
72 (("bindir=/bin/.") (string-append "bindir=" perl "/bin")))
73 ;; use existing files and directories in test
74 (substitute* "tests/resolve/Makefile"
75 (("-p telnet") "-p 23"))
76 ;; avoid service names since /etc/services is unavailable
79 (synopsis "MIT Kerberos 5")
81 "Massachusetts Institute of Technology implementation of Kerberos.
82 Kerberos is a network authentication protocol designed to provide strong
83 authentication for client/server applications by using secret-key cryptography.")
84 (license (bsd-style "file://NOTICE"
85 "See NOTICE in the distribution."))
86 (home-page "http://web.mit.edu/kerberos/")))