Commit | Line | Data |
---|---|---|
b8d3511a AE |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> | |
385ae063 | 3 | ;;; Copyright © 2014, 2015 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 |
60 | for packaging a set of files for distribution, for archiving files, and for |
61 | saving disk space by temporarily compressing unused files or directories. | |
62 | Zip puts one or more compressed files into a single ZIP archive, along with | |
63 | information about the files (name, path, date, time of last modification, | |
35b9e423 | 64 | protection, and check information to verify file integrity). An entire |
b8d3511a AE |
65 | directory structure can be packed into a ZIP archive with a single command. |
66 | ||
67 | Zip has one compression method (deflation) and can also store files without | |
35b9e423 | 68 | compression. Zip automatically chooses the better of the two for each file. |
b8d3511a | 69 | Compression ratios of 2:1 to 3:1 are common for text files.") |
166191b3 | 70 | (license (license:non-copyleft "file://LICENSE" |
b8d3511a AE |
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 | 83 | "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83")) |
fc1adab1 AK |
84 | (patches (search-patches "unzip-CVE-2014-8139.patch" |
85 | "unzip-CVE-2014-8140.patch" | |
86 | "unzip-CVE-2014-8141.patch" | |
87 | "unzip-CVE-2014-9636.patch" | |
88 | "unzip-CVE-2015-7696.patch" | |
89 | "unzip-CVE-2015-7697.patch" | |
90 | "unzip-allow-greater-hostver-values.patch" | |
91 | "unzip-initialize-symlink-flag.patch" | |
92 | "unzip-remove-build-date.patch" | |
93 | "unzip-attribs-overflow.patch" | |
94 | "unzip-overflow-on-invalid-input.patch" | |
95 | "unzip-format-secure.patch" | |
96 | "unzip-overflow-long-fsize.patch")))) | |
b8d3511a AE |
97 | (build-system gnu-build-system) |
98 | ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO | |
99 | (arguments | |
385ae063 MW |
100 | `(#:phases (modify-phases %standard-phases |
101 | (delete 'configure) | |
102 | (replace 'build | |
103 | (lambda* (#:key make-flags #:allow-other-keys) | |
104 | (zero? (apply system* "make" | |
105 | `("-j" ,(number->string | |
106 | (parallel-job-count)) | |
107 | ,@make-flags | |
108 | "generic_gcc")))))) | |
109 | #:make-flags (list "-f" "unix/Makefile" | |
110 | (string-append "prefix=" %output) | |
111 | (string-append "MANDIR=" %output "/share/man/man1")))) | |
b8d3511a | 112 | (home-page "http://www.info-zip.org/UnZip.html") |
35b9e423 | 113 | (synopsis "Decompression and file extraction utility") |
b8d3511a | 114 | (description |
35b9e423 EB |
115 | "UnZip is an extraction utility for archives compressed in .zip format, |
116 | also called \"zipfiles\". | |
b8d3511a | 117 | |
35b9e423 EB |
118 | UnZip lists, tests, or extracts files from a .zip archive. The default |
119 | behaviour (with no options) is to extract into the current directory, and | |
120 | subdirectories below it, all files from the specified zipfile. UnZip | |
121 | recreates the stored directory structure by default.") | |
166191b3 | 122 | (license (license:non-copyleft "file://LICENSE" |
b8d3511a AE |
123 | "See LICENSE in the distribution.")))) |
124 | ||
125 | (define-public zziplib | |
126 | (package | |
127 | (name "zziplib") | |
128 | (version "0.13.62") | |
129 | (source | |
130 | (origin | |
131 | (method url-fetch) | |
132 | (uri (string-append "mirror://sourceforge/zziplib/zziplib13/" | |
133 | version "/zziplib-" | |
134 | version ".tar.bz2")) | |
135 | (sha256 | |
136 | (base32 | |
137 | "0nsjqxw017hiyp524p9316283jlf5piixc1091gkimhz38zh7f51")))) | |
138 | (build-system gnu-build-system) | |
c4c4cc05 JD |
139 | (inputs |
140 | `(("zlib" ,zlib))) | |
141 | (native-inputs `(("perl" ,perl) ; for the documentation | |
142 | ("pkg-config" ,pkg-config) | |
143 | ("python" ,python-2) ; for the documentation; Python 3 not supported, | |
144 | ; http://forums.gentoo.org/viewtopic-t-863161-start-0.html | |
145 | ("zip" ,zip))) ; to create test files | |
b8d3511a AE |
146 | (arguments |
147 | `(#:parallel-tests? #f)) ; since test files are created on the fly | |
148 | (home-page "http://zziplib.sourceforge.net/") | |
35b9e423 | 149 | (synopsis "Library for accessing zip files") |
b8d3511a | 150 | (description |
35b9e423 | 151 | "ZZipLib is a library based on zlib for accessing zip files.") |
b8d3511a | 152 | (license license:lgpl2.0+))) |
fddbf35b JD |
153 | |
154 | ||
155 | (define-public perl-zip | |
156 | (package | |
157 | (name "perl-zip") | |
158 | (version "1.30") | |
159 | (source | |
160 | (origin | |
161 | (method url-fetch) | |
162 | (uri (string-append | |
163 | "mirror://cpan/authors/id/A/AD/ADAMK/Archive-Zip-" | |
164 | version ".tar.gz")) | |
165 | (sha256 | |
166 | (base32 | |
167 | "0633zah5z9njiqnvy3vh42fjymncmil1jdfb7d18w8xpfzzp5d7q")))) | |
168 | (build-system perl-build-system) | |
169 | (synopsis "Provides an interface to ZIP archive files") | |
170 | (description "The Archive::Zip module allows a Perl program to create, | |
171 | manipulate, read, and write Zip archive files.") | |
172 | (home-page "http://search.cpan.org/~adamk/Archive-Zip-1.30/") | |
173 | (license (package-license perl)))) |