Update `HACKING'.
[jackhill/guix/guix.git] / distro / packages / openssl.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
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 (distro packages openssl)
20 #:use-module (distro)
21 #:use-module (distro packages perl)
22 #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu))
26
27 (define-public openssl
28 (package
29 (name "openssl")
30 (version "1.0.1c")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "ftp://ftp.openssl.org/source/openssl-" version
34 ".tar.gz"))
35 (sha256 (base32
36 "1gjy6a7d8nszi9wq8jdzx3cffn0nss23h3cw2ywlw4cb9v6v77ia"))))
37 (build-system gnu-build-system)
38 (inputs `(("perl" ,perl)))
39 (arguments
40 (lambda (system)
41 `(#:parallel-build? #f
42 #:parallel-tests? #f
43 #:test-target "test"
44 #:phases
45 (alist-replace
46 'configure
47 (lambda* (#:key outputs #:allow-other-keys)
48 (let ((out (assoc-ref outputs "out")))
49 (zero?
50 (system* "./config"
51 "shared" ; build shared libraries
52 "--libdir=lib"
53 (string-append "--prefix=" out)))))
54 (alist-cons-before
55 'patch-source-shebangs 'patch-tests
56 (lambda* (#:key inputs #:allow-other-keys)
57 (let ((bash (assoc-ref inputs "bash")))
58 (substitute* (find-files "test" ".*")
59 (("/bin/sh")
60 (string-append bash "/bin/bash"))
61 (("/bin/rm")
62 "rm"))))
63 %standard-phases)))))
64 (synopsis "OpenSSL, an SSL/TLS implementation")
65 (description
66 "OpenSSL is an implementation of SSL/TLS")
67 (license license:openssl)
68 (home-page "http://www.openssl.org/")))