1 ;;; GNU Guix --- Functional package management for GNU
3 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
4 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages linphone)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages admin)
24 #:use-module (gnu packages audio)
25 #:use-module (gnu packages base)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages documentation)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages gl)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages gnome-xyz)
33 #:use-module (gnu packages graphviz)
34 #:use-module (gnu packages gtk)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages pulseaudio)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages python-xyz)
40 #:use-module (gnu packages qt)
41 #:use-module (gnu packages java)
42 #:use-module (gnu packages sqlite)
43 #:use-module (gnu packages telephony)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages video)
46 #:use-module (gnu packages xiph)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages xorg)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix build-system cmake)
53 #:use-module (guix build-system qt)
54 #:use-module (guix build-system glib-or-gtk)
55 #:use-module (guix build-system gnu))
65 (string-append "https://www.linphone.org/releases/sources/" name
66 "/" name "-" version ".tar.gz"))
68 (base32 "0ylchj8w98ic2fkqpxc6yk4s6s0h0ql2zsz5n49jd7126m4h8dqk"))))
69 (build-system cmake-build-system)
71 '(#:tests? #f ; No test target
73 (list "-DENABLE_STATIC=NO"))) ; Not required
74 (synopsis "Belledonne Communications Unit Testing Framework")
75 (description "BCUnit is a fork of the defunct project CUnit, with several
76 fixes and patches applied. It is an unit testing framework for writing,
77 administering, and running unit tests in C.")
78 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
79 (license license:lgpl2.0+)))
81 (define-public bctoolbox
89 (string-append "https://www.linphone.org/releases/sources/" name
90 "/" name "-" version ".tar.gz"))
92 (base32 "1a1i70pb4hhnykkwyhhc7fv67q556l8kprny8xzgfqpj1nby2ms6"))))
93 (build-system cmake-build-system)
95 '(#:tests? #f ; No test target
97 (list "-DENABLE_STATIC=OFF"))) ; Not required
100 ("mbedtls" ,mbedtls-apache)))
101 (synopsis "Belledonne Communications Tool Box")
102 (description "BcToolBox is an utilities library used by Belledonne
103 Communications software like belle-sip, mediastreamer2 and linphone.")
104 (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
105 (license license:gpl2+)))
115 (string-append "https://www.linphone.org/releases/sources/" name
116 "/" name "-" version ".tar.gz"))
118 (base32 "1fwv2cg3qy9vdc7dimcda7nqcqc1h2cdd7ikhk7ng7q4ys8m96c1"))))
119 (build-system cmake-build-system)
121 `(#:tests? #f ; No test target
123 (list "-DENABLE_STATIC=OFF"))) ; Not required
125 `(("bctoolbox" ,bctoolbox)))
126 (synopsis "Belledonne Communications Language Recognition Library")
127 (description "Belr is Belledonne Communications' language recognition
128 library, written in C++11. It parses text inputs formatted according to a
129 language defined by an ABNF grammar, such as the protocols standardized at
131 (home-page "https://gitlab.linphone.org/BC/public/belr")
132 (license license:gpl3+)))
134 (define-public belcard
142 (string-append "https://www.linphone.org/releases/sources/" name
143 "/" name "-" version ".tar.gz"))
145 (base32 "0iiyrll1shnbb0561pkvdqcmx9b2cdr76xpsbaqdirc3s4xzcl0k"))))
146 (build-system cmake-build-system)
148 `(#:tests? #f ; No test target
150 (list "-DENABLE_STATIC=OFF"))) ; Not required
152 `(("bctoolbox" ,bctoolbox)
154 (synopsis "Belledonne Communications VCard Library")
155 (description "Belcard is a C++ library to manipulate VCard standard
157 (home-page "https://gitlab.linphone.org/BC/public/belcard")
158 (license license:gpl3+)))
160 (define-public bcmatroska2
168 (string-append "https://www.linphone.org/releases/sources/" name
169 "/" name "-" version ".tar.gz"))
171 (base32 "1a0vlk4fhh189pfzrwbc3xbc5vyx6cnxy642d1h40045jz9y4h15"))))
172 (build-system cmake-build-system)
174 `(#:tests? #f ; No test target
177 "-DENABLE_STATIC=NO"))) ; Not required
178 (synopsis "Belledonne Communications Media Container")
179 (description "BcMatroska is a free and open standard multi-media container
180 format. It can hold an unlimited number of video, audio, picture, or subtitle
181 tracks in one file. ")
182 (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2")
185 ;; For Core C and LibEBML2.
186 ;; https://www.matroska.org/node/47
189 ;; https://www.matroska.org/node/47
192 (define-public bcg729
200 (string-append "https://www.linphone.org/releases/sources/" name
201 "/" name "-" version ".tar.gz"))
203 (base32 "01y34ky7ykjgfnf8a9f59hg61fqfjiprfrzshdz06w0lz4gvy3qs"))))
204 (build-system cmake-build-system)
206 `(#:tests? #f ; No test target
208 (list "-DENABLE_STATIC=NO"))) ; Not required
209 (synopsis "Belledonne Communications G729 Codec")
210 (description "BcG729 is an implementation of both encoder and decoder of
211 the ITU G729 speech codec. The library written in C 99 is fully portable and
212 can be executed on many platforms including both ARM and x86 processors. It
213 supports concurrent channels encoding and decoding for multi call application
214 such as conferencing.")
215 (home-page "https://gitlab.linphone.org/BC/public/belcard")
216 (license license:gpl2+)))
226 (string-append "https://www.linphone.org/releases/sources/" name
227 "/" name "-" version ".tar.gz"))
229 (base32 "016qg0lmdgmqh2kv19w9qhi4kkiyi5h1xp35g2s65b1j8ccm25d5"))))
230 (build-system cmake-build-system)
232 `(#:tests? #f ; No test target
234 (list "-DENABLE_STATIC=NO"))) ; Not required
237 ("doxygen" ,doxygen)))
239 `(("bctoolbox" ,bctoolbox)))
240 (synopsis "Belledonne Communications RTP Library")
241 (description "oRTP is a C library implementing the RTP protocol. It
242 implements the RFC 3550 standard.")
243 (home-page "https://gitlab.linphone.org/BC/public/ortp")
244 (license license:gpl2+)))
254 (string-append "https://www.linphone.org/releases/sources/" name
255 "/" name "-" version ".tar.gz"))
257 (base32 "12y0kkh90pixaaxfyx26ca2brhy6nw57fsypp6vh8jk1illv0j5z"))))
258 (build-system cmake-build-system)
260 `(#:tests? #f ; No test target
262 (list "-DENABLE_STATIC=NO"))) ; Not required
264 `(("bctoolbox" ,bctoolbox)
267 (synopsis "Belledonne Communications ZRTP Library")
268 (description "BZRTP is an implementation of ZRTP keys exchange protocol,
269 written in C. It is fully portable and can be executed on many platforms
270 including both ARM and x86.")
271 (home-page "https://gitlab.linphone.org/BC/public/bzrtp")
272 (license license:gpl2+)))
274 (define-public belle-sip
282 (string-append "https://www.linphone.org/releases/sources/" name
283 "/" name "-" version ".tar.gz"))
285 (base32 "0s55kggmgxap54dkw5856bgk4xg7yvbzialpxnjm0zhpic3hff1z"))))
286 (build-system cmake-build-system)
288 `(#:tests? #f ; Requires network access
290 (list "-DENABLE_STATIC=NO") ; Not required
292 (modify-phases %standard-phases
293 (add-after 'unpack 'patch
295 (substitute* "src/CMakeLists.txt"
296 ;; ANTLR would use multithreaded DFA generation otherwise,
297 ;; which would not be reproducible.
298 (("-Xmultithreaded ") ""))
301 `(("antlr3" ,antlr3-3.3)
302 ("antlr3c" ,libantlr3c)
303 ("bctoolbox" ,bctoolbox)
306 (synopsis "Belledonne Communications SIP Library")
307 (description "Belle-sip is a modern library implementing SIP transport,
308 transaction and dialog layers. It is written in C, with an object-oriented
309 API. It also comprises a simple HTTP/HTTPS client implementation.")
310 (home-page "https://gitlab.linphone.org/BC/public/belle-sip")
311 (license license:gpl2+)))
313 (define-public mediastreamer2
315 (name "mediastreamer2")
321 (string-append "https://www.linphone.org/releases/sources/"
322 "mediastreamer/mediastreamer-" version ".tar.gz"))
324 (base32 "0whpqr69wz0pnzvragkpfblxhd0rds8k06c3mw5a0ag216a1yd9k"))
325 (patches (search-patches "mediastreamer2-srtp2.patch"))))
326 (outputs '("out" "doc" "tester"))
327 (build-system cmake-build-system)
329 `(#:tests? #f ; No test target
331 (list "-DENABLE_STATIC=NO" ; Not required
332 "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err
333 "-DENABLE_BV16=NO" ; Not available
334 "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\""
335 "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"")
337 (modify-phases %standard-phases
338 (add-after 'install 'separate-outputs
339 (lambda* (#:key outputs #:allow-other-keys)
340 (let* ((out (assoc-ref outputs "out"))
341 (doc (assoc-ref outputs "doc"))
342 (tester (assoc-ref outputs "tester"))
343 (tester-name (string-append ,name "_tester")))
344 ;; Copy the tester executable.
345 (mkdir-p (string-append tester "/bin"))
346 (rename-file (string-append out "/bin/" tester-name)
347 (string-append tester "/bin/" tester-name))
348 ;; Copy the tester data files.
349 (copy-recursively (string-append out "/share/" tester-name)
350 (string-append tester "/share/" tester-name))
351 (delete-file-recursively (string-append out "/share/"
353 ;; Copy the HTML documentation.
354 (copy-recursively (string-append out "/share/doc/"
355 ,name "-" ,version "/html")
356 (string-append doc "/share/doc/"
357 ,name "-" ,version "/html"))
358 (delete-file-recursively (string-append out "/share/doc/"
369 ("bcmatroska2" ,bcmatroska2)
370 ("bctoolbox" ,bctoolbox)
380 ("portaudio" ,portaudio)
381 ("pulseaudio" ,pulseaudio)
384 ("speexdsp" ,speexdsp)
386 ("theora" ,libtheora)
387 ("turbojpeg" ,libjpeg-turbo)
393 (synopsis "Belledonne Communications Streaming Engine")
394 (description "Mediastreamer2 is a powerful and lightweight streaming engine
395 for telephony applications. This media processing and streaming toolkit is
396 responsible for receiving and sending all multimedia streams in Linphone,
397 including media capture, encoding and decoding, and rendering.")
398 (home-page "https://gitlab.linphone.org/BC/public/mediastreamer2")
399 (license license:gpl2+)))
401 (define-public liblinphone
409 (string-append "https://www.linphone.org/releases/sources/linphone"
410 "/linphone-" version ".tar.gz"))
412 (base32 "0phhkx55xdyg28d4wn8l8q4yvsmdgzmjiw584d4s190sq1azm91x"))))
413 (outputs '("out" "doc" "tester"))
414 (build-system cmake-build-system)
416 `(#:tests? #f ; No test target
418 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
419 (string-append (assoc-ref %build-inputs "gtk2")
420 "/lib/gtk-2.0/include"))
421 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
422 (string-append (assoc-ref %build-inputs "glib")
423 "/lib/glib-2.0/include"))
424 "-DENABLE_STATIC=NO" ; Not required
426 "-DENABLE_GTK_UI=YES") ; for legacy UI
427 #:imported-modules (,@%cmake-build-system-modules
428 (guix build glib-or-gtk-build-system))
429 #:modules ((guix build cmake-build-system)
430 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
433 (modify-phases %standard-phases
434 (add-after 'unpack 'patch
436 (substitute* "gtk/main.c"
437 (("#include \"liblinphone_gitversion.h\"")
440 (add-after 'install 'separate-outputs
441 (lambda* (#:key outputs #:allow-other-keys)
442 (let* ((out (assoc-ref outputs "out"))
443 (doc (assoc-ref outputs "doc"))
444 (tester (assoc-ref outputs "tester"))
445 (tester-name (string-append ,name "_tester")))
446 ;; Copy the tester executable.
447 (mkdir-p (string-append tester "/bin"))
448 (rename-file (string-append out "/bin/" tester-name)
449 (string-append tester "/bin/" tester-name))
450 ;; Copy the tester data files.
451 (mkdir-p (string-append tester "/share/"))
452 (rename-file (string-append out "/share/" tester-name)
453 (string-append tester "/share/" tester-name))
454 ;; Copy the HTML and XML documentation.
456 (string-append out "/share/doc/linphone-" ,version)
457 (string-append doc "/share/doc/" ,name "-" ,version))
458 (delete-file-recursively
459 (string-append out "/share/doc/linphone-" ,version))
461 (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
462 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
463 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
464 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
466 `(("gettext" ,gettext-minimal)
467 ("udev" ,eudev) ;for libudev.h
468 ;; For generating the C++ wrappers.
472 ("pystache" ,python-pystache)
473 ("six" ,python-six)))
475 `(("bctoolbox" ,bctoolbox)
477 ("bellesip" ,belle-sip)
482 ("mediastreamer2" ,mediastreamer2)
483 ("notify" ,libnotify)
488 (synopsis "Belledonne Communications Softphone Library")
489 (description "Liblinphone is a high-level SIP library integrating
490 all calling and instant messaging features into an unified
491 easy-to-use API. It is the cross-platform VoIP library on which the
492 Linphone application is based on, and that anyone can use to add audio
493 and video calls or instant messaging capabilities to an application.")
494 (home-page "https://gitlab.linphone.org/BC/public/liblinphone")
495 (license license:gpl2+)))
497 (define-public linphoneqt
505 (string-append "https://www.linphone.org/releases/sources/" name
506 "/" name "-" version ".tar.gz"))
508 (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a"))
509 (patches (search-patches "linphoneqt-tabbutton.patch"))))
510 (build-system qt-build-system)
512 `(#:tests? #f ; No test target
514 (modify-phases %standard-phases
515 (add-after 'unpack 'fix-cmake-error
517 ;; This is fixed in commit efed2fd8 of the master branch.
518 (substitute* "CMakeLists.txt"
522 (add-after 'unpack 'set-version-string
524 (substitute* "src/app/AppController.cpp"
525 (("LINPHONE_QT_GIT_VERSION")
526 (format #f "~s" ,version)))
528 (add-after 'install 'extend-shared-resources
529 ;; Not using the FHS exposes an issue where the client refers to
530 ;; its own "share" directory, which lacks sound files installed by
532 (lambda* (#:key inputs outputs #:allow-other-keys)
533 (let ((liblinphone (assoc-ref inputs "linphone"))
534 (out (assoc-ref outputs "out")))
535 (symlink (string-append liblinphone "/share/sounds")
536 (string-append out "/share/sounds"))
539 `(("qttools" ,qttools)))
541 `(("bctoolbox" ,bctoolbox)
543 ("bellesip" ,belle-sip)
544 ("linphone" ,liblinphone)
545 ("mediastreamer2" ,mediastreamer2)
547 ("qtdeclarative" ,qtdeclarative)
548 ("qtgraphicaleffects" ,qtgraphicaleffects)
549 ("qtquickcontrols" ,qtquickcontrols)
550 ("qtquickcontrols2" ,qtquickcontrols2)
552 (synopsis "Desktop client for the Linphone SIP softphone")
553 (description "Linphone is a SIP softphone for voice and video over IP calling
554 (VoIP) and instant messaging. Amongst its features are:
556 @item High Definition (HD) audio and video calls
557 @item Multiple call management (pause and resume)
559 @item Audio conferencing (merge calls into a conference call)
560 @item Call recording and replay (audio only)
561 @item Instant Messaging with message delivery status (IMDN)
562 @item Picture and file sharing
563 @item Echo cancellation
564 @item Secure user authentication using TLS client certificates
565 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
566 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
567 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
568 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
570 (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop")
571 (license license:gpl2+)))
573 (define-public msopenh264
581 (string-append "https://www.linphone.org/releases/sources/plugins/"
582 name "/" name "-" version ".tar.gz"))
584 (base32 "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8"))
587 ;; For support for OpenH264 version >= 2.
591 (string-append "https://gitlab.linphone.org/BC/public/msopenh264/"
592 "commit/493d147d28c9a0f788ba4e50b47a1ce7b18bf326"
594 (file-name "msopenh264-openh264.patch")
597 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb")))))))
598 (build-system cmake-build-system)
600 `(#:tests? #f ; No test target
602 (list "-DENABLE_STATIC=NO"))) ; Not required
604 `(("mediastreamer2" ,mediastreamer2)
605 ("openh264" ,openh264)
607 (synopsis "Media Streamer H.264 Codec")
608 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
609 mediastreamer2 based on the openh264 library.")
610 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
611 (license license:gpl2+)))
613 (define-public mssilk
621 (string-append "https://www.linphone.org/releases/sources/plugins/"
622 name "/" name "-" version ".tar.gz"))
624 (base32 "07ip0vd29d1n98lnqs5wpimcsmpm65yl7g5vk4hbqghcbsjw94lj"))))
625 (build-system cmake-build-system)
627 `(#:tests? #f ; No test target
629 (list "-DENABLE_STATIC=NO"))) ; Not required
631 `(("mediastreamer2" ,mediastreamer2)
633 (synopsis "Media Streamer SILK Codec")
634 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
635 codec. It is based on the Skype's SILK implementation.")
636 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
637 (license license:gpl2+)))
639 (define-public mswebrtc
647 (string-append "https://www.linphone.org/releases/sources/plugins/"
648 name "/" name "-" version ".tar.gz"))
650 (base32 "1wj28hl9myhshqmn64xg0jf07aw75gmnilb5rff6rcbdxim87mqr"))))
651 (build-system cmake-build-system)
653 `(#:tests? #f ; No test target
656 "-DENABLE_STATIC=NO"))) ; Not required
658 `(("bctoolbox" ,bctoolbox)
659 ("mediastreamer2" ,mediastreamer2)
661 (synopsis "Media Streamer WebRTC Codec")
662 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
663 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
664 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
665 (license license:gpl2+)))
675 (string-append "https://www.linphone.org/releases/sources/plugins/"
676 name "/" name "-" version ".tar.gz"))
678 (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
679 (build-system cmake-build-system)
681 `(#:tests? #f ; No test target
683 (list "-DENABLE_STATIC=NO" ; Not required
684 "-DENABLE_WIDEBAND=YES")))
686 `(("mediastreamer2" ,mediastreamer2)
687 ("opencoreamr" ,opencore-amr)
689 ("voamrwbenc" ,vo-amrwbenc)))
690 (synopsis "Media Streamer AMR Codec")
691 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
692 codec. It is based on the opencore-amr implementation.")
693 (home-page "https://gitlab.linphone.org/BC/public/msamr")
694 (license license:gpl3+)))