gnu: tbb: Add a source file name.
[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
b0c7e053
TGR
246 (method url-fetch)
247 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
3c9e35cc 248 version ".tar.gz"))
b0c7e053
TGR
249 (file-name (string-append name "-" version ".tar.gz"))
250 (sha256
251 (base32
f04152ef 252 "02x5l5h2nq6f9gq1bmgz5v9jmnqaab51p8aldglng1z7pjbp9za4"))))
3c9e35cc 253 (native-inputs
b0c7e053 254 `(("psmisc" ,psmisc) ;some tests require 'killall'
340f9b9f 255 ("procps" ,procps)))
3c9e35cc
DH
256 (build-system gnu-build-system)
257 (arguments
f04152ef 258 '(#:test-target "runtest"))
3c9e35cc 259 (synopsis "Secure RTP (SRTP) Reference Implementation")
6c0b0887
TGR
260 (description
261 "This package provides an implementation of the Secure Real-time Transport
262Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
263supporting cryptographic kernel.")
3c9e35cc 264 (home-page "https://github.com/cisco/libsrtp")
974aaf71 265 (license license:bsd-3)))
4ff20605 266
80e2524c
RW
267(define-public bctoolbox
268 (package
269 (name "bctoolbox")
270 (version "0.2.0")
271 (source (origin
272 (method url-fetch)
273 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
274 version ".tar.gz"))
275 (sha256
276 (base32
277 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
278 (build-system gnu-build-system)
279 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
280 (native-inputs
281 `(("cunit" ,cunit)))
282 (inputs
283 `(("mbedtls" ,mbedtls-apache)))
284 (home-page "https://www.linphone.org")
285 (synopsis "Utilities library for linphone software")
286 (description "BCtoolbox is a utilities library used by Belledonne
287Communications softwares like linphone.")
288 (license license:gpl2+)))
289
0c45a6a4
RW
290(define-public ortp
291 (package
292 (name "ortp")
293 (version "0.27.0")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append "https://download.savannah.nongnu.org/"
297 "releases/linphone/ortp/sources/ortp-"
298 version ".tar.gz"))
299 (sha256
300 (base32
301 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
302 (build-system gnu-build-system)
303 (inputs
304 `(("bctoolbox" ,bctoolbox)))
305 (native-inputs
306 `(("pkg-config" ,pkg-config)))
307 (home-page "https://linphone.org/")
308 (synopsis "Implementation of the Real-time transport protocol")
309 (description "oRTP is a library implementing the Real-time transport
310protocol (RFC 3550).")
311 (license license:lgpl2.1+)))
312
4ff20605
LG
313(define-public libiax2
314 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
315 ;; This is the commit used by the Ring Project.
316 (package
317 (name "libiax2")
318 (version (string-append "0.0.0-1." (string-take commit 7)))
319 (source
320 (origin
cd1f661e
RW
321 (method git-fetch)
322 (uri (git-reference
323 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
324 (commit commit)))
325 (file-name (git-file-name name version))
4ff20605
LG
326 (sha256
327 (base32
cd1f661e 328 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
4ff20605
LG
329 (build-system gnu-build-system)
330 (native-inputs
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool)))
4ff20605
LG
334 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
335 (synopsis "Inter-Asterisk-Protocol library")
336 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
337Voice-over-IP (VoIP) communications.")
338 ;; The file 'src/md5.c' is released into the public domain by RSA Data
339 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
340 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
341 ;; covered under the 'GPL'.
342 ;; The package as a whole is distributed under the LGPL 2.0.
974aaf71
LG
343 (license (list license:lgpl2.0
344 license:public-domain
345 license:gpl2+)))))
319ac02b
FF
346
347(define-public seren
348 (package
349 (name "seren")
350 (version "0.0.21")
351 (source (origin
352 (method url-fetch)
353 (uri (string-append "http://holdenc.altervista.org/"
354 "seren/downloads/seren-" version
355 ".tar.gz"))
356 (sha256
357 (base32
358 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
359 (build-system gnu-build-system)
360 (arguments '(#:tests? #f)) ; no "check" target
361 (inputs
362 `(("alsa-lib" ,alsa-lib)
363 ("gmp" ,gmp)
364 ("libogg" ,libogg)
365 ("ncurses" ,ncurses)
366 ("opus" ,opus)))
367 (synopsis "Simple VoIP program to create conferences from the terminal")
368 (description
369 "Seren is a simple VoIP program based on the Opus codec that allows you
370to create a voice conference from the terminal, with up to 10 participants,
371without having to register accounts, exchange emails, or add people to contact
372lists. All you need to join an existing conference is the host name or IP
373address of one of the participants.")
374 (home-page "http://holdenc.altervista.org/seren/")
974aaf71 375 (license license:gpl3+)))
faa29e4b 376
377(define-public mumble
378 (package
379 (name "mumble")
69ec0391 380 (version "1.2.19")
faa29e4b 381 (source (origin
382 (method url-fetch)
383 (uri (string-append "https://mumble.info/snapshot/"
384 name "-" version ".tar.gz"))
385 (sha256
386 (base32
69ec0391 387 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
fc51c11b 388 (patches (search-patches "mumble-1.2.19-abs.patch"))
faa29e4b 389 (modules '((guix build utils)))
390 (snippet
391 `(begin
392 ;; Remove bundled software.
393 (for-each delete-file-recursively '("3rdparty"
394 "speex"
395 "speexbuild"
396 "opus-build"
397 "opus-src"
398 "sbcelt-helper-build"
399 "sbcelt-lib-build"
400 "sbcelt-src"))
401 ;; TODO: Celt is still bundled. It has been merged into Opus
402 ;; and will be removed after 1.3.0.
403 ;; https://github.com/mumble-voip/mumble/issues/1999
404 #t))))
405 (build-system gnu-build-system)
406 (arguments
407 `(#:tests? #f ; no "check" target
408 #:phases
409 (modify-phases %standard-phases
410 (replace 'configure
411 (lambda* (#:key outputs #:allow-other-keys)
7616d75f
TGR
412 (invoke "qmake" "main.pro" "-recursive"
413 (string-append "CONFIG+="
414 (string-join
415 (list "no-update"
416 "no-ice"
417 "no-embed-qt-translations"
418 "no-bundled-speex"
419 "pch"
420 "no-bundled-opus"
421 "no-celt"
422 "no-alsa"
423 "no-oss"
424 "no-portaudio"
425 "speechd"
426 "no-g15"
427 "no-bonjour"
428 "release")))
429 (string-append "DEFINES+="
430 "PLUGIN_PATH="
431 (assoc-ref outputs "out")
432 "/lib/mumble"))))
faa29e4b 433 (add-before 'configure 'fix-libspeechd-include
434 (lambda _
435 (substitute* "src/mumble/TextToSpeech_unix.cpp"
436 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
437 (replace 'install ; install phase does not exist
438 (lambda* (#:key inputs outputs #:allow-other-keys)
439 (let* ((out (assoc-ref outputs "out"))
bd9f8869 440 (etc (string-append out "/etc/murmur"))
441 (dbus (string-append out "/etc/dbus-1/system.d/"))
faa29e4b 442 (bin (string-append out "/bin"))
443 (services (string-append out "/share/services"))
444 (applications (string-append out "/share/applications"))
445 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
446 (man (string-append out "/share/man/man1"))
447 (lib (string-append out "/lib/mumble")))
448 (install-file "release/mumble" bin)
449 (install-file "scripts/mumble-overlay" bin)
450 (install-file "scripts/mumble.protocol" services)
451 (install-file "scripts/mumble.desktop" applications)
452 (install-file "icons/mumble.svg" icons)
453 (install-file "man/mumble-overlay.1" man)
454 (install-file "man/mumble.1" man)
bd9f8869 455 (install-file "release/murmurd" bin)
456 (install-file "scripts/murmur.ini.system" etc)
457 (rename-file (string-append etc "/murmur.ini.system")
458 (string-append etc "/murmur.ini"))
459 (install-file "scripts/murmur.conf" dbus)
460 (install-file "man/murmurd.1" man)
faa29e4b 461 (for-each (lambda (file) (install-file file lib))
462 (find-files "." "\\.so\\."))
463 (for-each (lambda (file) (install-file file lib))
464 (find-files "release/plugins" "\\.so$"))))))))
465 (inputs
466 `(("avahi" ,avahi)
467 ("protobuf" ,protobuf)
468 ("openssl" ,openssl)
469 ("libsndfile" ,libsndfile)
470 ("boost" ,boost)
471 ("opus" ,opus)
472 ("speex" ,speex)
b5a1359d 473 ("speexdsp" ,speexdsp)
faa29e4b 474 ("speech-dispatcher" ,speech-dispatcher)
475 ("libx11" ,libx11)
476 ("libxi" ,libxi)
477 ("qt-4" ,qt-4)
478 ("alsa-lib" ,alsa-lib)
479 ("pulseaudio" ,pulseaudio)))
480 (native-inputs
481 `(("pkg-config" ,pkg-config)))
482 (synopsis "Low-latency, high quality voice chat software")
483 (description
484 "Mumble is an low-latency, high quality voice chat
bd9f8869 485software primarily intended for use while gaming.
486Mumble consists of two applications for separate usage:
487@code{mumble} for the client, and @code{murmur} for the server.")
faa29e4b 488 (home-page "https://wiki.mumble.info/wiki/Main_Page")
489 (license (list license:bsd-3
490 ;; The bundled celt is bsd-2. Remove after 1.3.0.
491 license:bsd-2))))
b61cb244
JL
492
493(define-public twinkle
494 (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f")
495 (revision "1"))
496 (package
497 (name "twinkle")
498 (version (git-version "1.10.1" revision commit))
499 (source (origin
500 (method git-fetch)
501 (uri (git-reference
502 (url "https://github.com/LubosD/twinkle")
503 (commit commit)))
4fa33594
JL
504 (patches
505 (search-patches "twinkle-include-qregexpvalidator.patch"))
b61cb244
JL
506 (file-name (git-file-name name version))
507 (sha256
508 (base32
509 "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z"))))
510 (build-system cmake-build-system)
511 (arguments
512 `(#:tests? #f ; no test target
81dec596 513 #:configure-flags '("-DWITH_SPEEX=On")
b61cb244
JL
514 #:phases
515 (modify-phases %standard-phases
516 (add-after 'install 'wrap-executable
517 (lambda* (#:key inputs outputs #:allow-other-keys)
518 (let ((out (assoc-ref outputs "out")))
519 (wrap-program (string-append out "/bin/twinkle")
520 `("QT_PLUGIN_PATH" ":" prefix
521 ,(map (lambda (label)
522 (string-append (assoc-ref inputs label)
523 "/lib/qt5/plugins"))
524 '("qtbase" "qtdeclarative")))
525 `("QML2_IMPORT_PATH" ":" prefix
526 ,(map (lambda (label)
527 (string-append (assoc-ref inputs label)
528 "/lib/qt5/qml"))
529 '("qtdeclarative" "qtquickcontrols"))))
530 #t))))))
531 (native-inputs
532 `(("bison" ,bison)
533 ("flex" ,flex)
534 ("readline" ,readline)
535 ("file" ,file)
536 ("ucommon" ,ucommon)
537 ("ccrtp" ,ccrtp)
538 ("libxml2" ,libxml2)
539 ("speex" ,speex)
540 ("speexdsp" ,speexdsp)
541 ("libsndfile" ,libsndfile)
542 ("alsa-lib" ,alsa-lib)
543 ("qttools" ,qttools)))
544 (inputs
545 `(("qtbase" ,qtbase)
546 ("qtdeclarative" ,qtdeclarative)
547 ("qtquickcontrols" ,qtquickcontrols)))
548 (home-page "http://twinkle.dolezel.info/")
549 (synopsis "Softphone for voice over IP and instant messaging")
550 (description "Twinkle is a softphone for your voice over IP and instant
551messaging communcations using the SIP protocol. You can use it for direct IP
552phone to IP phone communication or in a network using a SIP proxy to route your
553calls and messages")
554 (license license:gpl2+))))
bd4b6f41
PN
555
556(define-public pjproject
557 (package
558 (name "pjproject")
559 (version "2.7.2")
560 (source
561 (origin
562 (method url-fetch)
563 (uri (string-append
564 "http://www.pjsip.org/release/" ;
565 version "/" name "-" version ".tar.bz2"))
566 (modules '((guix build utils)))
567 (snippet
568 '(begin
569 (let ((third-party-directories
570 (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
571 "ilbc" "lib" "milenage" "mp3" "speex" "srtp"
572 "resample"
573 ;; Keep only resample, build and README.txt.
574 "build/baseclasses" "build/g7221" "build/gsm"
575 "build/ilbc" "build/milenage" "build/samplerate"
576 "build/speex" "build/srtp"
577 "build/resample" "build/yuv")))
578 ;; Keep only Makefiles related to resample.
579 (for-each (lambda (file)
580 (delete-file-recursively
581 (string-append "third_party/" file)))
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))))
592 (sha256
593 (base32
594 "0wiph6g51wanzwjjrpwsz63amgvly8g08jz033gnwqmppa584b4w"))))
595 (build-system gnu-build-system)
596 (inputs
597 `(("portaudio" ,portaudio)))
598 (propagated-inputs
599 ;; These packages are referenced in the Libs field of the pkg-config
600 ;; file that will be installed by pjproject.
601 `(("speex" ,speex)
602 ("libsrtp" ,libsrtp)
603 ("gnutls" ,gnutls)
604 ("util-linux" ,util-linux)))
605 (native-inputs
606 `(("autoconf" ,autoconf)
607 ("automake" ,automake)
608 ("pkg-config" ,pkg-config)
609 ("libtool" ,libtool)))
610 (arguments
611 `(;; FIXME make: No rule to make target
612 ;; 'pjlib-test-unknown-[something]-gnu'.
613 #:tests? #f
614 ;; #:test-target "selftest"
615 #:phases
616 (modify-phases %standard-phases
617 (add-before 'build 'build-dep
618 (lambda _ (invoke "make" "dep")))
619 (add-before 'patch-source-shebangs 'autoconf
620 (lambda _
621 (invoke "autoconf" "-vfi" "-o"
622 "aconfigure" "aconfigure.ac")))
623 (add-before 'autoconf 'disable-some-tests
624 ;; Three of the six test programs fail due to missing network
625 ;; access.
626 (lambda _
627 (substitute* "Makefile"
628 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
629 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
630 #t)))))
631 (home-page "https://www.pjsip.org")
632 (synopsis "Session Initiation Protocol (SIP) stack")
633 (description "PJProject provides an implementation of the Session
634Initiation Protocol (SIP) and a multimedia framework.")
635 (license license:gpl2+)))
915829e6
PN
636
637(define %jami-version "20190319.4.a16a99f")
638
639(define* (jami-source #:key without-daemon)
640 (origin
641 (method url-fetch)
642 (uri (string-append "http://dl.jami.net/ring-release/tarballs/ring_"
643 %jami-version
644 ".tar.gz"))
645 (modules '((guix build utils)))
646 (snippet
647 (if without-daemon
648 '(begin
649 (delete-file-recursively "daemon/contrib"))
650 #f))
651 (sha256
652 (base32
653 "1c6n6sm7skw83v25g33g4jzbragz9j4przbzaz7asxw54jy33dwl"))))
654
655(define-public pjproject-jami
656 (package
657 (inherit pjproject)
658 (name "pjproject-jami")
659 (native-inputs
660 `(("savoir-faire-linux-patches" ,(jami-source))
661 ,@(package-native-inputs pjproject)))
662 (arguments
663 `(#:tests? #f
664 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
665 #:configure-flags
666 (list "--disable-oss"
667 "--disable-sound"
668 "--disable-video"
669 "--enable-ext-sound"
670 "--disable-speex-aec"
671 "--disable-g711-codec"
672 "--disable-l16-codec"
673 "--disable-gsm-codec"
674 "--disable-g722-codec"
675 "--disable-g7221-codec"
676 "--disable-speex-codec"
677 "--disable-ilbc-codec"
678 "--disable-opencore-amr"
679 "--disable-silk"
680 "--disable-sdl"
681 "--disable-ffmpeg"
682 "--disable-v4l2"
683 "--disable-openh264"
684 "--disable-resample"
685 "--disable-libwebrtc"
686 ;; "-fPIC" is required for libring. Bug?
687 "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"
688 "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"
689 ;; Now deviating from the rules.mak file.
690 "--enable-ssl=gnutls"
691 "--with-external-srtp")
692 #:phases
693 (modify-phases %standard-phases
694 (add-after 'unpack 'apply-patches
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
697 ;; Comes from
698 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
699 ;; WARNING: These amount for huge changes in pjproject.
700 ;; Particularly, they add support for GnuTLS.
701 (savoir-faire-linux-patches
702 '("gnutls"
703 "rfc2466"
704 "ipv6"
705 "ice_config"
706 "multiple_listeners"
707 "pj_ice_sess"
708 "fix_turn_fallback"
709 "fix_ioqueue_ipv6_sendto"
710 "add_dtls_transport"
711 "rfc6062")))
712 (mkdir-p savoir-faire-linux-patches-directory)
713 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
714 "-C" savoir-faire-linux-patches-directory "--strip-components=5" "ring-project/daemon/contrib/src/pjproject")
715 (for-each
716 (lambda (file)
717 (invoke "patch" "--force" "-p1" "-i"
718 (string-append savoir-faire-linux-patches-directory "/"
719 file ".patch")))
720 savoir-faire-linux-patches))
721 #t))
722 ;; TODO: We could use substitute-keyword-arguments instead of
723 ;; repeating the phases from pjproject, but somehow it does
724 ;; not work.
725 (add-before 'build 'build-dep
726 (lambda _ (invoke "make" "dep")))
727 (add-before 'patch-source-shebangs 'autoconf
728 (lambda _
729 (invoke "autoconf" "-v" "-f" "-i" "-o"
730 "aconfigure" "aconfigure.ac")))
731 (add-before 'autoconf 'disable-some-tests
732 ;; Three of the six test programs fail due to missing network
733 ;; access.
734 (lambda _
735 (substitute* "Makefile"
736 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
737 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
738 #t)))))))
1bfcb19b
PN
739
740(define-public libring
741 (package
742 (name "libring")
743 (version %jami-version)
744 (source (jami-source #:without-daemon #t))
745 (build-system gnu-build-system)
746 (inputs
747 ;; Missing (optional?) dep: libnatpmp.
748 `(("alsa-lib" ,alsa-lib)
749 ("boost" ,boost)
750 ("dbus-c++" ,dbus-c++)
751 ("eudev" ,eudev)
752 ("ffmpeg" ,ffmpeg)
753 ("flac" ,flac)
754 ("gmp" ,gmp)
755 ("gsm" ,gsm)
756 ("jack" ,jack-1)
757 ("jsoncpp" ,jsoncpp)
758 ("libogg" ,libogg)
759 ("libva" ,libva)
760 ("opendht" ,opendht)
761 ("opus" ,opus)
762 ("pcre" ,pcre)
763 ("pulseaudio" ,pulseaudio)
764 ("libsamplerate" ,libsamplerate)
765 ("libsndfile" ,libsndfile)
766 ("speex" ,speex)
767 ("speexdsp" ,speexdsp)
768 ("libupnp" ,libupnp)
769 ("libvorbis" ,libvorbis)
770 ("libx264" ,libx264)
771 ("libvdpau" ,libvdpau)
772 ("yaml-cpp" ,yaml-cpp)
773 ("zlib" ,zlib)
774 ("openssl" ,openssl)
775 ("libsecp256k1" ,libsecp256k1)
776 ("python" ,python)
777 ("python-wrapper" ,python-wrapper)
778 ("restbed" ,restbed)
779 ("libx11" ,libx11)
780 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
781 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
782 ("pjproject" ,pjproject-jami)))
783 (native-inputs
784 `(("autoconf" ,autoconf)
785 ("automake" ,automake)
786 ("libtool" ,libtool)
787 ("pkg-config" ,pkg-config)
788 ("which" ,which)
789 ("cppunit" ,cppunit)
790 ("perl" ,perl))) ; Needed for documentation.
791 (arguments
792 `(#:tests? #f ; The tests fail to compile due to missing headers.
793 #:phases
794 (modify-phases %standard-phases
795 (add-after 'unpack 'change-directory
796 (lambda _
797 (chdir "daemon")
798 #t))
799 (add-before 'build 'add-lib-dir
800 (lambda _
801 (mkdir-p "src/lib")
802 #t)))))
803 (synopsis "Distributed multimedia communications platform")
804 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
805video and chat communication platform that requires no centralized server and
806leaves the power of privacy in the hands of the user. It supports the SIP and
807IAX protocols, as well as decentralized calling using P2P-DHT.
808
809This package provides a library and daemon implementing the Jami core
810functionality.")
811 (home-page "https://jami.net/")
812 (license license:gpl3+)))
b6309672
PN
813
814(define-public libringclient
815 (package
816 (inherit libring)
817 (name "libringclient")
818 (build-system cmake-build-system)
819 (propagated-inputs
820 `(("libring" ,libring) ; For 'dring'.
821 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
822 ("qttools" ,qttools)))
823 (arguments
824 `(#:tests? #f ; There is no testsuite.
825 #:configure-flags
826 (list (string-append "-DRING_BUILD_DIR="
827 (assoc-ref %build-inputs "libring") "/include"))
828 #:phases
829 (modify-phases %standard-phases
830 (add-after 'unpack 'change-directory
831 (lambda _
832 (chdir "lrc")
833 #t))
834 (add-before 'configure 'fix-dbus-interfaces-path
835 (lambda* (#:key inputs #:allow-other-keys)
836 (substitute* "CMakeLists.txt"
837 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
838 (string-append (assoc-ref inputs "libring")
839 dbus-interfaces-path-suffix))))))))
840 (synopsis "Distributed multimedia communications platform")
841 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
842video and chat communication platform that requires no centralized server and
843leaves the power of privacy in the hands of the user. It supports the SIP and
844IAX protocols, as well as decentralized calling using P2P-DHT.
845
846This package provides a library common to all Jami clients.")
847 (home-page "https://jami.net")
848 (license license:gpl3+)))
c771b799
PN
849
850(define-public jami-client-gnome
851 (package
852 (inherit libring)
853 (name "jami-client-gnome")
854 (build-system cmake-build-system)
855 (inputs
856 `(("libringclient" ,libringclient)
857 ("gtk+" ,gtk+)
858 ("qrencode" ,qrencode)
859 ("libnotify" ,libnotify)
860 ("clutter" ,clutter)
861 ("clutter-gtk" ,clutter-gtk)
862 ("gettext" ,gnu-gettext)
863 ("libcanberra" ,libcanberra)
864 ("webkitgtk" ,webkitgtk)
865 ;; TODO: We must wrap ring-client-gnome to force using the
866 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
867 ;; fails with:
868 ;;
869 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
870 ;; undefined symbol: sqlite3_column_table_name16
871 ;;
872 ;; qtbase is built against sqlite-with-column-metadata but somehow
873 ;; jami-client-gnome ends up with both `sqlite' and
874 ;; `sqlite-with-column-metadata' as inputs and it seems that
875 ;; libqsqlite.so gets confused.
876 ("sqlite" ,sqlite-with-column-metadata)))
877 (native-inputs
878 `(("pkg-config" ,pkg-config)
879 ("glib:bin" ,glib "bin")
880 ("doxygen" ,doxygen)))
881 (propagated-inputs
882 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
883 ("adwaita-icon-theme" ,adwaita-icon-theme)
884 ("evolution-data-server" ,evolution-data-server)))
885 (arguments
886 `(#:tests? #f ; There is no testsuite.
887 #:phases
888 (modify-phases %standard-phases
889 (add-after 'unpack 'change-directory
890 (lambda _
891 (chdir "client-gnome")
892 #t))
893 (add-after 'install 'wrap
894 (lambda* (#:key inputs outputs #:allow-other-keys)
895 (let* ((out (assoc-ref outputs "out"))
896 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
897 (wrap-program (string-append out "/bin/gnome-ring")
898 `("LD_LIBRARY_PATH" ":" prefix (,path))))
899 #t)))))
900 (synopsis "Distributed multimedia communications platform")
901 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
902video and chat communication platform that requires no centralized server and
903leaves the power of privacy in the hands of the user. It supports the SIP and
904IAX protocols, as well as decentralized calling using P2P-DHT.
905
906This package provides the Jami client for the GNOME desktop.")
907 (home-page "https://jami.net")
908 (license license:gpl3+)))