summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-12-16 11:18:48 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-12-17 11:49:39 +0200
commit46c2cf6902c81ef61060337ff25a9e1eb23d8b49 (patch)
tree85d87ee44e184311020e0967dc826d9ff984e99e /gnu/packages
parentf80ddc64c671f98ece529494158dfad3b1344370 (diff)
downloadguix-46c2cf6902c81ef61060337ff25a9e1eb23d8b49.tar.gz
gnu: lmdb: Install pkg-config file.
* gnu/packages/databases.scm (lmdb)[arguments]: Add phase to create a
lmdb.pc file.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/databases.scm20
1 files changed, 19 insertions, 1 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4b1a1ff09d..3bd2add8ca 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2352,7 +2352,25 @@ database.")
              (chdir "libraries/liblmdb")
              (substitute* "Makefile"
                (("/usr/local") (assoc-ref outputs "out")))
-            #t)))))
+            #t))
+         (add-after 'install 'create-pkg-config-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p (string-append out "/lib/pkgconfig"))
+               (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
+                 (lambda _
+                   (format #t "prefix=~a~@
+                           exec_prefix=~a~@
+                           libdir=~a/lib~@
+                           includedir=~a/include~@
+                           ~@
+                           Name: liblmdb~@
+                           Version: ~a~@
+                           Description: Lightning Memory-Mapped Database library~@
+                           Libs: -L${libdir} -llmdb~@
+                           Cflags: -I${includedir}~%"
+                           out out out out ,version)))
+                 #t))))))
     (home-page "https://symas.com/lmdb/")
     (synopsis "Lightning Memory-Mapped Database library")
     (description