guix-devel
[Top][All Lists]
Advanced

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

[PATCH 3/3] gnu: Add zpaq.


From: Tobias Geerinckx-Rice
Subject: [PATCH 3/3] gnu: Add zpaq.
Date: Fri, 27 Jan 2017 20:59:24 +0100

* gnu/packages/compression.scm (zpaq): New variable.
---
 gnu/packages/compression.scm | 60 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 2e4de81..ca5509c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2015, 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Ben Woodcroft <address@hidden>
 ;;; Copyright © 2016 Danny Milosavljevic <address@hidden>
-;;; Copyright © 2016 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <address@hidden>
 ;;; Copyright © 2016 David Craven <address@hidden>
 ;;; Copyright © 2016 Kei Kebreau <address@hidden>
 ;;; Copyright © 2016 Marius Bakke <address@hidden>
@@ -46,6 +46,8 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages valgrind)
+  #:use-module (gnu packages zip)
+  #:use-module (ice-9 match)
   #:use-module ((srfi srfi-1) #:select (last)))
 
 (define-public zlib
@@ -1001,3 +1003,59 @@ handles the 7z format which features very high 
compression ratios.")
     (description "gzstream is a small library for providing zlib
 functionality in a C++ iostream.")
     (license license:lgpl2.1+)))
+
+(define-public zpaq
+  (package
+    (name "zpaq")
+    (version "7.15")
+    (source
+     (origin
+       (method url-fetch/zipbomb)
+       (uri (string-append "http://mattmahoney.net/dc/zpaq";
+                           (string-delete #\. version) ".zip"))
+       (sha256
+        (base32
+         "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Delete irrelevant pre-compiled binaries.
+        '(for-each delete-file (find-files "." "\\.exe$")))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure))           ; no ‘configure’ script
+       #:make-flags
+       (list
+        (string-append "CPPFLAGS=-Dunix"
+                       ,(match (or (%current-target-system)
+                                   (%current-system))
+                               ("x86_64-linux" "")
+                               ("i686-linux"    "")
+                               (_               " -DNOJIT")))
+        (string-append "CXXFLAGS=-O3 -mtune=generic -DNDEBUG"
+                       ,(match (or (%current-target-system)
+                                   (%current-system))
+                               ("x86_64-linux"  " -march=nocona")
+                               ("i686-linux"    " -march=i686")
+                               (_               "")))
+        (string-append "PREFIX="
+                       (assoc-ref %outputs "out")))))
+    (native-inputs
+     `(("perl" ,perl)))                 ; for pod2man
+    (home-page "http://mattmahoney.net/dc/zpaq.html";)
+    (synopsis "Incremental journaling archiver")
+    (description "ZPAQ is a command-line archiver that backs up faster and
+compresses better than most other popular archivers in realistic situations
+with many duplicate and already compressed files.  It backs up only those files
+modified since the last update.  All previous versions remain untouched and can
+be independently recovered.  Identical files are only stored once (known as
address@hidden).  Archives can also be encrypted.
+ZPAQ is intended to back up user data, not entire operating systems. It ignores
+owner and group IDs, ACLs, extended attributes, or special file types like
+devices, sockets, or named pipes.  It does not follow or restore symbolic links
+or junctions, and always follows hard links.")
+    (license (list license:public-domain
+                   ;; libzpaq.cpp contains a mix of public-domain and
+                   ;; expat-licenced (or ‘MIT’) code.
+                   license:expat))))
-- 
2.9.3




reply via email to

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