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 'install 'install-man-pages
462 (lambda* (#:key outputs #:allow-other-keys)
463 (let* ((out (assoc-ref outputs "out"))
464 (man (string-append out "/share/man/man1")))
465 (for-each (lambda (file)
466 (install-file file man))
467 (find-files ".." ".*.1$"))
469 (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
470 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
471 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
472 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
474 `(("gettext" ,gettext-minimal)
475 ("udev" ,eudev) ;for libudev.h
476 ;; For generating the C++ wrappers.
480 ("pystache" ,python-pystache)
481 ("six" ,python-six)))
483 `(("bctoolbox" ,bctoolbox)
485 ("bellesip" ,belle-sip)
490 ("mediastreamer2" ,mediastreamer2)
491 ("notify" ,libnotify)
496 (synopsis "Belledonne Communications Softphone Library")
497 (description "Liblinphone is a high-level SIP library integrating
498 all calling and instant messaging features into an unified
499 easy-to-use API. It is the cross-platform VoIP library on which the
500 Linphone application is based on, and that anyone can use to add audio
501 and video calls or instant messaging capabilities to an application.")
502 (home-page "https://gitlab.linphone.org/BC/public/liblinphone")
503 (license license:gpl2+)))
505 (define-public linphoneqt
513 (string-append "https://www.linphone.org/releases/sources/" name
514 "/" name "-" version ".tar.gz"))
516 (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a"))
517 (patches (search-patches "linphoneqt-tabbutton.patch"))))
518 (build-system qt-build-system)
520 `(#:tests? #f ; No test target
522 (modify-phases %standard-phases
523 (add-after 'unpack 'fix-cmake-error
525 ;; This is fixed in commit efed2fd8 of the master branch.
526 (substitute* "CMakeLists.txt"
530 (add-after 'unpack 'set-version-string
532 (substitute* "src/app/AppController.cpp"
533 (("LINPHONE_QT_GIT_VERSION")
534 (format #f "~s" ,version)))
536 (add-after 'install 'extend-shared-resources
537 ;; Not using the FHS exposes an issue where the client refers to
538 ;; its own "share" directory, which lacks sound files installed by
540 (lambda* (#:key inputs outputs #:allow-other-keys)
541 (let ((liblinphone (assoc-ref inputs "linphone"))
542 (out (assoc-ref outputs "out")))
543 (symlink (string-append liblinphone "/share/sounds")
544 (string-append out "/share/sounds"))
547 `(("qttools" ,qttools)))
549 `(("bctoolbox" ,bctoolbox)
551 ("bellesip" ,belle-sip)
552 ("linphone" ,liblinphone)
553 ("mediastreamer2" ,mediastreamer2)
555 ("qtdeclarative" ,qtdeclarative)
556 ("qtgraphicaleffects" ,qtgraphicaleffects)
557 ("qtquickcontrols" ,qtquickcontrols)
558 ("qtquickcontrols2" ,qtquickcontrols2)
560 (synopsis "Desktop client for the Linphone SIP softphone")
561 (description "Linphone is a SIP softphone for voice and video over IP calling
562 (VoIP) and instant messaging. Amongst its features are:
564 @item High Definition (HD) audio and video calls
565 @item Multiple call management (pause and resume)
567 @item Audio conferencing (merge calls into a conference call)
568 @item Call recording and replay (audio only)
569 @item Instant Messaging with message delivery status (IMDN)
570 @item Picture and file sharing
571 @item Echo cancellation
572 @item Secure user authentication using TLS client certificates
573 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
574 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
575 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
576 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
578 (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop")
579 (license license:gpl2+)))
581 (define-public msopenh264
589 (string-append "https://www.linphone.org/releases/sources/plugins/"
590 name "/" name "-" version ".tar.gz"))
592 (base32 "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8"))
595 ;; For support for OpenH264 version >= 2.
599 (string-append "https://gitlab.linphone.org/BC/public/msopenh264/"
600 "commit/493d147d28c9a0f788ba4e50b47a1ce7b18bf326"
602 (file-name "msopenh264-openh264.patch")
605 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb")))))))
606 (build-system cmake-build-system)
608 `(#:tests? #f ; No test target
610 (list "-DENABLE_STATIC=NO"))) ; Not required
612 `(("mediastreamer2" ,mediastreamer2)
613 ("openh264" ,openh264)
615 (synopsis "Media Streamer H.264 Codec")
616 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
617 mediastreamer2 based on the openh264 library.")
618 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
619 (license license:gpl2+)))
621 (define-public mssilk
629 (string-append "https://www.linphone.org/releases/sources/plugins/"
630 name "/" name "-" version ".tar.gz"))
632 (base32 "07ip0vd29d1n98lnqs5wpimcsmpm65yl7g5vk4hbqghcbsjw94lj"))))
633 (build-system cmake-build-system)
635 `(#:tests? #f ; No test target
637 (list "-DENABLE_STATIC=NO"))) ; Not required
639 `(("mediastreamer2" ,mediastreamer2)
641 (synopsis "Media Streamer SILK Codec")
642 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
643 codec. It is based on the Skype's SILK implementation.")
644 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
645 (license license:gpl2+)))
647 (define-public mswebrtc
655 (string-append "https://www.linphone.org/releases/sources/plugins/"
656 name "/" name "-" version ".tar.gz"))
658 (base32 "1wj28hl9myhshqmn64xg0jf07aw75gmnilb5rff6rcbdxim87mqr"))))
659 (build-system cmake-build-system)
661 `(#:tests? #f ; No test target
664 "-DENABLE_STATIC=NO"))) ; Not required
666 `(("bctoolbox" ,bctoolbox)
667 ("mediastreamer2" ,mediastreamer2)
669 (synopsis "Media Streamer WebRTC Codec")
670 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
671 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
672 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
673 (license license:gpl2+)))
683 (string-append "https://www.linphone.org/releases/sources/plugins/"
684 name "/" name "-" version ".tar.gz"))
686 (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
687 (build-system cmake-build-system)
689 `(#:tests? #f ; No test target
691 (list "-DENABLE_STATIC=NO" ; Not required
692 "-DENABLE_WIDEBAND=YES")))
694 `(("mediastreamer2" ,mediastreamer2)
695 ("opencoreamr" ,opencore-amr)
697 ("voamrwbenc" ,vo-amrwbenc)))
698 (synopsis "Media Streamer AMR Codec")
699 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
700 codec. It is based on the opencore-amr implementation.")
701 (home-page "https://gitlab.linphone.org/BC/public/msamr")
702 (license license:gpl3+)))