gnu: openssl: Fix cross-compile issues.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
84a3e3b7 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
ea4d96c6 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
8d1939e4 4;;;
233e7676 5;;; This file is part of GNU Guix.
8d1939e4 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
8d1939e4
LC
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;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
8d1939e4
LC
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
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
8d1939e4 19
1ffa7090 20(define-module (gnu packages gnupg)
4a44e743 21 #:use-module (guix licenses)
01e11826
AE
22 #:use-module (gnu packages curl)
23 #:use-module (gnu packages openldap)
ea4d96c6 24 #:use-module (gnu packages perl)
1ffa7090 25 #:use-module (gnu packages pth)
ea4d96c6 26 #:use-module (gnu packages python)
1ffa7090
LC
27 #:use-module (gnu packages readline)
28 #:use-module ((gnu packages compression)
4a44e743 29 #:renamer (symbol-prefix-proc 'guix:))
8d1939e4 30 #:use-module (guix packages)
87f5d366 31 #:use-module (guix download)
8d1939e4
LC
32 #:use-module (guix build-system gnu))
33
34(define-public libgpg-error
35 (package
36 (name "libgpg-error")
e0bb2e6b 37 (version "1.12")
8d1939e4
LC
38 (source
39 (origin
87f5d366 40 (method url-fetch)
0db342a5 41 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
8d1939e4
LC
42 version ".tar.bz2"))
43 (sha256
44 (base32
e0bb2e6b 45 "0pz58vr12qihq2f0bypjxsb6cf6ajq5258fmfm8s6lvwm3b9xz6a"))))
8d1939e4
LC
46 (build-system gnu-build-system)
47 (home-page "http://gnupg.org")
48 (synopsis
49 "Libgpg-error, a small library that defines common error values for all GnuPG components")
50 (description
51 "Libgpg-error is a small library that defines common error values
52for all GnuPG components. Among these are GPG, GPGSM, GPGME,
53GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
54Daemon and possibly more in the future.")
4a44e743 55 (license lgpl2.0+)))
8d1939e4
LC
56
57(define-public libgcrypt
58 (package
59 (name "libgcrypt")
24f3e788 60 (version "1.5.3")
84a3e3b7
LC
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
64 version ".tar.bz2"))
65 (sha256
66 (base32
24f3e788 67 "1lar8y3lh61zl5flljpz540d78g99h4d5idfwrfw8lm3gm737xdw"))))
8d1939e4
LC
68 (build-system gnu-build-system)
69 (propagated-inputs
70 `(("libgpg-error" ,libgpg-error)))
71 (home-page "http://gnupg.org/")
f50d2669 72 (synopsis "Cryptographic function library")
8d1939e4 73 (description
a22dc0c4
LC
74 "Libgcrypt is a general-purpose cryptographic library. It provides the
75standard cryptographic building blocks such as symmetric ciphers, hash
76algorithms, public key algorithms, large integer functions and random number
77generation.")
4a44e743 78 (license lgpl2.0+)))
8d1939e4
LC
79
80(define-public libassuan
81 (package
82 (name "libassuan")
e0bb2e6b 83 (version "2.1.1")
8d1939e4
LC
84 (source
85 (origin
87f5d366 86 (method url-fetch)
0db342a5 87 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
8d1939e4
LC
88 version ".tar.bz2"))
89 (sha256
90 (base32
e0bb2e6b 91 "1783nb0b6nr9yjhb5wfh8ykc5w89f4anppz1kz9913mqg5vxdqi3"))))
8d1939e4
LC
92 (build-system gnu-build-system)
93 (propagated-inputs
94 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
95 (home-page "http://gnupg.org")
96 (synopsis
97 "Libassuan, the IPC library used by GnuPG and related software")
98 (description
99 "Libassuan is a small library implementing the so-called Assuan
100protocol. This protocol is used for IPC between most newer
101GnuPG components. Both, server and client side functions are
102provided.")
4a44e743 103 (license lgpl2.0+)))
8d1939e4
LC
104
105(define-public libksba
106 (package
107 (name "libksba")
98fbd7ce 108 (version "1.3.0")
8d1939e4
LC
109 (source
110 (origin
87f5d366 111 (method url-fetch)
8d1939e4 112 (uri (string-append
0db342a5 113 "mirror://gnupg/libksba/libksba-"
8d1939e4
LC
114 version ".tar.bz2"))
115 (sha256
116 (base32
98fbd7ce 117 "0w8rfb6yhcwkwzvjafrashcygy4hd9xwwmvlnkfd1m2h0paywqas"))))
8d1939e4
LC
118 (build-system gnu-build-system)
119 (propagated-inputs
120 `(("libgpg-error" ,libgpg-error)))
121 (home-page "http://www.gnupg.org")
122 (synopsis
123 "Libksba is a CMS and X.509 access library under development")
124 (description
125 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
126as well as the CMS easily accessible by other applications. Both
127specifications are building blocks of S/MIME and TLS.")
4a44e743 128 (license gpl3+)))
8d1939e4
LC
129
130(define-public gnupg
131 (package
132 (name "gnupg")
de73a878 133 (version "2.0.22")
8d1939e4
LC
134 (source
135 (origin
87f5d366 136 (method url-fetch)
0db342a5
LC
137 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
138 ".tar.bz2"))
8d1939e4
LC
139 (sha256
140 (base32
de73a878 141 "0lg210acj2rxq291q4cwamg9gx6gh2prb1xa93y5jhw5b6r0lza3"))))
8d1939e4
LC
142 (build-system gnu-build-system)
143 (inputs
f1be8061 144 `(("bzip2" ,guix:bzip2)
01e11826 145 ("curl" ,curl)
8d1939e4
LC
146 ("libassuan" ,libassuan)
147 ("libgcrypt" ,libgcrypt)
01e11826 148 ("libgpg-error" ,libgpg-error)
8d1939e4
LC
149 ("libksba" ,libksba)
150 ("pth" ,pth)
01e11826 151 ("openldap" ,openldap)
4a44e743 152 ("zlib" ,guix:zlib)
8d1939e4 153 ("readline" ,readline)))
30e9cbb4
AE
154 (arguments
155 `(#:phases
156 (alist-replace
157 'configure
158 (lambda* (#:key #:allow-other-keys #:rest args)
159 (let ((configure (assoc-ref %standard-phases 'configure)))
160 (substitute* "tests/openpgp/Makefile.in"
161 (("/bin/sh") (which "bash")))
162 (apply configure args)))
163 %standard-phases)))
8d1939e4 164 (home-page "http://gnupg.org/")
f50d2669 165 (synopsis "GNU Privacy Guard")
8d1939e4 166 (description
a22dc0c4
LC
167 "The GNU Privacy Guard is a complete implementation of the OpenPGP
168standard. It is used to encrypt and sign data and communication. It
169features powerful key management and the ability to access public key
79c311b8
LC
170servers. It includes several libraries: libassuan (IPC between GnuPG
171components), libgpg-error (centralized GnuPG error values), and libskba
172(working with X.509 certificates and CMS data).")
4a44e743 173 (license gpl3+)))
ea4d96c6 174
09d5c166
AE
175(define-public gpgme
176 (package
177 (name "gpgme")
178 (version "1.4.3")
179 (source
180 (origin
181 (method url-fetch)
182 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
183 ".tar.bz2"))
184 (sha256
185 (base32
186 "15h429h6pd67iiv580bjmwbkadpxsdppw0xrqpcm4dvm24jc271d"))))
187 (build-system gnu-build-system)
188 (inputs
189 `(("gnupg" ,gnupg)
190 ("libassuan" ,libassuan)
191 ("libgpg-error" ,libgpg-error)))
192 (home-page "http://www.gnupg.org/related_software/gpgme/")
193 (synopsis "library providing simplified access to GnuPG functionality")
194 (description
195 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
196easier for applications. It provides a High-Level Crypto API for encryption,
197decryption, signing, signature verification and key management. Currently
198it uses GnuPG as its backend but the API isn't restricted to this engine.
199
200Because the direct use of GnuPG from an application can be a complicated
201programming task, it is suggested that all software should try to use GPGME
202instead. This way bug fixes or improvements can be done at a central place
203and every application benefits from this.")
204 (license lgpl2.1+)))
205
ea4d96c6
AE
206(define-public pius
207 (package
208 (name "pius")
209 (version "2.0.9")
210 (source (origin
211 (method url-fetch)
212 (uri (string-append "mirror://sourceforge/pgpius/pius/"
213 version "/pius-"
214 version ".tar.bz2"))
215 (sha256 (base32
216 "1g1jly3wl4ks6h8ydkygyl2c4i7v3z91rg42005m6vm70y1d8b3d"))))
217 (build-system gnu-build-system)
218 (inputs `(("perl" ,perl)
ee3e314b 219 ("python" ,python-wrapper)
9eed6f9b 220 ("gpg" ,gnupg)))
ea4d96c6
AE
221 (arguments
222 `(#:tests? #f
223 #:phases
224 (alist-replace
225 'configure
226 (lambda* (#:key #:allow-other-keys) #t)
227 (alist-replace
228 'build
229 (lambda* (#:key #:allow-other-keys) #t)
230 (alist-replace
231 'install
9eed6f9b
LC
232 (lambda* (#:key inputs outputs #:allow-other-keys)
233 (let* ((out (assoc-ref outputs "out"))
234 (gpg (string-append (assoc-ref inputs "gpg")
235 "/bin/gpg2")))
ea4d96c6
AE
236 (mkdir out)
237 (mkdir (string-append out "/bin"))
9eed6f9b
LC
238 (for-each (lambda (file)
239 (substitute* file
240 (("/usr/bin/gpg") gpg))
241 (copy-file file (string-append out "/bin/" file)))
242 '("pius" "pius-keyring-mgr" "pius-party-worksheet"))))
ea4d96c6 243 %standard-phases)))))
9eed6f9b 244 (synopsis "Programs to simplify GnuPG key signing")
ea4d96c6
AE
245 (description
246 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
247parties. It is the main utility and makes it possible to quickly and easily
248sign each UID on a set of PGP keys. It is designed to take the pain out of
249the sign-all-the-keys part of PGP Keysigning Party while adding security
250to the process.
251
252pius-keyring-mgr and pius-party-worksheet help organisers of
253PGP keysigning parties.")
254 (license gpl2)
255 (home-page "http://www.phildev.net/pius/index.shtml")))
96be765c
AE
256
257(define-public signing-party
258 (package
259 (name "signing-party")
260 (version "1.1.4")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "http://ftp.debian.org/debian/pool/main/s/signing-party/signing-party_"
264 version ".orig.tar.gz"))
265 (sha256 (base32
266 "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
267 (build-system gnu-build-system)
268 (inputs `(("perl" ,perl)))
269 (arguments
270 `(#:tests? #f
271 #:phases
272 (alist-replace
273 'unpack
274 (lambda* (#:key #:allow-other-keys #:rest args)
275 (let ((unpack (assoc-ref %standard-phases 'unpack)))
276 (apply unpack args)
277 ;; remove spurious symlink
278 (delete-file "keyanalyze/pgpring/depcomp")))
279 (alist-replace
280 'configure
281 (lambda* (#:key outputs #:allow-other-keys)
282 (let ((out (assoc-ref outputs "out")))
283 (substitute* "keyanalyze/Makefile"
284 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
285 (substitute* "keyanalyze/Makefile"
286 (("./configure") (string-append "./configure --prefix=" out)))
287 (substitute* "keyanalyze/pgpring/configure"
288 (("/bin/sh") (which "bash")))
289 (substitute* "gpgwrap/Makefile"
290 (("\\} clean") (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
291 out "/bin/gpgwrap\n")))
292 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
293 "keylookup/Makefile" "sig2dot/Makefile"
294 "springgraph/Makefile")
295 (("/usr") out))))
296 (alist-replace
297 'install
298 (lambda* (#:key outputs #:allow-other-keys #:rest args)
299 (let ((out (assoc-ref outputs "out"))
300 (install (assoc-ref %standard-phases 'install)))
301 (apply install args)
302 (for-each
303 (lambda (dir file)
304 (copy-file (string-append dir "/" file)
305 (string-append out "/bin/" file)))
306 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
307 "gpglist" "gpg-mailkeys" "gpgparticipants")
308 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
309 "gpglist" "gpg-mailkeys" "gpgparticipants"))
310 (for-each
311 (lambda (dir file)
312 (copy-file (string-append dir "/" file)
313 (string-append out "/share/man/man1/" file)))
314 '("caff" "caff" "caff" "gpgdir"
315 "gpg-key2ps" "gpglist" "gpg-mailkeys"
316 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
317 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
318 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
319 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
320 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
321 "process_keys.1" "pgpring.1" "keyanalyze.1"))))
322 %standard-phases)))))
323 (synopsis "collection of scripts for simplifying gnupg key signing")
324 (description
325 "signing-party is a collection for all kinds of PGP/GnuPG related things,
326including tools for signing keys, keyring analysis, and party preparation.
327
328 * caff: CA - Fire and Forget signs and mails a key
329
330 * pgp-clean: removes all non-self signatures from key
331
332 * pgp-fixkey: removes broken packets from keys
333
334 * gpg-mailkeys: simply mail out a signed key to its owner
335
336 * gpg-key2ps: generate PostScript file with fingerprint paper strips
337
338 * gpgdir: recursive directory encryption tool
339
340 * gpglist: show who signed which of your UIDs
341
342 * gpgsigs: annotates list of GnuPG keys with already done signatures
343
344 * gpgparticipants: create list of party participants for the organiser
345
346 * gpgwrap: a passphrase wrapper
347
348 * keyanalyze: minimum signing distance (MSD) analysis on keyrings
349
350 * keylookup: ncurses wrapper around gpg --search
351
352 * sig2dot: converts a list of GnuPG signatures to a .dot file
353
354 * springgraph: creates a graph from a .dot file")
355 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
356 ;; and caff and gpgsigs: bsd-3, see
357 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
358 (license gpl2)
359 (home-page "http://pgp-tools.alioth.debian.org/")))