diff mbox

[3/10] Add gsm.

Message ID 877fag1qpb.fsf@openmailbox.org
State New
Headers show

Commit Message

Lukas Gradl Sept. 13, 2016, 2:25 a.m. UTC
None

Comments

Ludovic Courtès Sept. 28, 2016, 9:16 a.m. UTC | #1
Lukas Gradl <lgradl@openmailbox.org> skribis:

> From ecafdf21a654c97fa9adb2c382c431c297a3fee0 Mon Sep 17 00:00:00 2001
> From: Lukas Gradl <lgradl@openmailbox.org>
> Date: Tue, 9 Aug 2016 16:43:36 -0500
> Subject: [PATCH 03/10] gnu: Add gsm.
>
> * gnu/packages/audio.scm (gsm): New variable.

Applied with small changes:

> +             (let ((out (assoc-ref %outputs "out")))
> +               (begin
> +                (system* "mv" (string-append out "/inc")
> +                         (string-append out "/include"))

I removed ‘begin’ and used ‘rename-file’ here.

> +                (mkdir-p (string-append out "/include/gsm"))
> +                (copy-recursively
> +                 "inc" (string-append out "/include/gsm"))))))

I noticed that this leads to a situation where we have both
include/gsm.h and include/gsm/gsm.h as identical file.  I suppose the
former is unnecessary?

Thanks!

Ludo’.
diff mbox

Patch

From ecafdf21a654c97fa9adb2c382c431c297a3fee0 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Tue, 9 Aug 2016 16:43:36 -0500
Subject: [PATCH 03/10] gnu: Add gsm.

* gnu/packages/audio.scm (gsm): New variable.
---
 gnu/packages/audio.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 67701a0..283f56b 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -6,6 +6,7 @@ 
 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2456,3 +2457,49 @@  with support for HD extensions.")
 flavors EBU R128, ATSC A/85, and ReplayGain 2.0.  It helps normalizing the
 loudness of audio and video files to the same level.")
     (license license:gpl2+)))
+
+(define-public gsm
+  (package
+    (name "gsm")
+    (version "1.0.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "http://www.quut.com/" name "/" name
+                       "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0b1mx69jq88wva3wk0hi6fcl5a52qhnq2f9p3f3jdh5k61ma252q"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "tst"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'pre-install
+           (lambda _
+            (let ((out (assoc-ref %outputs "out")))
+              (substitute* "Makefile"
+                (("INSTALL_ROOT\t=")
+                 (string-append "INSTALL_ROOT\t=\t" out)))
+              (mkdir-p (string-append out "/inc"))
+              (mkdir-p (string-append out "/man"))
+              (mkdir-p (string-append out "/man/man1"))
+              (mkdir-p (string-append out "/man/man3"))
+              (mkdir-p (string-append out "/bin"))
+              (mkdir-p (string-append out "/lib")))))
+         (add-after 'install 'post-install
+           (lambda _
+             (let ((out (assoc-ref %outputs "out")))
+               (begin
+                (system* "mv" (string-append out "/inc")
+                         (string-append out "/include"))
+                (mkdir-p (string-append out "/include/gsm"))
+                (copy-recursively
+                 "inc" (string-append out "/include/gsm"))))))
+         (delete 'configure))))
+    (synopsis "GSM 06.10 lossy speech compression library")
+    (description "This C library provides an encoder and a decoder for the GSM
+06.10 RPE-LTP lossy speech compression algorithm.")
+    (home-page "http://quut.com/gsm/")
+    (license (license:non-copyleft "file://COPYRIGHT"))))
-- 
2.9.0