summary refs log tree commit diff
diff options
context:
space:
mode:
authorng0 <ng0@libertad.pw>2017-02-09 13:37:04 +0000
committerKei Kebreau <kei@openmailbox.org>2017-02-09 12:15:28 -0500
commitff71196067a97bd378a4f1b0ae2b78384b78377d (patch)
tree72f398facd461c4fb6b758bdf2e4d9f00a2b51ed
parentb0a2adddc8d2beeb9b3d20a433954ea10be7a8c0 (diff)
downloadguix-ff71196067a97bd378a4f1b0ae2b78384b78377d.tar.gz
gnu: libextractor: Move .a files to output "static".
* gnu/packages/gnunet.scm (libextractor): Move .a files to "static" output.
[arguments](phases): New phase for moving .a files to output "static".

Signed-off-by: Kei Kebreau <kei@openmailbox.org>
-rw-r--r--gnu/packages/gnunet.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm
index f7da12ad5c..a4514a7f41 100644
--- a/gnu/packages/gnunet.scm
+++ b/gnu/packages/gnunet.scm
@@ -115,13 +115,30 @@
       ("zlib" ,zlib)))
    (native-inputs
     `(("pkg-config" ,pkg-config)))
+   (outputs '("out"
+              "static")) ; 396 KiB .a files
    (arguments
     `(#:configure-flags
       (list (string-append "--with-ltdl="
                            (assoc-ref %build-inputs "libltdl"))
             (string-append "--with-tidy="
                            (assoc-ref %build-inputs "tidy-html")))
-      #:parallel-tests? #f))
+      #:parallel-tests? #f
+      #:phases
+      (modify-phases %standard-phases
+        (add-after 'install 'move-static-libraries
+          (lambda* (#:key outputs #:allow-other-keys)
+            ;; Move static libraries to the "static" output.
+            (let* ((out    (assoc-ref outputs "out"))
+                   (lib    (string-append out "/lib"))
+                   (static (assoc-ref outputs "static"))
+                   (slib   (string-append static "/lib")))
+              (mkdir-p slib)
+              (for-each (lambda (file)
+                          (install-file file slib)
+                          (delete-file file))
+                        (find-files lib "\\.a$"))
+              #t))))))
    (synopsis "Library to extract meta-data from media files")
    (description
     "GNU libextractor is a library for extracting metadata from files.  It