aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-05-27 01:26:09 -0400
committerMark H Weaver <mhw@netris.org>2018-05-27 01:26:09 -0400
commit1640f16e7888291227d11647dbb5f83ad5d138a1 (patch)
treebf979aa4e6538b8261762cfbb80512ebb023b016 /gnu/packages/compression.scm
parent0ff4e49a95d8a54cd5508f441b927a670d348519 (diff)
parenta4e45acdc07fc3faf2844b3658ee31ebc538bd1c (diff)
downloadguix-1640f16e7888291227d11647dbb5f83ad5d138a1.tar
guix-1640f16e7888291227d11647dbb5f83ad5d138a1.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 1ee26d6429..e145d53cef 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2158,3 +2159,75 @@ with @code{deflate} but offers more dense compression.
The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
(license license:expat)))
+
+(define-public ucl
+ (package
+ (name "ucl")
+ (version "1.03")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.oberhumer.com/opensource/"
+ name "/download/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
+ (build-system gnu-build-system)
+ (home-page "http://www.oberhumer.com/opensource/ucl/")
+ (synopsis "Portable lossless data compression library")
+ (description "UCL implements a number of compression algorithms that
+achieve an excellent compression ratio while allowing fast decompression.
+Decompression requires no additional memory.
+
+Compared to LZO, the UCL algorithms achieve a better compression ratio but
+decompression is a little bit slower.")
+ (license license:gpl2+)))
+
+(define-public upx
+ (package
+ (name "upx")
+ (version "3.94")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/upx/upx/releases/download/v"
+ version "/" name "-" version "-src.tar.xz"))
+ (sha256
+ (base32
+ "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("perl" ,perl)
+ ("ucl" ,ucl)))
+ (inputs `(("zlib" ,zlib)))
+ (arguments
+ `(#:make-flags
+ (list "all"
+ ;; CHECK_WHITESPACE does not seem to work.
+ ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/upx.
+ "CHECK_WHITESPACE=true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (delete 'install)
+ (add-before 'build 'patch-exec-bin-sh
+ (lambda _
+ (substitute* (find-files "Makefile")
+ (("/bin/sh") (which "sh")))
+ (substitute* "src/Makefile"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-after 'build 'install-upx
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "src/upx.out" (string-append bin "/upx")))
+ #t))
+ )))
+ (home-page "https://upx.github.io/")
+ (synopsis "Compression tool for executables")
+ (description
+ "The Ultimate Packer for eXecutables (UPX) is an executable file
+compressor. UPX typically reduces the file size of programs and shared
+libraries by around 50%--70%, thus reducing disk space, network load times,
+download times, and other distribution and storage costs.")
+ (license license:gpl2+)))