gnu: python: Replace input python by python-wrapper.
[jackhill/guix/guix.git] / gnu / packages / zip.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 (gnu packages zip)
20 #:use-module ((guix licenses)
21 #:renamer (symbol-prefix-proc 'license:))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages pkg-config)
28 #:use-module (gnu packages python))
29
30 (define-public zip
31 (package
32 (name "zip")
33 (version "3.0")
34 (source
35 (origin
36 (method url-fetch)
37 (uri (string-append "mirror://sourceforge/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
38 (sha256
39 (base32
40 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
41 (build-system gnu-build-system)
42 (inputs `(("bzip2" ,bzip2)))
43 (arguments
44 `(#:tests? #f ; no test target
45 #:make-flags '("generic_gcc")
46 #:phases
47 (alist-replace
48 'configure
49 (lambda* (#:key outputs #:allow-other-keys)
50 (let* ((out (assoc-ref outputs "out")))
51 (copy-file "unix/Makefile" "Makefile")
52 (substitute* "Makefile" (("/usr/local") out))))
53 %standard-phases)))
54 (home-page "http://www.info-zip.org/Zip.html")
55 (synopsis "Zip compression and file packing utility")
56 (description
57 "Zip is a compression and file packaging/archive utility. Zip is useful
58 for packaging a set of files for distribution, for archiving files, and for
59 saving disk space by temporarily compressing unused files or directories.
60 Zip puts one or more compressed files into a single ZIP archive, along with
61 information about the files (name, path, date, time of last modification,
62 protection, and check information to verify file integrity). An entire
63 directory structure can be packed into a ZIP archive with a single command.
64
65 Zip has one compression method (deflation) and can also store files without
66 compression. Zip automatically chooses the better of the two for each file.
67 Compression ratios of 2:1 to 3:1 are common for text files.")
68 (license (license:bsd-style "file://LICENSE"
69 "See LICENSE in the distribution."))))
70
71 (define-public unzip
72 (package (inherit zip)
73 (name "unzip")
74 (version "6.0")
75 (source
76 (origin
77 (method url-fetch)
78 (uri (string-append "mirror://sourceforge/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
79 (sha256
80 (base32
81 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))))
82 (build-system gnu-build-system)
83 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
84 (arguments
85 `(#:make-flags '("generic_gcc")
86 #:phases
87 (alist-replace
88 'configure
89 (lambda* (#:key inputs outputs #:allow-other-keys)
90 (let* ((out (assoc-ref outputs "out")))
91 (copy-file "unix/Makefile" "Makefile")
92 (substitute* "Makefile" (("/usr/local") out))))
93 %standard-phases)))
94 (home-page "http://www.info-zip.org/UnZip.html")
95 (synopsis "Unzip decompression and file extraction utility")
96 (description
97 "UnZip is an extraction utility for archives compressed in .zip format
98 (also called \"zipfiles\").
99
100 UnZip lists, tests, or extracts files from a .zip archive. The default
101 behaviour (with no options) is to extract into the current directory
102 (and subdirectories below it) all files from the specified zipfile.
103 UnZip recreates the stored directory structure by default.")
104 (license (license:bsd-style "file://LICENSE"
105 "See LICENSE in the distribution."))))
106
107 (define-public zziplib
108 (package
109 (name "zziplib")
110 (version "0.13.62")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/zziplib/zziplib13/"
115 version "/zziplib-"
116 version ".tar.bz2"))
117 (sha256
118 (base32
119 "0nsjqxw017hiyp524p9316283jlf5piixc1091gkimhz38zh7f51"))))
120 (build-system gnu-build-system)
121 (inputs `(("perl" ,perl) ; for the documentation
122 ("pkg-config" ,pkg-config)
123 ("python" ,python-wrapper) ; for the documentation
124 ("zip" ,zip) ; to create test files
125 ("zlib" ,zlib)))
126 (arguments
127 `(#:parallel-tests? #f)) ; since test files are created on the fly
128 (home-page "http://zziplib.sourceforge.net/")
129 (synopsis "zziplib, a library for accessing zip files")
130 (description
131 "zziplib is a library based on zlib for accessing zip files.")
132 (license license:lgpl2.0+)))