linux-initrd: Add USB kernel modules to the default initrd.
[jackhill/guix/guix.git] / gnu / packages / zip.scm
CommitLineData
b8d3511a
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
809e9b52 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
b8d3511a
AE
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
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;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
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
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages zip)
b5b73a82 21 #:use-module ((guix licenses) #:prefix license:)
b8d3511a
AE
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
2d2301e3 25 #:use-module (gnu packages)
b8d3511a
AE
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages perl)
fddbf35b 28 #:use-module (guix build-system perl)
b8d3511a
AE
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python))
31
32(define-public zip
33 (package
34 (name "zip")
35 (version "3.0")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "mirror://sourceforge/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
40 (sha256
41 (base32
42 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
43 (build-system gnu-build-system)
44 (inputs `(("bzip2" ,bzip2)))
45 (arguments
46 `(#:tests? #f ; no test target
75757789
MW
47 #:make-flags (let ((out (assoc-ref %outputs "out")))
48 (list "-f" "unix/Makefile"
49 (string-append "prefix=" out)
50 (string-append "MANDIR=" out "/share/man/man1")))
51 #:phases (alist-replace
52 'build
53 (lambda* (#:key (make-flags '()) #:allow-other-keys)
54 (zero? (apply system* "make" "generic_gcc" make-flags)))
55 (alist-delete 'configure %standard-phases))))
b8d3511a 56 (home-page "http://www.info-zip.org/Zip.html")
35b9e423 57 (synopsis "Compression and file packing utility")
b8d3511a 58 (description
35b9e423 59 "Zip is a compression and file packaging/archive utility. Zip is useful
b8d3511a
AE
60for packaging a set of files for distribution, for archiving files, and for
61saving disk space by temporarily compressing unused files or directories.
62Zip puts one or more compressed files into a single ZIP archive, along with
63information about the files (name, path, date, time of last modification,
35b9e423 64protection, and check information to verify file integrity). An entire
b8d3511a
AE
65directory structure can be packed into a ZIP archive with a single command.
66
67Zip has one compression method (deflation) and can also store files without
35b9e423 68compression. Zip automatically chooses the better of the two for each file.
b8d3511a
AE
69Compression ratios of 2:1 to 3:1 are common for text files.")
70 (license (license:bsd-style "file://LICENSE"
71 "See LICENSE in the distribution."))))
72
73(define-public unzip
74 (package (inherit zip)
75 (name "unzip")
76 (version "6.0")
77 (source
78 (origin
79 (method url-fetch)
80 (uri (string-append "mirror://sourceforge/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
81 (sha256
82 (base32
e5da2f38
MW
83 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
84 (patches (list (search-patch "unzip-CVE-2014-8139.patch")
85 (search-patch "unzip-CVE-2014-8140.patch")
86 (search-patch "unzip-CVE-2014-8141.patch")))))
b8d3511a
AE
87 (build-system gnu-build-system)
88 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
89 (arguments
90 `(#:make-flags '("generic_gcc")
91 #:phases
92 (alist-replace
93 'configure
94 (lambda* (#:key inputs outputs #:allow-other-keys)
95 (let* ((out (assoc-ref outputs "out")))
96 (copy-file "unix/Makefile" "Makefile")
809e9b52
MW
97 (substitute* "Makefile"
98 (("/usr/local") out)
99 (("/man/") "/share/man/"))))
b8d3511a
AE
100 %standard-phases)))
101 (home-page "http://www.info-zip.org/UnZip.html")
35b9e423 102 (synopsis "Decompression and file extraction utility")
b8d3511a 103 (description
35b9e423
EB
104 "UnZip is an extraction utility for archives compressed in .zip format,
105also called \"zipfiles\".
b8d3511a 106
35b9e423
EB
107UnZip lists, tests, or extracts files from a .zip archive. The default
108behaviour (with no options) is to extract into the current directory, and
109subdirectories below it, all files from the specified zipfile. UnZip
110recreates the stored directory structure by default.")
b8d3511a
AE
111 (license (license:bsd-style "file://LICENSE"
112 "See LICENSE in the distribution."))))
113
114(define-public zziplib
115 (package
116 (name "zziplib")
117 (version "0.13.62")
118 (source
119 (origin
120 (method url-fetch)
121 (uri (string-append "mirror://sourceforge/zziplib/zziplib13/"
122 version "/zziplib-"
123 version ".tar.bz2"))
124 (sha256
125 (base32
126 "0nsjqxw017hiyp524p9316283jlf5piixc1091gkimhz38zh7f51"))))
127 (build-system gnu-build-system)
c4c4cc05
JD
128 (inputs
129 `(("zlib" ,zlib)))
130 (native-inputs `(("perl" ,perl) ; for the documentation
131 ("pkg-config" ,pkg-config)
132 ("python" ,python-2) ; for the documentation; Python 3 not supported,
133 ; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
134 ("zip" ,zip))) ; to create test files
b8d3511a
AE
135 (arguments
136 `(#:parallel-tests? #f)) ; since test files are created on the fly
137 (home-page "http://zziplib.sourceforge.net/")
35b9e423 138 (synopsis "Library for accessing zip files")
b8d3511a 139 (description
35b9e423 140 "ZZipLib is a library based on zlib for accessing zip files.")
b8d3511a 141 (license license:lgpl2.0+)))
fddbf35b
JD
142
143
144(define-public perl-zip
145 (package
146 (name "perl-zip")
147 (version "1.30")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append
152 "mirror://cpan/authors/id/A/AD/ADAMK/Archive-Zip-"
153 version ".tar.gz"))
154 (sha256
155 (base32
156 "0633zah5z9njiqnvy3vh42fjymncmil1jdfb7d18w8xpfzzp5d7q"))))
157 (build-system perl-build-system)
158 (synopsis "Provides an interface to ZIP archive files")
159 (description "The Archive::Zip module allows a Perl program to create,
160manipulate, read, and write Zip archive files.")
161 (home-page "http://search.cpan.org/~adamk/Archive-Zip-1.30/")
162 (license (package-license perl))))