guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: Add upx.


From: Ludovic Courtès
Subject: 03/05: gnu: Add upx.
Date: Sat, 26 May 2018 16:51:22 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 5735256d0b5161ae99ad6e531748fce2d1bfa1b0
Author: Pierre Neidhardt <address@hidden>
Date:   Sat May 26 22:10:57 2018 +0200

    gnu: Add upx.
    
    * gnu/packages/compression.scm (upx): New variable.
---
 gnu/packages/compression.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 4ce481a..29518b1 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -2174,3 +2174,53 @@ 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+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]