1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages zip)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages perl)
28 #:use-module (guix build-system perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python))
39 (uri (string-append "mirror://sourceforge/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
42 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
43 (build-system gnu-build-system)
44 (inputs `(("bzip2" ,bzip2)))
46 `(#:tests? #f ; no test target
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
53 (lambda* (#:key (make-flags '()) #:allow-other-keys)
54 (zero? (apply system* "make" "generic_gcc" make-flags)))
55 (alist-delete 'configure %standard-phases))))
56 (home-page "http://www.info-zip.org/Zip.html")
57 (synopsis "Compression and file packing utility")
59 "Zip is a compression and file packaging/archive utility. Zip is useful
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,
64 protection, and check information to verify file integrity). An entire
65 directory structure can be packed into a ZIP archive with a single command.
67 Zip has one compression method (deflation) and can also store files without
68 compression. Zip automatically chooses the better of the two for each file.
69 Compression ratios of 2:1 to 3:1 are common for text files.")
70 (license (license:non-copyleft "file://LICENSE"
71 "See LICENSE in the distribution."))))
74 (package (inherit zip)
80 (uri (string-append "mirror://sourceforge/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
83 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
84 (patches (map search-patch '("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")))))
97 (build-system gnu-build-system)
98 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
100 `(#:phases (modify-phases %standard-phases
103 (lambda* (#:key make-flags #:allow-other-keys)
104 (zero? (apply system* "make"
105 `("-j" ,(number->string
106 (parallel-job-count))
109 #:make-flags (list "-f" "unix/Makefile"
110 (string-append "prefix=" %output)
111 (string-append "MANDIR=" %output "/share/man/man1"))))
112 (home-page "http://www.info-zip.org/UnZip.html")
113 (synopsis "Decompression and file extraction utility")
115 "UnZip is an extraction utility for archives compressed in .zip format,
116 also called \"zipfiles\".
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.")
122 (license (license:non-copyleft "file://LICENSE"
123 "See LICENSE in the distribution."))))
125 (define-public zziplib
132 (uri (string-append "mirror://sourceforge/zziplib/zziplib13/"
137 "0nsjqxw017hiyp524p9316283jlf5piixc1091gkimhz38zh7f51"))))
138 (build-system gnu-build-system)
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
147 `(#:parallel-tests? #f)) ; since test files are created on the fly
148 (home-page "http://zziplib.sourceforge.net/")
149 (synopsis "Library for accessing zip files")
151 "ZZipLib is a library based on zlib for accessing zip files.")
152 (license license:lgpl2.0+)))
155 (define-public perl-zip
163 "mirror://cpan/authors/id/A/AD/ADAMK/Archive-Zip-"
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))))