From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebSib-0004g0-ES for guix-patches@gnu.org; Tue, 16 Jan 2018 10:00:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebSiY-0002OH-BQ for guix-patches@gnu.org; Tue, 16 Jan 2018 10:00:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebSiY-0002OD-8w for guix-patches@gnu.org; Tue, 16 Jan 2018 10:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ebSiY-0001m2-2k for guix-patches@gnu.org; Tue, 16 Jan 2018 10:00:02 -0500 Subject: [bug#30137] [PATCH] gnu: Add fgallery. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebSiA-00047p-9T for guix-patches@gnu.org; Tue, 16 Jan 2018 09:59:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebSi7-00025q-7f for guix-patches@gnu.org; Tue, 16 Jan 2018 09:59:38 -0500 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:36670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebSi6-00024z-UY for guix-patches@gnu.org; Tue, 16 Jan 2018 09:59:35 -0500 Received: by mail-wr0-x22a.google.com with SMTP id d9so15493783wre.3 for ; Tue, 16 Jan 2018 06:59:34 -0800 (PST) From: m.othacehe@gmail.com Date: Tue, 16 Jan 2018 15:59:28 +0100 Message-Id: <1516114768-17793-1-git-send-email-m.othacehe@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: 30137@debbugs.gnu.org From: Mathieu Othacehe * gnu/packages/graphics.scm (fgallery): New variable. --- gnu/packages/graphics.scm | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c47455c..27e77bc 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis ;;; Copyright © 2017 Ben Woodcroft ;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2018 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,12 +42,16 @@ #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages documentation) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages haskell) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages python) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) + #:use-module (gnu packages perl) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) ;libsndfile, libsamplerate #:use-module (gnu packages compression) @@ -686,3 +691,86 @@ your terminal. It comes bundled with predefined styles: (define-public python2-pastel (package-with-python2 python-pastel)) + +(define-public fgallery + (package + (name "fgallery") + (version "1.8.2") + (source (origin + (method url-fetch) + (uri + (string-append + "http://www.thregr.org/~wavexx/software/fgallery/releases/" + "fgallery-" version ".zip")) + (sha256 + (base32 + "18wlvqbxcng8pawimbc8f2422s8fnk840hfr6946lzsxr0ijakvf")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (share (string-append out "/share/fgallery")) + (man (string-append out "/share/man/man1")) + (perl5lib (getenv "PERL5LIB")) + (script (string-append share "/fgallery"))) + (define (bin-directory input-name) + (string-append (assoc-ref inputs input-name) "/bin")) + + (mkdir-p man) + (copy-file "fgallery.1" (string-append man "/fgallery.1")) + + (mkdir-p share) + (copy-recursively "." share) + + ;; fgallery copies files from store when it is run. The + ;; read-only permissions from the store directories will cause + ;; fgallery to fail. Do not preserve file attributes when + ;; copying files to prevent it. + (substitute* script + (("'cp'") + "'cp', '--no-preserve=all'")) + + (mkdir-p bin) + (symlink script (string-append out "/bin/fgallery")) + + (wrap-program script + `("PATH" ":" prefix + ,(map bin-directory '("imagemagick" + "lcms" + "fbida" + "libjpeg" + "zip" + "jpegoptim" + "pngcrush" + "p7zip"))) + `("PERL5LIB" ":" prefix (,perl5lib))) + #t)))))) + (native-inputs + `(("unzip" ,unzip))) + ;; TODO: Add missing optional dependency: facedetect. + (inputs + `(("imagemagick" ,imagemagick) + ("lcms" ,lcms) + ("fbida" ,fbida) + ("libjpeg" ,libjpeg) + ("zip" ,zip) + ("perl" ,perl) + ("perl-cpanel-json-xs" ,perl-cpanel-json-xs) + ("perl-image-exiftool" ,perl-image-exiftool) + ("jpegoptim" ,jpegoptim) + ("pngcrush" ,pngcrush) + ("p7zip" ,p7zip))) + (home-page "http://www.thregr.org/~wavexx/software/fgallery/") + (synopsis "Static photo gallery generator") + (description + "FGallery is a static, javascript photo gallery generator with minimalist +look. The result can be uploaded on any web server without additional +requirements.") + (license license:gpl2+))) -- 2.7.4