summary refs log tree commit diff
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2020-12-09 15:08:33 -0500
committerKei Kebreau <kkebreau@posteo.net>2020-12-27 16:42:02 -0500
commitfc5f56eaf4ef1dc09a7e4062c2b973aa9f27b285 (patch)
treebe4c36a0dd2e8308470705a095e659f35432a80c
parent64af916d6f08ae5c59ee76c15fdd9cff343595a4 (diff)
downloadguix-fc5f56eaf4ef1dc09a7e4062c2b973aa9f27b285.tar.gz
gnu: lame: Install pkg-config file.
* gnu/packages/mp3.scm (lame)[arguments]: Add 'install-pkg-config phase.
-rw-r--r--gnu/packages/mp3.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 7a0c35097a..fa45ef9930 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -428,6 +428,27 @@ use with CD-recording software).")
               (base32
                "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-pkg-config
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (pkg-config-dir (string-append out "/lib/pkgconfig")))
+               (mkdir-p pkg-config-dir)
+               (with-output-to-file (string-append pkg-config-dir "/lame.pc")
+                 (lambda _
+                   (format #t
+                           "prefix=~@*~a~@
+                           libdir=${prefix}/lib~@
+                           includedir=${prefix}/include~@
+
+                           Name: lame~@
+                           Description:~@
+                           Version: ~a~@
+                           Libs: -L${libdir} -lmp3lame~@
+                           Cflags: -I${includedir}~%"
+                           out ,version)))))))))
     (home-page "http://lame.sourceforge.net/")
     (synopsis "MPEG Audio Layer III (MP3) encoder")
     (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")