From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5VVQ-0007OW-Cu for guix-patches@gnu.org; Tue, 02 May 2017 06:58:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5VVM-0004wc-M0 for guix-patches@gnu.org; Tue, 02 May 2017 06:58:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d5VVM-0004wX-Gx for guix-patches@gnu.org; Tue, 02 May 2017 06:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d5VVK-0003OD-W8 for guix-patches@gnu.org; Tue, 02 May 2017 06:58:04 -0400 Subject: bug#26625: [PATCH] gnu : Add unshield. Resent-Message-ID: From: manolis837@gmail.com Date: Tue, 2 May 2017 13:57:25 +0300 Message-Id: <20170502105725.30391-2-manolis837@gmail.com> In-Reply-To: <20170502105725.30391-1-manolis837@gmail.com> References: <87zif5zwlb.fsf@fastmail.com> <20170502105725.30391-1-manolis837@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26625@debbugs.gnu.org From: Manolis Ragkousis * gnu/packages/compression.scm (unshield): New variable. --- gnu/packages/compression.scm | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 4793755c2..b333e6ded 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2017 ng0 +;;; Copyright © 2017 Manolis Fragkiskos Ragkousis ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) @@ -46,10 +48,13 @@ #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages check) + #:use-module (gnu packages curl) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages tls) #:use-module (gnu packages valgrind) + #:use-module (gnu packages zip) #:use-module (ice-9 match) #:use-module ((srfi srfi-1) #:select (last))) @@ -1159,6 +1164,77 @@ or junctions, and always follows hard links.") ;; expat-licenced (or ‘MIT’) code. license:expat)))) +(define-public unshield + (package + (name "unshield") + (version "1.4.2") + (source + (origin (method url-fetch) + (uri (string-append "http://github.com/twogood/unshield/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x")))) + (build-system cmake-build-system) + (inputs + `(("zlib" ,zlib) + ("openssl" ,openssl) + ;; test data that is otherwise downloaded with curl + ("unshield-avigomanager11b22.zip" + ,(origin + (method url-fetch) + (uri (string-append "https://www.dropbox.com/s/8r4b6752swe3nhu/\" +unshield-avigomanager11b22.zip?dl=1")) + (sha256 + (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn")) + (file-name "unshield-avigomanager11b22.zip"))) + ("unshield-the-feeble-files-spanish.zip" + ,(origin + (method url-fetch) + (uri (string-append "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/\" +unshield-the-feeble-files-spanish.zip?dl=1")) + (sha256 + (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd")) + (file-name "unshield-the-feeble-files-spanish.zip"))))) + (native-inputs + `(("unzip" ,unzip))) + (arguments + `(#:out-of-source? #f + #:phases + (modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (i) + (copy-file (assoc-ref inputs i) + (string-append "test/v0/" i))) + '("unshield-avigomanager11b22.zip" + "unshield-the-feeble-files-spanish.zip")) + (substitute* (find-files "test/" "/*\\.sh") + ;; Tests expect the unshield binary in a specific + ;; location. + (("/var/tmp/unshield/bin/unshield") + (string-append (getcwd) "/src/unshield")) + ;; We no longer need to download the data. + ((".?URL=.*$") "") + (("curl -(|f)sSL -o test.zip .*") "")) + (substitute* "test/v0/avigomanager.sh" + (("test.zip") + (string-append (getcwd) + "/test/v0/unshield-avigomanager11b22.zip"))) + (substitute* "test/v0/the-feeble-files-spanish.sh" + (("test.zip") + (string-append (getcwd) + "/test/v0/unshield-the-feeble-files-spanish.zip"))))) + (replace 'check + (lambda _ + (zero? (system* "./run-tests.sh"))))))) + (home-page "https://github.com/twogood/unshield") + (synopsis "Extract CAB files from InstallShield installers") + (description + "@command{unshield} is a tool and library for extracting @file{.cab} + archives from InstallShield installers.") + (license license:expat))) + (define-public unrar (package (name "unrar") -- 2.12.2