gnu: jami: Update to 20191101.3.67671e7.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
CommitLineData
8fd3de0b 1;;; GNU Guix --- Functional package management for GNU
63af948f
AE
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3c9e35cc 4;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6f09178d 5;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
4ff20605 6;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
319ac02b 7;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
47956fa0 8;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
5a103bb8 9;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
7616d75f 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
bd4b6f41 11;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
b61cb244 12;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
bd4b6f41
PN
13;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
8fd3de0b
JD
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages telephony)
32 #:use-module (gnu packages)
c771b799 33 #:use-module (gnu packages aidc)
4ff20605 34 #:use-module (gnu packages autotools)
faa29e4b 35 #:use-module (gnu packages avahi)
bd4b6f41
PN
36 #:use-module (gnu packages audio)
37 #:use-module (gnu packages base)
faa29e4b 38 #:use-module (gnu packages boost)
80e2524c 39 #:use-module (gnu packages check)
bd4b6f41
PN
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages crypto)
c771b799 42 #:use-module (gnu packages documentation)
b61cb244 43 #:use-module (gnu packages file)
faa29e4b 44 #:use-module (gnu packages protobuf)
c771b799 45 #:use-module (gnu packages gettext)
bd4b6f41 46 #:use-module (gnu packages glib)
c771b799 47 #:use-module (gnu packages gnome)
8fd3de0b 48 #:use-module (gnu packages gnupg)
c771b799
PN
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages libcanberra)
3c9e35cc 51 #:use-module (gnu packages linux)
319ac02b
FF
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages ncurses)
bd4b6f41
PN
54 #:use-module (gnu packages networking)
55 #:use-module (gnu packages pcre)
56 #:use-module (gnu packages perl)
8fd3de0b 57 #:use-module (gnu packages pkg-config)
faa29e4b 58 #:use-module (gnu packages pulseaudio)
bd4b6f41 59 #:use-module (gnu packages python)
faa29e4b 60 #:use-module (gnu packages qt)
bd4b6f41 61 #:use-module (gnu packages serialization)
faa29e4b 62 #:use-module (gnu packages speech)
c771b799 63 #:use-module (gnu packages sqlite)
99e6f9c8 64 #:use-module (gnu packages tls)
bd4b6f41
PN
65 #:use-module (gnu packages upnp)
66 #:use-module (gnu packages video)
c771b799 67 #:use-module (gnu packages webkit)
319ac02b 68 #:use-module (gnu packages xiph)
faa29e4b 69 #:use-module (gnu packages xorg)
b61cb244
JL
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages bison)
73 #:use-module (gnu packages flex)
974aaf71 74 #:use-module ((guix licenses) #:prefix license:)
8fd3de0b
JD
75 #:use-module (guix packages)
76 #:use-module (guix download)
b61cb244
JL
77 #:use-module (guix git-download)
78 #:use-module (guix build-system cmake)
8fd3de0b
JD
79 #:use-module (guix build-system gnu))
80
81(define-public commoncpp
82 (package
83 (name "commoncpp")
84 (version "1.8.1")
85 (source (origin
86 (method url-fetch)
87 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
88 version ".tar.gz"))
89 (sha256 (base32
90 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
91 (arguments
92 `(#:phases
dc1d3cde
KK
93 (modify-phases %standard-phases
94 (add-before 'configure 'pre-configure
95 (lambda _
96 (substitute* "src/applog.cpp"
97 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
98 #t)))))
8fd3de0b 99 (build-system gnu-build-system)
12bcf94a 100 (synopsis "(u)Common C++ framework for threaded applications")
8fd3de0b
JD
101 (description "GNU Common C++ is an portable, optimized class framework for
102threaded applications, supporting concurrent synchronization, inter-process
103communications via sockets, and various methods for data handling, such as
104serialization and XML parsing. It includes the uCommon C++ library, a smaller
105reimplementation.")
974aaf71 106 (license license:gpl2+) ; plus runtime exception
6fd52309 107 (home-page "https://www.gnu.org/software/commoncpp/")))
8fd3de0b
JD
108
109(define-public ucommon
110 (package
111 (name "ucommon")
99e6f9c8 112 (version "7.0.0")
8fd3de0b
JD
113 (source (origin
114 (method url-fetch)
115 (uri (string-append "mirror://gnu/commoncpp/" name "-"
116 version ".tar.gz"))
117 (sha256 (base32
99e6f9c8 118 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
8fd3de0b 119 (build-system gnu-build-system)
99e6f9c8 120 (inputs `(("gnutls" ,gnutls)))
35b9e423
EB
121 (synopsis "Common C++ framework for threaded applications")
122 (description "GNU uCommon C++ is meant as a very light-weight C++ library
123to facilitate using C++ design patterns even for very deeply embedded
124applications, such as for systems using uclibc along with posix threading
125support.")
974aaf71 126 (license license:gpl3+)
6fd52309 127 (home-page "https://www.gnu.org/software/commoncpp/")
63e8bb12 128 (properties '((ftp-directory . "/gnu/commoncpp")))))
8fd3de0b
JD
129
130(define-public ccrtp
131 (package
132 (name "ccrtp")
9dc9053f 133 (version "2.1.2")
8fd3de0b
JD
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
137 version ".tar.gz"))
138 (sha256 (base32
9dc9053f 139 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
8fd3de0b
JD
140 (build-system gnu-build-system)
141 (inputs `(("ucommon" ,ucommon)
142 ("libgcrypt" ,libgcrypt)))
143 (native-inputs `(("pkg-config" ,pkg-config)))
144 (synopsis "Implementation of RTP (real-time transport protocol)")
145 (description "GNU ccRTP is an implementation of RTP, the real-time transport
146protocol from the IETF. It is suitable both for high capacity servers and
147personal client applications. It is flexible in its design, allowing it to
148function as a framework for the framework, rather than just being a
149packet-manipulation library.")
974aaf71 150 (license license:gpl2+) ; plus runtime exception
6fd52309 151 (home-page "https://www.gnu.org/software/ccrtp/")))
8fd3de0b
JD
152
153
154(define-public osip
155 (package
156 (name "osip")
6dfbbd2c 157 (version "5.0.0")
8fd3de0b
JD
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
75072795 161 (patches (search-patches "osip-CVE-2017-7853.patch"))
6dfbbd2c
LF
162 (sha256
163 (base32
164 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
8fd3de0b
JD
165 (build-system gnu-build-system)
166
167 (synopsis "Library implementing SIP (RFC-3261)")
168 (description "GNU oSIP is an implementation of the SIP protocol. It is
169used to provide multimedia and telecom software developers with an interface
170to initiate and control SIP sessions.")
974aaf71 171 (license license:lgpl2.1+)
6fd52309 172 (home-page "https://www.gnu.org/software/osip/")))
8fd3de0b
JD
173
174
175(define-public exosip
176 (package
177 (name "exosip")
178 (version "4.1.0")
179 (source (origin
180 (method url-fetch)
966a543b
LC
181 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
182 version ".tar.gz"))
8fd3de0b
JD
183 (sha256 (base32
184 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
185 (build-system gnu-build-system)
186 (inputs `(("osip" ,osip)))
187 (synopsis "Sip abstraction library")
188 (description "EXosip is a library that hides the complexity of using the
e881752c 189SIP protocol for multimedia session establishment. This protocol is mainly to
8fd3de0b 190be used by VoIP telephony applications (endpoints or conference server) but
e881752c 191might be also useful for any application that wish to establish sessions like
8fd3de0b 192multiplayer games.")
974aaf71 193 (license license:gpl2+)
8fd3de0b
JD
194 ;; (plus OpenSSL linking exception)
195 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
340978d7 196 (home-page "https://savannah.nongnu.org/projects/exosip")))
8fd3de0b
JD
197
198(define-public sipwitch
199 (package
200 (name "sipwitch")
419fa59b 201 (version "1.9.15")
8fd3de0b
JD
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
205 version ".tar.gz"))
206 (sha256 (base32
419fa59b 207 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
8fd3de0b 208 (build-system gnu-build-system)
e881752c 209 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
8fd3de0b
JD
210 ;; cross-compiling. Among other issues there the program name "pkg-config"
211 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
e881752c
AK
212 ;; Fortunately we can avoid the use of pkg-config and set the dependency
213 ;; flags ourselves.
214 (arguments `(#:configure-flags
8fd3de0b 215 `("--without-pkg-config"
e881752c 216 ,(string-append "UCOMMON_CFLAGS=-I"
8fd3de0b
JD
217 (assoc-ref %build-inputs "ucommon") "/include")
218 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
e881752c 219 ,(string-append "LIBOSIP2_CFLAGS=-I"
8fd3de0b
JD
220 (assoc-ref %build-inputs "osip") "/include")
221 "LIBOSIP2_LIBS=-losipparser2 -losip2"
e881752c 222 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
8fd3de0b
JD
223 "/etc")
224 "EXOSIP2_LIBS=-leXosip2"
e881752c 225 ,(string-append "EXOSIP2_CFLAGS=-I"
8fd3de0b
JD
226 (assoc-ref %build-inputs "exosip")
227 "/include"))))
228 (inputs `(("ucommon" ,ucommon)
229 ("exosip" ,exosip)
230 ("osip" ,osip)))
231 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
232 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
233uses the SIP protocol. Calls can be made from behind NAT firewalls and
234without the need for a service provider. Its peer-to-peer design ensures that
235there is no central point for media intercept or capture and thus it can be
236used to construct a secure telephone system that operates over the public
237internet.")
974aaf71 238 (license license:gpl3+)
6fd52309 239 (home-page "https://www.gnu.org/software/sipwitch/")))
8fd3de0b 240
3c9e35cc
DH
241(define-public libsrtp
242 (package
243 (name "libsrtp")
f04152ef 244 (version "2.2.0")
3c9e35cc 245 (source (origin
1c956faa
EF
246 (method git-fetch)
247 (uri (git-reference
248 (url "https://github.com/cisco/libsrtp")
249 (commit (string-append "v" version))))
250 (file-name (git-file-name name version))
b0c7e053
TGR
251 (sha256
252 (base32
1c956faa 253 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
3c9e35cc 254 (native-inputs
b0c7e053 255 `(("psmisc" ,psmisc) ;some tests require 'killall'
340f9b9f 256 ("procps" ,procps)))
3c9e35cc
DH
257 (build-system gnu-build-system)
258 (arguments
f04152ef 259 '(#:test-target "runtest"))
3c9e35cc 260 (synopsis "Secure RTP (SRTP) Reference Implementation")
6c0b0887
TGR
261 (description
262 "This package provides an implementation of the Secure Real-time Transport
263Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
264supporting cryptographic kernel.")
3c9e35cc 265 (home-page "https://github.com/cisco/libsrtp")
974aaf71 266 (license license:bsd-3)))
4ff20605 267
80e2524c
RW
268(define-public bctoolbox
269 (package
270 (name "bctoolbox")
271 (version "0.2.0")
272 (source (origin
273 (method url-fetch)
274 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
275 version ".tar.gz"))
276 (sha256
277 (base32
278 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
279 (build-system gnu-build-system)
280 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
281 (native-inputs
282 `(("cunit" ,cunit)))
283 (inputs
284 `(("mbedtls" ,mbedtls-apache)))
285 (home-page "https://www.linphone.org")
286 (synopsis "Utilities library for linphone software")
287 (description "BCtoolbox is a utilities library used by Belledonne
4186adce 288Communications software like linphone.")
80e2524c
RW
289 (license license:gpl2+)))
290
0c45a6a4
RW
291(define-public ortp
292 (package
293 (name "ortp")
294 (version "0.27.0")
295 (source (origin
296 (method url-fetch)
297 (uri (string-append "https://download.savannah.nongnu.org/"
298 "releases/linphone/ortp/sources/ortp-"
299 version ".tar.gz"))
300 (sha256
301 (base32
302 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
303 (build-system gnu-build-system)
304 (inputs
305 `(("bctoolbox" ,bctoolbox)))
306 (native-inputs
307 `(("pkg-config" ,pkg-config)))
308 (home-page "https://linphone.org/")
309 (synopsis "Implementation of the Real-time transport protocol")
310 (description "oRTP is a library implementing the Real-time transport
311protocol (RFC 3550).")
312 (license license:lgpl2.1+)))
313
4ff20605
LG
314(define-public libiax2
315 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
316 ;; This is the commit used by the Ring Project.
317 (package
318 (name "libiax2")
319 (version (string-append "0.0.0-1." (string-take commit 7)))
320 (source
321 (origin
cd1f661e
RW
322 (method git-fetch)
323 (uri (git-reference
324 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
325 (commit commit)))
326 (file-name (git-file-name name version))
4ff20605
LG
327 (sha256
328 (base32
cd1f661e 329 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
4ff20605
LG
330 (build-system gnu-build-system)
331 (native-inputs
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool)))
4ff20605
LG
335 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
336 (synopsis "Inter-Asterisk-Protocol library")
337 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
338Voice-over-IP (VoIP) communications.")
339 ;; The file 'src/md5.c' is released into the public domain by RSA Data
340 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
341 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
342 ;; covered under the 'GPL'.
343 ;; The package as a whole is distributed under the LGPL 2.0.
974aaf71
LG
344 (license (list license:lgpl2.0
345 license:public-domain
346 license:gpl2+)))))
319ac02b
FF
347
348(define-public seren
349 (package
350 (name "seren")
351 (version "0.0.21")
352 (source (origin
353 (method url-fetch)
354 (uri (string-append "http://holdenc.altervista.org/"
355 "seren/downloads/seren-" version
356 ".tar.gz"))
357 (sha256
358 (base32
359 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
360 (build-system gnu-build-system)
361 (arguments '(#:tests? #f)) ; no "check" target
362 (inputs
363 `(("alsa-lib" ,alsa-lib)
364 ("gmp" ,gmp)
365 ("libogg" ,libogg)
366 ("ncurses" ,ncurses)
367 ("opus" ,opus)))
368 (synopsis "Simple VoIP program to create conferences from the terminal")
369 (description
370 "Seren is a simple VoIP program based on the Opus codec that allows you
371to create a voice conference from the terminal, with up to 10 participants,
372without having to register accounts, exchange emails, or add people to contact
373lists. All you need to join an existing conference is the host name or IP
374address of one of the participants.")
375 (home-page "http://holdenc.altervista.org/seren/")
974aaf71 376 (license license:gpl3+)))
faa29e4b 377
378(define-public mumble
379 (package
380 (name "mumble")
69ec0391 381 (version "1.2.19")
faa29e4b 382 (source (origin
383 (method url-fetch)
384 (uri (string-append "https://mumble.info/snapshot/"
385 name "-" version ".tar.gz"))
386 (sha256
387 (base32
69ec0391 388 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
fc51c11b 389 (patches (search-patches "mumble-1.2.19-abs.patch"))
faa29e4b 390 (modules '((guix build utils)))
391 (snippet
392 `(begin
393 ;; Remove bundled software.
394 (for-each delete-file-recursively '("3rdparty"
395 "speex"
396 "speexbuild"
397 "opus-build"
398 "opus-src"
399 "sbcelt-helper-build"
400 "sbcelt-lib-build"
401 "sbcelt-src"))
402 ;; TODO: Celt is still bundled. It has been merged into Opus
403 ;; and will be removed after 1.3.0.
404 ;; https://github.com/mumble-voip/mumble/issues/1999
405 #t))))
406 (build-system gnu-build-system)
407 (arguments
408 `(#:tests? #f ; no "check" target
409 #:phases
410 (modify-phases %standard-phases
411 (replace 'configure
412 (lambda* (#:key outputs #:allow-other-keys)
7616d75f
TGR
413 (invoke "qmake" "main.pro" "-recursive"
414 (string-append "CONFIG+="
415 (string-join
416 (list "no-update"
417 "no-ice"
418 "no-embed-qt-translations"
419 "no-bundled-speex"
420 "pch"
421 "no-bundled-opus"
422 "no-celt"
423 "no-alsa"
424 "no-oss"
425 "no-portaudio"
426 "speechd"
427 "no-g15"
428 "no-bonjour"
429 "release")))
430 (string-append "DEFINES+="
431 "PLUGIN_PATH="
432 (assoc-ref outputs "out")
433 "/lib/mumble"))))
faa29e4b 434 (add-before 'configure 'fix-libspeechd-include
435 (lambda _
436 (substitute* "src/mumble/TextToSpeech_unix.cpp"
437 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
438 (replace 'install ; install phase does not exist
439 (lambda* (#:key inputs outputs #:allow-other-keys)
440 (let* ((out (assoc-ref outputs "out"))
bd9f8869 441 (etc (string-append out "/etc/murmur"))
442 (dbus (string-append out "/etc/dbus-1/system.d/"))
faa29e4b 443 (bin (string-append out "/bin"))
444 (services (string-append out "/share/services"))
445 (applications (string-append out "/share/applications"))
446 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
447 (man (string-append out "/share/man/man1"))
448 (lib (string-append out "/lib/mumble")))
449 (install-file "release/mumble" bin)
450 (install-file "scripts/mumble-overlay" bin)
451 (install-file "scripts/mumble.protocol" services)
452 (install-file "scripts/mumble.desktop" applications)
453 (install-file "icons/mumble.svg" icons)
454 (install-file "man/mumble-overlay.1" man)
455 (install-file "man/mumble.1" man)
bd9f8869 456 (install-file "release/murmurd" bin)
457 (install-file "scripts/murmur.ini.system" etc)
458 (rename-file (string-append etc "/murmur.ini.system")
459 (string-append etc "/murmur.ini"))
460 (install-file "scripts/murmur.conf" dbus)
461 (install-file "man/murmurd.1" man)
faa29e4b 462 (for-each (lambda (file) (install-file file lib))
463 (find-files "." "\\.so\\."))
464 (for-each (lambda (file) (install-file file lib))
465 (find-files "release/plugins" "\\.so$"))))))))
466 (inputs
467 `(("avahi" ,avahi)
7373eb83 468 ("protobuf" ,protobuf-3.5)
faa29e4b 469 ("openssl" ,openssl)
470 ("libsndfile" ,libsndfile)
471 ("boost" ,boost)
472 ("opus" ,opus)
473 ("speex" ,speex)
b5a1359d 474 ("speexdsp" ,speexdsp)
faa29e4b 475 ("speech-dispatcher" ,speech-dispatcher)
476 ("libx11" ,libx11)
477 ("libxi" ,libxi)
478 ("qt-4" ,qt-4)
479 ("alsa-lib" ,alsa-lib)
480 ("pulseaudio" ,pulseaudio)))
481 (native-inputs
482 `(("pkg-config" ,pkg-config)))
483 (synopsis "Low-latency, high quality voice chat software")
484 (description
485 "Mumble is an low-latency, high quality voice chat
bd9f8869 486software primarily intended for use while gaming.
487Mumble consists of two applications for separate usage:
488@code{mumble} for the client, and @code{murmur} for the server.")
faa29e4b 489 (home-page "https://wiki.mumble.info/wiki/Main_Page")
490 (license (list license:bsd-3
491 ;; The bundled celt is bsd-2. Remove after 1.3.0.
492 license:bsd-2))))
b61cb244
JL
493
494(define-public twinkle
b61cb244 495 (package
f1371daa
JL
496 (name "twinkle")
497 (version "1.10.2")
498 (source (origin
499 (method git-fetch)
500 (uri (git-reference
501 (url "https://github.com/LubosD/twinkle")
502 (commit (string-append "v" version))))
503 (file-name (git-file-name name version))
504 (sha256
505 (base32
506 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
507 (build-system cmake-build-system)
508 (arguments
509 `(#:tests? #f ; no test target
510 #:configure-flags '("-DWITH_SPEEX=On")
511 #:phases
512 (modify-phases %standard-phases
b61cb244
JL
513 (add-after 'install 'wrap-executable
514 (lambda* (#:key inputs outputs #:allow-other-keys)
515 (let ((out (assoc-ref outputs "out")))
516 (wrap-program (string-append out "/bin/twinkle")
517 `("QT_PLUGIN_PATH" ":" prefix
518 ,(map (lambda (label)
519 (string-append (assoc-ref inputs label)
520 "/lib/qt5/plugins"))
521 '("qtbase" "qtdeclarative")))
522 `("QML2_IMPORT_PATH" ":" prefix
523 ,(map (lambda (label)
524 (string-append (assoc-ref inputs label)
525 "/lib/qt5/qml"))
526 '("qtdeclarative" "qtquickcontrols"))))
527 #t))))))
f1371daa
JL
528 (native-inputs
529 `(("bison" ,bison)
530 ("flex" ,flex)
531 ("readline" ,readline)
532 ("file" ,file)
533 ("ucommon" ,ucommon)
534 ("ccrtp" ,ccrtp)
535 ("libxml2" ,libxml2)
536 ("speex" ,speex)
537 ("speexdsp" ,speexdsp)
538 ("libsndfile" ,libsndfile)
539 ("alsa-lib" ,alsa-lib)
540 ("qttools" ,qttools)))
541 (inputs
542 `(("qtbase" ,qtbase)
543 ("qtdeclarative" ,qtdeclarative)
544 ("qtquickcontrols" ,qtquickcontrols)))
545 (home-page "http://twinkle.dolezel.info/")
546 (synopsis "Softphone for voice over IP and instant messaging")
547 (description "Twinkle is a softphone for your voice over IP and instant
b61cb244
JL
548messaging communcations using the SIP protocol. You can use it for direct IP
549phone to IP phone communication or in a network using a SIP proxy to route your
550calls and messages")
f1371daa 551 (license license:gpl2+)))
bd4b6f41
PN
552
553(define-public pjproject
554 (package
555 (name "pjproject")
5dc8cad5 556 (version "2.9")
bd4b6f41
PN
557 (source
558 (origin
5dc8cad5
PN
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://github.com/pjsip/pjproject.git")
562 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
bd4b6f41
PN
563 (modules '((guix build utils)))
564 (snippet
565 '(begin
566 (let ((third-party-directories
5dc8cad5
PN
567 ;; Things we don't need:
568 ;; BaseClasses - contains libraries from Windows SDK
569 ;; we don't need it, at least not now.
570 (list "BaseClasses" "g7221" "ilbc" "milenage"
571 "speex" "threademulation" "yuv" "bdsound"
572 "gsm" "mp3" "resample" "srtp" "webrtc"
bd4b6f41
PN
573 ;; Keep only resample, build and README.txt.
574 "build/baseclasses" "build/g7221" "build/gsm"
5dc8cad5
PN
575 "build/ilbc" "build/milenage" "build/resample"
576 "build/samplerate" "build/speex" "build/srtp"
577 "build/webrtc" "build/yuv")))
bd4b6f41 578 ;; Keep only Makefiles related to resample.
5dc8cad5 579 (for-each (lambda (directory)
bd4b6f41 580 (delete-file-recursively
5dc8cad5 581 (string-append "third_party/" directory)))
bd4b6f41
PN
582 third-party-directories)
583 #t)
584 (let ((third-party-dirs
585 (list "gsm" "ilbc" "speex" "g7221" "srtp"
586 "portaudio" "resample")))
587 (for-each
588 (lambda (dirs)
589 (substitute* "third_party/build/os-linux.mak"
590 (((string-append "DIRS += " dirs)) "")))
591 third-party-dirs))))
5dc8cad5 592 (file-name (git-file-name name version))
bd4b6f41
PN
593 (sha256
594 (base32
5dc8cad5 595 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
bd4b6f41
PN
596 (build-system gnu-build-system)
597 (inputs
598 `(("portaudio" ,portaudio)))
599 (propagated-inputs
600 ;; These packages are referenced in the Libs field of the pkg-config
601 ;; file that will be installed by pjproject.
602 `(("speex" ,speex)
603 ("libsrtp" ,libsrtp)
604 ("gnutls" ,gnutls)
5dc8cad5 605 ("resample", resample)
bd4b6f41
PN
606 ("util-linux" ,util-linux)))
607 (native-inputs
608 `(("autoconf" ,autoconf)
609 ("automake" ,automake)
610 ("pkg-config" ,pkg-config)
611 ("libtool" ,libtool)))
612 (arguments
613 `(;; FIXME make: No rule to make target
614 ;; 'pjlib-test-unknown-[something]-gnu'.
615 #:tests? #f
616 ;; #:test-target "selftest"
617 #:phases
618 (modify-phases %standard-phases
619 (add-before 'build 'build-dep
620 (lambda _ (invoke "make" "dep")))
621 (add-before 'patch-source-shebangs 'autoconf
622 (lambda _
5dc8cad5 623 (invoke "autoconf" "-v" "-f" "-i" "-o"
bd4b6f41
PN
624 "aconfigure" "aconfigure.ac")))
625 (add-before 'autoconf 'disable-some-tests
626 ;; Three of the six test programs fail due to missing network
627 ;; access.
628 (lambda _
629 (substitute* "Makefile"
630 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
631 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
632 #t)))))
633 (home-page "https://www.pjsip.org")
634 (synopsis "Session Initiation Protocol (SIP) stack")
635 (description "PJProject provides an implementation of the Session
636Initiation Protocol (SIP) and a multimedia framework.")
637 (license license:gpl2+)))
915829e6 638
de65f3f1 639(define %jami-version "20191101.3.67671e7")
915829e6
PN
640
641(define* (jami-source #:key without-daemon)
642 (origin
643 (method url-fetch)
de65f3f1 644 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
915829e6
PN
645 %jami-version
646 ".tar.gz"))
647 (modules '((guix build utils)))
648 (snippet
649 (if without-daemon
650 '(begin
651 (delete-file-recursively "daemon/contrib"))
652 #f))
653 (sha256
654 (base32
de65f3f1 655 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
915829e6
PN
656
657(define-public pjproject-jami
658 (package
659 (inherit pjproject)
660 (name "pjproject-jami")
661 (native-inputs
662 `(("savoir-faire-linux-patches" ,(jami-source))
663 ,@(package-native-inputs pjproject)))
664 (arguments
665 `(#:tests? #f
666 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
667 #:configure-flags
668 (list "--disable-oss"
669 "--disable-sound"
670 "--disable-video"
671 "--enable-ext-sound"
672 "--disable-speex-aec"
673 "--disable-g711-codec"
674 "--disable-l16-codec"
675 "--disable-gsm-codec"
676 "--disable-g722-codec"
677 "--disable-g7221-codec"
678 "--disable-speex-codec"
679 "--disable-ilbc-codec"
680 "--disable-opencore-amr"
681 "--disable-silk"
682 "--disable-sdl"
683 "--disable-ffmpeg"
684 "--disable-v4l2"
685 "--disable-openh264"
686 "--disable-resample"
687 "--disable-libwebrtc"
688 ;; "-fPIC" is required for libring. Bug?
689 "CFLAGS=-fPIC -DPJ_ENABLE_EXTRA_CHECK=1 -DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=1024 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000 -DPJ_ICE_ST_MAX_CAND=32"
690 "CXXFLAGS=-fPIC -DPJ_ENABLE_EXTRA_CHECK=1 -DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=1024 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000 -DPJ_ICE_ST_MAX_CAND=32"
691 ;; Now deviating from the rules.mak file.
692 "--enable-ssl=gnutls"
693 "--with-external-srtp")
694 #:phases
695 (modify-phases %standard-phases
696 (add-after 'unpack 'apply-patches
697 (lambda* (#:key inputs #:allow-other-keys)
698 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
699 ;; Comes from
700 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
701 ;; WARNING: These amount for huge changes in pjproject.
915829e6
PN
702 (savoir-faire-linux-patches
703 '("gnutls"
704 "rfc2466"
705 "ipv6"
706 "ice_config"
707 "multiple_listeners"
708 "pj_ice_sess"
709 "fix_turn_fallback"
710 "fix_ioqueue_ipv6_sendto"
711 "add_dtls_transport"
712 "rfc6062")))
713 (mkdir-p savoir-faire-linux-patches-directory)
714 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
715 "-C" savoir-faire-linux-patches-directory "--strip-components=5" "ring-project/daemon/contrib/src/pjproject")
716 (for-each
717 (lambda (file)
718 (invoke "patch" "--force" "-p1" "-i"
719 (string-append savoir-faire-linux-patches-directory "/"
720 file ".patch")))
721 savoir-faire-linux-patches))
722 #t))
723 ;; TODO: We could use substitute-keyword-arguments instead of
724 ;; repeating the phases from pjproject, but somehow it does
725 ;; not work.
726 (add-before 'build 'build-dep
727 (lambda _ (invoke "make" "dep")))
728 (add-before 'patch-source-shebangs 'autoconf
729 (lambda _
730 (invoke "autoconf" "-v" "-f" "-i" "-o"
731 "aconfigure" "aconfigure.ac")))
732 (add-before 'autoconf 'disable-some-tests
733 ;; Three of the six test programs fail due to missing network
734 ;; access.
735 (lambda _
736 (substitute* "Makefile"
737 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
738 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
739 #t)))))))
1bfcb19b
PN
740
741(define-public libring
742 (package
743 (name "libring")
744 (version %jami-version)
745 (source (jami-source #:without-daemon #t))
746 (build-system gnu-build-system)
747 (inputs
748 ;; Missing (optional?) dep: libnatpmp.
749 `(("alsa-lib" ,alsa-lib)
750 ("boost" ,boost)
751 ("dbus-c++" ,dbus-c++)
752 ("eudev" ,eudev)
753 ("ffmpeg" ,ffmpeg)
754 ("flac" ,flac)
755 ("gmp" ,gmp)
756 ("gsm" ,gsm)
757 ("jack" ,jack-1)
758 ("jsoncpp" ,jsoncpp)
759 ("libogg" ,libogg)
760 ("libva" ,libva)
761 ("opendht" ,opendht)
762 ("opus" ,opus)
763 ("pcre" ,pcre)
764 ("pulseaudio" ,pulseaudio)
765 ("libsamplerate" ,libsamplerate)
766 ("libsndfile" ,libsndfile)
767 ("speex" ,speex)
768 ("speexdsp" ,speexdsp)
769 ("libupnp" ,libupnp)
770 ("libvorbis" ,libvorbis)
771 ("libx264" ,libx264)
772 ("libvdpau" ,libvdpau)
773 ("yaml-cpp" ,yaml-cpp)
774 ("zlib" ,zlib)
775 ("openssl" ,openssl)
776 ("libsecp256k1" ,libsecp256k1)
777 ("python" ,python)
778 ("python-wrapper" ,python-wrapper)
779 ("restbed" ,restbed)
780 ("libx11" ,libx11)
781 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
782 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
783 ("pjproject" ,pjproject-jami)))
784 (native-inputs
785 `(("autoconf" ,autoconf)
786 ("automake" ,automake)
787 ("libtool" ,libtool)
788 ("pkg-config" ,pkg-config)
789 ("which" ,which)
790 ("cppunit" ,cppunit)
791 ("perl" ,perl))) ; Needed for documentation.
792 (arguments
793 `(#:tests? #f ; The tests fail to compile due to missing headers.
794 #:phases
795 (modify-phases %standard-phases
796 (add-after 'unpack 'change-directory
797 (lambda _
798 (chdir "daemon")
799 #t))
800 (add-before 'build 'add-lib-dir
801 (lambda _
802 (mkdir-p "src/lib")
803 #t)))))
804 (synopsis "Distributed multimedia communications platform")
805 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
806video and chat communication platform that requires no centralized server and
807leaves the power of privacy in the hands of the user. It supports the SIP and
808IAX protocols, as well as decentralized calling using P2P-DHT.
809
810This package provides a library and daemon implementing the Jami core
811functionality.")
812 (home-page "https://jami.net/")
813 (license license:gpl3+)))
b6309672
PN
814
815(define-public libringclient
816 (package
817 (inherit libring)
818 (name "libringclient")
819 (build-system cmake-build-system)
820 (propagated-inputs
821 `(("libring" ,libring) ; For 'dring'.
822 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
823 ("qttools" ,qttools)))
824 (arguments
825 `(#:tests? #f ; There is no testsuite.
826 #:configure-flags
827 (list (string-append "-DRING_BUILD_DIR="
828 (assoc-ref %build-inputs "libring") "/include"))
829 #:phases
830 (modify-phases %standard-phases
831 (add-after 'unpack 'change-directory
832 (lambda _
833 (chdir "lrc")
834 #t))
835 (add-before 'configure 'fix-dbus-interfaces-path
836 (lambda* (#:key inputs #:allow-other-keys)
837 (substitute* "CMakeLists.txt"
838 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
839 (string-append (assoc-ref inputs "libring")
840 dbus-interfaces-path-suffix))))))))
841 (synopsis "Distributed multimedia communications platform")
842 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
843video and chat communication platform that requires no centralized server and
844leaves the power of privacy in the hands of the user. It supports the SIP and
845IAX protocols, as well as decentralized calling using P2P-DHT.
846
847This package provides a library common to all Jami clients.")
848 (home-page "https://jami.net")
849 (license license:gpl3+)))
c771b799 850
422e187f 851(define-public jami
c771b799
PN
852 (package
853 (inherit libring)
422e187f 854 (name "jami")
c771b799
PN
855 (build-system cmake-build-system)
856 (inputs
857 `(("libringclient" ,libringclient)
858 ("gtk+" ,gtk+)
859 ("qrencode" ,qrencode)
860 ("libnotify" ,libnotify)
861 ("clutter" ,clutter)
862 ("clutter-gtk" ,clutter-gtk)
863 ("gettext" ,gnu-gettext)
864 ("libcanberra" ,libcanberra)
865 ("webkitgtk" ,webkitgtk)
866 ;; TODO: We must wrap ring-client-gnome to force using the
867 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
868 ;; fails with:
869 ;;
870 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
871 ;; undefined symbol: sqlite3_column_table_name16
872 ;;
873 ;; qtbase is built against sqlite-with-column-metadata but somehow
874 ;; jami-client-gnome ends up with both `sqlite' and
875 ;; `sqlite-with-column-metadata' as inputs and it seems that
876 ;; libqsqlite.so gets confused.
877 ("sqlite" ,sqlite-with-column-metadata)))
878 (native-inputs
879 `(("pkg-config" ,pkg-config)
880 ("glib:bin" ,glib "bin")
881 ("doxygen" ,doxygen)))
882 (propagated-inputs
883 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
884 ("adwaita-icon-theme" ,adwaita-icon-theme)
885 ("evolution-data-server" ,evolution-data-server)))
886 (arguments
887 `(#:tests? #f ; There is no testsuite.
888 #:phases
889 (modify-phases %standard-phases
890 (add-after 'unpack 'change-directory
891 (lambda _
892 (chdir "client-gnome")
893 #t))
894 (add-after 'install 'wrap
895 (lambda* (#:key inputs outputs #:allow-other-keys)
896 (let* ((out (assoc-ref outputs "out"))
897 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
898 (wrap-program (string-append out "/bin/gnome-ring")
899 `("LD_LIBRARY_PATH" ":" prefix (,path))))
900 #t)))))
901 (synopsis "Distributed multimedia communications platform")
902 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
903video and chat communication platform that requires no centralized server and
904leaves the power of privacy in the hands of the user. It supports the SIP and
905IAX protocols, as well as decentralized calling using P2P-DHT.
906
907This package provides the Jami client for the GNOME desktop.")
908 (home-page "https://jami.net")
909 (license license:gpl3+)))
422e187f
LC
910
911(define-public jami-client-gnome
912 (deprecated-package "jami-client-gnome" jami))