Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
7 ;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
8 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
12 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
13 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
15 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages telephony)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages aidc)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages audio)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages file)
45 #:use-module (gnu packages protobuf)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages libcanberra)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages networking)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages serialization)
63 #:use-module (gnu packages speech)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages upnp)
66 #:use-module (gnu packages video)
67 #:use-module (gnu packages webkit)
68 #:use-module (gnu packages xiph)
69 #:use-module (gnu packages xorg)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages bison)
73 #:use-module (gnu packages flex)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix packages)
76 #:use-module (guix download)
77 #:use-module (guix git-download)
78 #:use-module (guix build-system cmake)
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
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)))))
99 (build-system gnu-build-system)
100 (synopsis "(u)Common C++ framework for threaded applications")
101 (description "GNU Common C++ is an portable, optimized class framework for
102 threaded applications, supporting concurrent synchronization, inter-process
103 communications via sockets, and various methods for data handling, such as
104 serialization and XML parsing. It includes the uCommon C++ library, a smaller
105 reimplementation.")
106 (license license:gpl2+) ; plus runtime exception
107 (home-page "https://www.gnu.org/software/commoncpp/")))
108
109 (define-public ucommon
110 (package
111 (name "ucommon")
112 (version "7.0.0")
113 (source (origin
114 (method url-fetch)
115 (uri (string-append "mirror://gnu/commoncpp/" name "-"
116 version ".tar.gz"))
117 (sha256 (base32
118 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
119 (build-system gnu-build-system)
120 (inputs `(("gnutls" ,gnutls)))
121 (synopsis "Common C++ framework for threaded applications")
122 (description "GNU uCommon C++ is meant as a very light-weight C++ library
123 to facilitate using C++ design patterns even for very deeply embedded
124 applications, such as for systems using uclibc along with posix threading
125 support.")
126 (license license:gpl3+)
127 (home-page "https://www.gnu.org/software/commoncpp/")
128 (properties '((ftp-directory . "/gnu/commoncpp")))))
129
130 (define-public ccrtp
131 (package
132 (name "ccrtp")
133 (version "2.1.2")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
137 version ".tar.gz"))
138 (sha256 (base32
139 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
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
146 protocol from the IETF. It is suitable both for high capacity servers and
147 personal client applications. It is flexible in its design, allowing it to
148 function as a framework for the framework, rather than just being a
149 packet-manipulation library.")
150 (license license:gpl2+) ; plus runtime exception
151 (home-page "https://www.gnu.org/software/ccrtp/")))
152
153
154 (define-public osip
155 (package
156 (name "osip")
157 (version "5.0.0")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
161 (patches (search-patches "osip-CVE-2017-7853.patch"))
162 (sha256
163 (base32
164 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
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
169 used to provide multimedia and telecom software developers with an interface
170 to initiate and control SIP sessions.")
171 (license license:lgpl2.1+)
172 (home-page "https://www.gnu.org/software/osip/")))
173
174
175 (define-public exosip
176 (package
177 (name "exosip")
178 (version "4.1.0")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
182 version ".tar.gz"))
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
189 SIP protocol for multimedia session establishment. This protocol is mainly to
190 be used by VoIP telephony applications (endpoints or conference server) but
191 might be also useful for any application that wish to establish sessions like
192 multiplayer games.")
193 (license license:gpl2+)
194 ;; (plus OpenSSL linking exception)
195 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
196 (home-page "https://savannah.nongnu.org/projects/exosip")))
197
198 (define-public sipwitch
199 (package
200 (name "sipwitch")
201 (version "1.9.15")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
205 version ".tar.gz"))
206 (sha256 (base32
207 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
208 (build-system gnu-build-system)
209 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
210 ;; cross-compiling. Among other issues there the program name "pkg-config"
211 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
212 ;; Fortunately we can avoid the use of pkg-config and set the dependency
213 ;; flags ourselves.
214 (arguments `(#:configure-flags
215 `("--without-pkg-config"
216 ,(string-append "UCOMMON_CFLAGS=-I"
217 (assoc-ref %build-inputs "ucommon") "/include")
218 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
219 ,(string-append "LIBOSIP2_CFLAGS=-I"
220 (assoc-ref %build-inputs "osip") "/include")
221 "LIBOSIP2_LIBS=-losipparser2 -losip2"
222 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
223 "/etc")
224 "EXOSIP2_LIBS=-leXosip2"
225 ,(string-append "EXOSIP2_CFLAGS=-I"
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
233 uses the SIP protocol. Calls can be made from behind NAT firewalls and
234 without the need for a service provider. Its peer-to-peer design ensures that
235 there is no central point for media intercept or capture and thus it can be
236 used to construct a secure telephone system that operates over the public
237 internet.")
238 (license license:gpl3+)
239 (home-page "https://www.gnu.org/software/sipwitch/")))
240
241 (define-public libsrtp
242 (package
243 (name "libsrtp")
244 (version "2.2.0")
245 (source (origin
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))
251 (sha256
252 (base32
253 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
254 (native-inputs
255 `(("psmisc" ,psmisc) ;some tests require 'killall'
256 ("procps" ,procps)))
257 (build-system gnu-build-system)
258 (arguments
259 '(#:test-target "runtest"))
260 (synopsis "Secure RTP (SRTP) Reference Implementation")
261 (description
262 "This package provides an implementation of the Secure Real-time Transport
263 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
264 supporting cryptographic kernel.")
265 (home-page "https://github.com/cisco/libsrtp")
266 (license license:bsd-3)))
267
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
288 Communications software like linphone.")
289 (license license:gpl2+)))
290
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
311 protocol (RFC 3550).")
312 (license license:lgpl2.1+)))
313
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
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))
327 (sha256
328 (base32
329 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
330 (build-system gnu-build-system)
331 (native-inputs
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool)))
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
338 Voice-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.
344 (license (list license:lgpl2.0
345 license:public-domain
346 license:gpl2+)))))
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
371 to create a voice conference from the terminal, with up to 10 participants,
372 without having to register accounts, exchange emails, or add people to contact
373 lists. All you need to join an existing conference is the host name or IP
374 address of one of the participants.")
375 (home-page "http://holdenc.altervista.org/seren/")
376 (license license:gpl3+)))
377
378 (define-public mumble
379 (package
380 (name "mumble")
381 (version "1.2.19")
382 (source (origin
383 (method url-fetch)
384 (uri (string-append "https://mumble.info/snapshot/"
385 name "-" version ".tar.gz"))
386 (sha256
387 (base32
388 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
389 (patches (search-patches "mumble-1.2.19-abs.patch"))
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)
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"))))
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"))
441 (etc (string-append out "/etc/murmur"))
442 (dbus (string-append out "/etc/dbus-1/system.d/"))
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)
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)
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)
468 ("protobuf" ,protobuf-3.5)
469 ("openssl" ,openssl)
470 ("libsndfile" ,libsndfile)
471 ("boost" ,boost)
472 ("opus" ,opus)
473 ("speex" ,speex)
474 ("speexdsp" ,speexdsp)
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
486 software primarily intended for use while gaming.
487 Mumble consists of two applications for separate usage:
488 @code{mumble} for the client, and @code{murmur} for the server.")
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))))
493
494 (define-public twinkle
495 (package
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
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))))))
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
548 messaging communcations using the SIP protocol. You can use it for direct IP
549 phone to IP phone communication or in a network using a SIP proxy to route your
550 calls and messages")
551 (license license:gpl2+)))
552
553 (define-public pjproject
554 (package
555 (name "pjproject")
556 (version "2.9")
557 (source
558 (origin
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://github.com/pjsip/pjproject.git")
562 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
563 (modules '((guix build utils)))
564 (snippet
565 '(begin
566 (let ((third-party-directories
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"
573 ;; Keep only resample, build and README.txt.
574 "build/baseclasses" "build/g7221" "build/gsm"
575 "build/ilbc" "build/milenage" "build/resample"
576 "build/samplerate" "build/speex" "build/srtp"
577 "build/webrtc" "build/yuv")))
578 ;; Keep only Makefiles related to resample.
579 (for-each (lambda (directory)
580 (delete-file-recursively
581 (string-append "third_party/" directory)))
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 (file-name (git-file-name name version))
593 (sha256
594 (base32
595 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
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)
605 ("resample", resample)
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 _
623 (invoke "autoconf" "-v" "-f" "-i" "-o"
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
636 Initiation Protocol (SIP) and a multimedia framework.")
637 (license license:gpl2+)))
638
639 (define %jami-version "20191101.3.67671e7")
640
641 (define* (jami-source #:key without-daemon)
642 (origin
643 (method url-fetch)
644 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
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
655 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
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 "--with-gnutls"
689 "--with-external-srtp"
690 ;; We need -fPIC or else we get the following error when linking
691 ;; against pjproject-jami:
692 ;; relocation R_X86_64_32S against `.rodata' can not be used when
693 ;; making a shared object;
694 "CFLAGS=-fPIC"
695 "CXXFLAGS=-fPIC")
696 #:phases
697 (modify-phases %standard-phases
698 (add-after 'unpack 'make-git-checkout-writable
699 (lambda _
700 (for-each make-file-writable (find-files "."))
701 #t))
702 (add-after 'unpack 'apply-patches
703 (lambda* (#:key inputs #:allow-other-keys)
704 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
705 ;; Comes from
706 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
707 ;; WARNING: These amount for huge changes in pjproject.
708 (savoir-faire-linux-patches
709 '("fix_turn_alloc_failure"
710 "rfc2466"
711 "ipv6"
712 "multiple_listeners"
713 "pj_ice_sess"
714 "fix_turn_fallback"
715 "fix_ioqueue_ipv6_sendto"
716 "add_dtls_transport"
717 "rfc6544"
718 "ice_config"
719 "sip_config"
720 "fix_first_packet_turn_tcp"
721 "fix_ebusy_turn"
722 "ignore_ipv6_on_transport_check"
723 "fix_turn_connection_failure"
724 ;; "uwp_vs" ; for windows
725 "disable_local_resolution")))
726 (mkdir-p savoir-faire-linux-patches-directory)
727 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
728 "-C" savoir-faire-linux-patches-directory
729 "--strip-components=5"
730 "ring-project/daemon/contrib/src/pjproject")
731 (for-each
732 (lambda (file)
733 (invoke "patch" "--force" "-p1" "-i"
734 (string-append savoir-faire-linux-patches-directory "/"
735 file ".patch")))
736 savoir-faire-linux-patches))
737 #t))
738 ;; TODO: We could use substitute-keyword-arguments instead of
739 ;; repeating the phases from pjproject, but somehow it does
740 ;; not work.
741 (add-before 'build 'build-dep
742 (lambda _ (invoke "make" "dep")))
743 (add-before 'patch-source-shebangs 'autoconf
744 (lambda _
745 (invoke "autoconf" "-v" "-f" "-i" "-o"
746 "aconfigure" "aconfigure.ac")))
747 (add-before 'autoconf 'disable-some-tests
748 ;; Three of the six test programs fail due to missing network
749 ;; access.
750 (lambda _
751 (substitute* "Makefile"
752 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
753 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
754 #t)))))))
755
756 (define-public libring
757 (package
758 (name "libring")
759 (version %jami-version)
760 (source (jami-source #:without-daemon #t))
761 (build-system gnu-build-system)
762 (inputs
763 ;; Missing (optional?) dep: libnatpmp.
764 `(("alsa-lib" ,alsa-lib)
765 ("boost" ,boost)
766 ("dbus-c++" ,dbus-c++)
767 ("eudev" ,eudev)
768 ("ffmpeg" ,ffmpeg)
769 ("flac" ,flac)
770 ("gmp" ,gmp)
771 ("gsm" ,gsm)
772 ("jack" ,jack-1)
773 ("jsoncpp" ,jsoncpp)
774 ("libogg" ,libogg)
775 ("libva" ,libva)
776 ("opendht" ,opendht)
777 ("opus" ,opus)
778 ("pcre" ,pcre)
779 ("pulseaudio" ,pulseaudio)
780 ("libsamplerate" ,libsamplerate)
781 ("libsndfile" ,libsndfile)
782 ("speex" ,speex)
783 ("speexdsp" ,speexdsp)
784 ("libupnp" ,libupnp)
785 ("libvorbis" ,libvorbis)
786 ("libx264" ,libx264)
787 ("libvdpau" ,libvdpau)
788 ("yaml-cpp" ,yaml-cpp)
789 ("zlib" ,zlib)
790 ("openssl" ,openssl)
791 ("libsecp256k1" ,libsecp256k1)
792 ("python" ,python)
793 ("python-wrapper" ,python-wrapper)
794 ("restinio" ,restinio)
795 ("libx11" ,libx11)
796 ("asio" ,asio)
797 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
798 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
799 ("pjproject" ,pjproject-jami)))
800 (native-inputs
801 `(("autoconf" ,autoconf)
802 ("automake" ,automake)
803 ("libtool" ,libtool)
804 ("pkg-config" ,pkg-config)
805 ("which" ,which)
806 ("cppunit" ,cppunit)
807 ("perl" ,perl))) ; Needed for documentation.
808 (arguments
809 `(#:tests? #f ; The tests fail to compile due to missing headers.
810 #:phases
811 (modify-phases %standard-phases
812 (add-after 'unpack 'change-directory
813 (lambda _
814 (chdir "daemon")
815 #t))
816 (add-before 'build 'add-lib-dir
817 (lambda _
818 (mkdir-p "src/lib")
819 #t)))))
820 (synopsis "Distributed multimedia communications platform")
821 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
822 video and chat communication platform that requires no centralized server and
823 leaves the power of privacy in the hands of the user. It supports the SIP and
824 IAX protocols, as well as decentralized calling using P2P-DHT.
825
826 This package provides a library and daemon implementing the Jami core
827 functionality.")
828 (home-page "https://jami.net/")
829 (license license:gpl3+)))
830
831 (define-public libringclient
832 (package
833 (inherit libring)
834 (name "libringclient")
835 (build-system cmake-build-system)
836 (propagated-inputs
837 `(("libring" ,libring) ; For 'dring'.
838 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
839 ("qttools" ,qttools)))
840 (arguments
841 `(#:tests? #f ; There is no testsuite.
842 #:configure-flags
843 (list (string-append "-DRING_BUILD_DIR="
844 (assoc-ref %build-inputs "libring") "/include"))
845 #:phases
846 (modify-phases %standard-phases
847 (add-after 'unpack 'change-directory
848 (lambda _
849 (chdir "lrc")
850 #t))
851 (add-before 'configure 'fix-dbus-interfaces-path
852 (lambda* (#:key inputs #:allow-other-keys)
853 (substitute* "CMakeLists.txt"
854 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
855 (string-append (assoc-ref inputs "libring")
856 dbus-interfaces-path-suffix))))))))
857 (synopsis "Distributed multimedia communications platform")
858 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
859 video and chat communication platform that requires no centralized server and
860 leaves the power of privacy in the hands of the user. It supports the SIP and
861 IAX protocols, as well as decentralized calling using P2P-DHT.
862
863 This package provides a library common to all Jami clients.")
864 (home-page "https://jami.net")
865 (license license:gpl3+)))
866
867 (define-public jami
868 (package
869 (inherit libring)
870 (name "jami")
871 (build-system cmake-build-system)
872 (inputs
873 `(("libringclient" ,libringclient)
874 ("gtk+" ,gtk+)
875 ("qrencode" ,qrencode)
876 ("libnotify" ,libnotify)
877 ("clutter" ,clutter)
878 ("clutter-gtk" ,clutter-gtk)
879 ("gettext" ,gnu-gettext)
880 ("libcanberra" ,libcanberra)
881 ("webkitgtk" ,webkitgtk)))
882 (native-inputs
883 `(("pkg-config" ,pkg-config)
884 ("glib:bin" ,glib "bin")
885 ("doxygen" ,doxygen)))
886 (propagated-inputs
887 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
888 ("adwaita-icon-theme" ,adwaita-icon-theme)
889 ("evolution-data-server" ,evolution-data-server)))
890 (arguments
891 `(#:tests? #f ; There is no testsuite.
892 #:phases
893 (modify-phases %standard-phases
894 (add-after 'unpack 'change-directory
895 (lambda _
896 (chdir "client-gnome")
897 #t)))))
898 (synopsis "Distributed, privacy-respecting communication program")
899 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
900 video and chat communication platform that requires no centralized server and
901 leaves the power of privacy in the hands of the user. It supports the SIP and
902 IAX protocols, as well as decentralized calling using P2P-DHT.
903
904 This package provides the Jami client for the GNOME desktop.")
905 (home-page "https://jami.net")
906 (license license:gpl3+)))
907
908 (define-public jami-client-gnome
909 (deprecated-package "jami-client-gnome" jami))