unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30137] [PATCH] gnu: Add fgallery.
@ 2018-01-16 14:59 m.othacehe
  2018-01-23  9:00 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: m.othacehe @ 2018-01-16 14:59 UTC (permalink / raw)
  To: 30137

From: Mathieu Othacehe <m.othacehe@gmail.com>

* 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 <manolis837@gmail.com>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#30137] [PATCH] gnu: Add fgallery.
  2018-01-16 14:59 [bug#30137] [PATCH] gnu: Add fgallery m.othacehe
@ 2018-01-23  9:00 ` Ludovic Courtès
  2018-01-23  9:52   ` bug#30137: " Mathieu Othacehe
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-01-23  9:00 UTC (permalink / raw)
  To: m.othacehe; +Cc: 30137

Hello,

m.othacehe@gmail.com skribis:

> From: Mathieu Othacehe <m.othacehe@gmail.com>
>
> * gnu/packages/graphics.scm (fgallery): New variable.

[...]

> +    (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.")

s/javascript/JavaScript/  :-)

Otherwise LGTM, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#30137: [PATCH] gnu: Add fgallery.
  2018-01-23  9:00 ` Ludovic Courtès
@ 2018-01-23  9:52   ` Mathieu Othacehe
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Othacehe @ 2018-01-23  9:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30137-done


Hey Ludo,

> Otherwise LGTM, thank you!

Thanks, fixed and pushed!

Mathieu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-23  9:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 14:59 [bug#30137] [PATCH] gnu: Add fgallery m.othacehe
2018-01-23  9:00 ` Ludovic Courtès
2018-01-23  9:52   ` bug#30137: " Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).