Commit | Line | Data |
---|---|---|
0561e576 JH |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
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. | |
10 | ;;; | |
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. | |
15 | ;;; | |
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/>. | |
18 | ||
19 | (define-module (gnu packages afs) | |
20 | #:use-module (gnu packages) | |
21 | #:use-module (gnu packages crypto) | |
22 | #:use-module (gnu packages kerberos) | |
23 | #:use-module (guix build-system gnu) | |
24 | #:use-module (guix git-download) | |
25 | #:use-module ((guix licenses) #:prefix license:) | |
26 | #:use-module (guix packages) | |
27 | #:use-module (guix utils)) | |
28 | ||
29 | (define-public kafs-client | |
30 | (package | |
31 | (name "kafs-client") | |
32 | (version "0.5") | |
33 | (source (origin | |
34 | (method git-fetch) | |
35 | (uri (git-reference | |
36 | (url "git://git.infradead.org/users/dhowells/kafs-client.git") | |
37 | (commit (string-append "v" version)))) | |
38 | (file-name (git-file-name name version)) | |
39 | (sha256 | |
40 | (base32 | |
41 | "066s04wzfpsmkks9wcf02wxnwb57ix6982w9kwi4r4gvm2fr83cn")) | |
42 | (patches | |
43 | (search-patches "kafs-client-soname-symlink.patch")))) | |
44 | (build-system gnu-build-system) | |
45 | (arguments | |
46 | `(#:tests? #f ;no tests | |
47 | #:make-flags | |
48 | (let ((out (assoc-ref %outputs "out"))) | |
49 | (list "BINDIR=/bin" | |
50 | (string-append "CC=" ,(cc-for-target)) | |
51 | "DATADIR=/share/kafs" | |
52 | (string-append "DESTDIR=" out) | |
53 | "INCLUDEDIR=/include" | |
54 | "LIBDIR=/lib" | |
55 | "LIBEXECDIR=/libexec" | |
56 | "MANDIR=/share/man" | |
57 | "SBINDIR=/sbin" | |
58 | "UNITDIR=/lib/systemd" | |
59 | (string-append "LDFLAGS=-Wl,-rpath=" out "/lib"))) | |
60 | #:phases | |
61 | (modify-phases %standard-phases | |
62 | (delete 'configure) | |
63 | (add-after 'patch-generated-file-shebangs 'patch-etc-paths | |
64 | (lambda* (#:key outputs #:allow-other-keys) | |
65 | (substitute* | |
66 | (find-files "conf") | |
67 | (("/usr") (assoc-ref outputs "out"))) | |
68 | #t)) | |
69 | (add-before 'build 'set-library-path | |
70 | (lambda _ | |
71 | (setenv "LIBRARY_PATH" (string-append (getenv "LIBRARY_PATH") ":" | |
72 | (getcwd) "/src")) | |
73 | #t)) | |
74 | (add-after 'install 'openafs-compatible-executable-names | |
75 | (lambda* (#:key outputs #:allow-other-keys) | |
76 | (system (string-append "ln -s aklog-kafs " | |
77 | (assoc-ref outputs "out") | |
78 | "/bin/aklog")) | |
79 | #t))))) | |
80 | (inputs | |
81 | `(("keyutils" ,keyutils) | |
82 | ("mit-krb5" ,mit-krb5))) | |
83 | (home-page "https://www.infradead.org/~dhowells/kafs/kafs_client.html") | |
84 | (synopsis "Utility programs for the Linux AFS client") | |
85 | (description "This package provides the user space utilities for | |
86 | interacting with the Linux kernel AFS distributed file system client. The | |
87 | included @command{aklog} facilitates adding authentication tokens to the | |
88 | kernel keyring. Additional keyring management features are provided by the | |
89 | keyutils package. This package also provides AFS cell server location | |
90 | information to the kernel via DNS or a static cellservdb file.") | |
91 | (license license:gpl2))) |