Patchwork Add libiax

login
register
mail settings
Submitter Lukas Gradl
Date May 28, 2016, 11:08 p.m.
Message ID <87shx17pbq.fsf@openmailbox.org>
Download mbox | patch
Permalink /patch/12594/
State New
Headers show

Comments

Lukas Gradl - May 28, 2016, 11:08 p.m.
Hi Guix,

Attached is a patch for LibIAX, a library that is used by the Ring
(formerly SFLphone).

Upstream seems to use no version numbers.  I used the git commit ID that
is also refered to in the version that is bundeled with Ring.  This is
also the latest commit to libiax.

Thank you!
Leo Famulari - May 29, 2016, 12:48 a.m.
On Sat, May 28, 2016 at 06:08:57PM -0500, Lukas Gradl wrote:
> 
> Hi Guix,
> 
> Attached is a patch for LibIAX, a library that is used by the Ring
> (formerly SFLphone).

Cool!

> Upstream seems to use no version numbers.  I used the git commit ID that
> is also refered to in the version that is bundeled with Ring.  This is
> also the latest commit to libiax.

Since there are no upstream versions, I think the version string should
use 0.0.0 to refer to the upstream version, then the Guix package
revision number, and then the 7 characters of the commit.

So, it would end up like this: 0.0.0-1.cabba9e

See here:
https://www.gnu.org/software/guix/manual/html_node/Version-Numbers.html#Version-Numbers

> +    (package
> +      (name "libiax")
> +      (version (string-append "2-" (string-take commit 7)))

By the way, what does the "2-" refer to?
Leo Famulari - May 29, 2016, 12:55 a.m.
On Sat, May 28, 2016 at 06:08:57PM -0500, Lukas Gradl wrote:
> +  #:use-module (gnu packages autotools)  
                                           ^
Also, there is some extra whitespace at the end of the line above.

> +         (uri
> +          (string-append
> +           "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
> +           "repository/archive.tar.gz?ref="
> +           commit))

Can you use (file-name ...) to make the file-name like
libiax-version.tar.gz?
Lukas Gradl - May 30, 2016, 7:47 p.m.
Thank you for your review!

Leo Famulari <leo@famulari.name> writes:

> On Sat, May 28, 2016 at 06:08:57PM -0500, Lukas Gradl wrote:
>> 
>> Hi Guix,
>> 
>> Attached is a patch for LibIAX, a library that is used by the Ring
>> (formerly SFLphone).
>
> Cool!
>
>> Upstream seems to use no version numbers.  I used the git commit ID that
>> is also refered to in the version that is bundeled with Ring.  This is
>> also the latest commit to libiax.
>
> Since there are no upstream versions, I think the version string should
> use 0.0.0 to refer to the upstream version, then the Guix package
> revision number, and then the 7 characters of the commit.
>
> So, it would end up like this: 0.0.0-1.cabba9e
>
> See here:
> https://www.gnu.org/software/guix/manual/html_node/Version-Numbers.html#Version-Numbers

OK, Thank you for pointing this out!  I missed that in the manual.
I updated the patch accordingly and will send it soon.

>
>> +    (package
>> +      (name "libiax")
>> +      (version (string-append "2-" (string-take commit 7)))
>
> By the way, what does the "2-" refer to?

Upstream seems to refer to the software as "iax" "libiax" and "libiax2"
interchangeably.  The "2" was the closest thing I could find to a version
number.

Thank you!
Andreas Enge - May 31, 2016, 7:02 p.m.
Hello,

just a quick comment on the name:

On Mon, May 30, 2016 at 02:47:55PM -0500, Lukas Gradl wrote:
> Upstream seems to refer to the software as "iax" "libiax" and "libiax2"
> interchangeably.  The "2" was the closest thing I could find to a version
> number.

notice that the tarball name is always "correct" as the package name, unless
upstream consistently uses a different name. In this case:

+           "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
+           "repository/archive.tar.gz?ref="

I would suggest to use "libiax2" as the package name (variable name and
package NAME field), and the version number as proposed by Leo.

Andreas
Leo Famulari - May 31, 2016, 9:02 p.m.
On Tue, May 31, 2016 at 09:02:21PM +0200, Andreas Enge wrote:
> Hello,
> 
> just a quick comment on the name:
> 
> On Mon, May 30, 2016 at 02:47:55PM -0500, Lukas Gradl wrote:
> > Upstream seems to refer to the software as "iax" "libiax" and "libiax2"
> > interchangeably.  The "2" was the closest thing I could find to a version
> > number.
> 
> notice that the tarball name is always "correct" as the package name, unless
> upstream consistently uses a different name. In this case:
> 
> +           "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
> +           "repository/archive.tar.gz?ref="
> 
> I would suggest to use "libiax2" as the package name (variable name and
> package NAME field), and the version number as proposed by Leo.

Okay, so let's change the naming to libiax2, and give some more detail
about the licensing, as shown in my patch from earlier today. Then we
should be ready to merge :)

Patch

From b6319840932e87b40c1f8ae4a7546727f7547d91 Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sat, 28 May 2016 17:50:28 -0500
Subject: [PATCH] gnu: telephony: Add libiax.

* gnu/packages/telephony.scm (libiax): New variable.
---
 gnu/packages/telephony.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 50a83fb..754c4c5 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -3,6 +3,7 @@ 
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +22,7 @@ 
 
 (define-module (gnu packages telephony)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)  
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
@@ -211,3 +213,36 @@  Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
 and a supporting cryptographic kernel.")
     (home-page "https://github.com/cisco/libsrtp")
     (license bsd-3)))
+
+(define-public libiax
+  (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
+    ;; This is the commit used by the Ring Project.
+    (package
+      (name "libiax")
+      (version (string-append "2-" (string-take commit 7)))
+      (source
+       (origin
+         (method url-fetch)
+         (uri
+          (string-append
+           "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
+           "repository/archive.tar.gz?ref="
+           commit))
+         (sha256
+          (base32
+           "0cj5293bixp3k5x3hjwyd0iq7z8w5p7yavxvvkqk5817hjq386y2"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("libtool" ,libtool)))
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (add-before 'configure 'autoconf
+                      (lambda _
+                        (zero? (system* "autoreconf" "-vfi")))))))
+      (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
+      (synopsis "Inter-Asterisk-Protocol library")
+      (description "LibIAX implements the Inter-Asterisk-Protocol for relaying
+Voice-over-IP (VoIP) comminications.")
+      (license lgpl2.0))))
-- 
2.7.4