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>
5 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages linphone)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages admin)
25 #:use-module (gnu packages audio)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages gl)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages gnome)
33 #:use-module (gnu packages gnome-xyz)
34 #:use-module (gnu packages graphviz)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages image)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages pulseaudio)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages python-xyz)
41 #:use-module (gnu packages qt)
42 #:use-module (gnu packages java)
43 #:use-module (gnu packages sqlite)
44 #:use-module (gnu packages telephony)
45 #:use-module (gnu packages tls)
46 #:use-module (gnu packages video)
47 #:use-module (gnu packages xiph)
48 #:use-module (gnu packages xml)
49 #:use-module (gnu packages xorg)
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix packages)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system qt)
56 #:use-module (guix build-system glib-or-gtk)
57 #:use-module (guix build-system gnu))
67 (string-append "https://www.linphone.org/releases/sources/" name
68 "/" name "-" version ".tar.gz"))
70 (base32 "0ylchj8w98ic2fkqpxc6yk4s6s0h0ql2zsz5n49jd7126m4h8dqk"))))
71 (build-system cmake-build-system)
73 '(#:tests? #f ; No test target
75 (list "-DENABLE_STATIC=NO"))) ; Not required
76 (synopsis "Belledonne Communications Unit Testing Framework")
77 (description "BCUnit is a fork of the defunct project CUnit, with several
78 fixes and patches applied. It is an unit testing framework for writing,
79 administering, and running unit tests in C.")
80 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
81 (license license:lgpl2.0+)))
83 (define-public bctoolbox
91 (string-append "https://www.linphone.org/releases/sources/" name
92 "/" name "-" version ".tar.gz"))
94 (base32 "1a1i70pb4hhnykkwyhhc7fv67q556l8kprny8xzgfqpj1nby2ms6"))))
95 (build-system cmake-build-system)
97 '(#:tests? #f ; No test target
99 (list "-DENABLE_STATIC=OFF"))) ; Not required
102 ("mbedtls" ,mbedtls-apache)))
103 (synopsis "Belledonne Communications Tool Box")
104 (description "BcToolBox is an utilities library used by Belledonne
105 Communications software like belle-sip, mediastreamer2 and linphone.")
106 (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
107 (license license:gpl2+)))
117 (string-append "https://www.linphone.org/releases/sources/" name
118 "/" name "-" version ".tar.gz"))
120 (base32 "1fwv2cg3qy9vdc7dimcda7nqcqc1h2cdd7ikhk7ng7q4ys8m96c1"))))
121 (build-system cmake-build-system)
123 `(#:tests? #f ; No test target
125 (list "-DENABLE_STATIC=OFF"))) ; Not required
127 `(("bctoolbox" ,bctoolbox)))
128 (synopsis "Belledonne Communications Language Recognition Library")
129 (description "Belr is Belledonne Communications' language recognition
130 library, written in C++11. It parses text inputs formatted according to a
131 language defined by an ABNF grammar, such as the protocols standardized at
133 (home-page "https://gitlab.linphone.org/BC/public/belr")
134 (license license:gpl3+)))
136 (define-public belcard
144 (string-append "https://www.linphone.org/releases/sources/" name
145 "/" name "-" version ".tar.gz"))
147 (base32 "0iiyrll1shnbb0561pkvdqcmx9b2cdr76xpsbaqdirc3s4xzcl0k"))))
148 (build-system cmake-build-system)
150 `(#:tests? #f ; No test target
152 (list "-DENABLE_STATIC=OFF"))) ; Not required
154 `(("bctoolbox" ,bctoolbox)
156 (synopsis "Belledonne Communications VCard Library")
157 (description "Belcard is a C++ library to manipulate VCard standard
159 (home-page "https://gitlab.linphone.org/BC/public/belcard")
160 (license license:gpl3+)))
162 (define-public bcmatroska2
170 (string-append "https://www.linphone.org/releases/sources/" name
171 "/" name "-" version ".tar.gz"))
173 (base32 "1a0vlk4fhh189pfzrwbc3xbc5vyx6cnxy642d1h40045jz9y4h15"))))
174 (build-system cmake-build-system)
176 `(#:tests? #f ; No test target
179 "-DENABLE_STATIC=NO"))) ; Not required
180 (synopsis "Belledonne Communications Media Container")
181 (description "BcMatroska is a free and open standard multi-media container
182 format. It can hold an unlimited number of video, audio, picture, or subtitle
183 tracks in one file. ")
184 (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2")
187 ;; For Core C and LibEBML2.
188 ;; https://www.matroska.org/node/47
191 ;; https://www.matroska.org/node/47
194 (define-public bcg729
202 (url "git://git.linphone.org/bcg729.git")
204 (file-name (git-file-name name version))
206 (base32 "1hal6b3w6f8y5r1wa0xzj8sj2jjndypaxyw62q50p63garp2h739"))))
207 (build-system cmake-build-system)
209 `(#:tests? #f ; No test target
211 (list "-DENABLE_STATIC=NO"))) ; Not required
212 (synopsis "Belledonne Communications G729 Codec")
213 (description "BcG729 is an implementation of both encoder and decoder of
214 the ITU G729 speech codec. The library written in C 99 is fully portable and
215 can be executed on many platforms including both ARM and x86 processors. It
216 supports concurrent channels encoding and decoding for multi call application
217 such as conferencing.")
218 (home-page "https://gitlab.linphone.org/BC/public/belcard")
219 (license license:gpl2+)))
229 (string-append "https://www.linphone.org/releases/sources/" name
230 "/" name "-" version ".tar.gz"))
232 (base32 "016qg0lmdgmqh2kv19w9qhi4kkiyi5h1xp35g2s65b1j8ccm25d5"))))
233 (build-system cmake-build-system)
235 `(#:tests? #f ; No test target
237 (list "-DENABLE_STATIC=NO"))) ; Not required
240 ("doxygen" ,doxygen)))
242 `(("bctoolbox" ,bctoolbox)))
243 (synopsis "Belledonne Communications RTP Library")
244 (description "oRTP is a C library implementing the RTP protocol. It
245 implements the RFC 3550 standard.")
246 (home-page "https://gitlab.linphone.org/BC/public/ortp")
247 (license license:gpl2+)))
257 (string-append "https://www.linphone.org/releases/sources/" name
258 "/" name "-" version ".tar.gz"))
260 (base32 "12y0kkh90pixaaxfyx26ca2brhy6nw57fsypp6vh8jk1illv0j5z"))))
261 (build-system cmake-build-system)
263 `(#:tests? #f ; No test target
265 (list "-DENABLE_STATIC=NO"))) ; Not required
267 `(("bctoolbox" ,bctoolbox)
270 (synopsis "Belledonne Communications ZRTP Library")
271 (description "BZRTP is an implementation of ZRTP keys exchange protocol,
272 written in C. It is fully portable and can be executed on many platforms
273 including both ARM and x86.")
274 (home-page "https://gitlab.linphone.org/BC/public/bzrtp")
275 (license license:gpl2+)))
277 (define-public belle-sip
285 (string-append "https://www.linphone.org/releases/sources/" name
286 "/" name "-" version ".tar.gz"))
288 (base32 "0s55kggmgxap54dkw5856bgk4xg7yvbzialpxnjm0zhpic3hff1z"))))
289 (build-system cmake-build-system)
291 `(#:tests? #f ; Requires network access
293 (list "-DENABLE_STATIC=NO") ; Not required
295 (modify-phases %standard-phases
296 (add-after 'unpack 'patch
298 (substitute* "src/CMakeLists.txt"
299 ;; ANTLR would use multithreaded DFA generation otherwise,
300 ;; which would not be reproducible.
301 (("-Xmultithreaded ") ""))
304 `(("antlr3" ,antlr3-3.3)
305 ("antlr3c" ,libantlr3c)
306 ("bctoolbox" ,bctoolbox)
309 (synopsis "Belledonne Communications SIP Library")
310 (description "Belle-sip is a modern library implementing SIP transport,
311 transaction and dialog layers. It is written in C, with an object-oriented
312 API. It also comprises a simple HTTP/HTTPS client implementation.")
313 (home-page "https://gitlab.linphone.org/BC/public/belle-sip")
314 (license license:gpl2+)))
316 (define-public mediastreamer2
318 (name "mediastreamer2")
324 (string-append "https://www.linphone.org/releases/sources/"
325 "mediastreamer/mediastreamer-" version ".tar.gz"))
327 (base32 "0whpqr69wz0pnzvragkpfblxhd0rds8k06c3mw5a0ag216a1yd9k"))
328 (patches (search-patches "mediastreamer2-srtp2.patch"))))
329 (outputs '("out" "doc" "tester"))
330 (build-system cmake-build-system)
332 `(#:tests? #f ; No test target
334 (list "-DENABLE_STATIC=NO" ; Not required
335 "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err
336 "-DENABLE_BV16=NO" ; Not available
337 "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\""
338 "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"")
340 (modify-phases %standard-phases
341 (add-after 'install 'separate-outputs
342 (lambda* (#:key outputs #:allow-other-keys)
343 (let* ((out (assoc-ref outputs "out"))
344 (doc (assoc-ref outputs "doc"))
345 (tester (assoc-ref outputs "tester"))
346 (tester-name (string-append ,name "_tester")))
347 ;; Copy the tester executable.
348 (mkdir-p (string-append tester "/bin"))
349 (rename-file (string-append out "/bin/" tester-name)
350 (string-append tester "/bin/" tester-name))
351 ;; Copy the tester data files.
352 (copy-recursively (string-append out "/share/" tester-name)
353 (string-append tester "/share/" tester-name))
354 (delete-file-recursively (string-append out "/share/"
356 ;; Copy the HTML documentation.
357 (copy-recursively (string-append out "/share/doc/"
358 ,name "-" ,version "/html")
359 (string-append doc "/share/doc/"
360 ,name "-" ,version "/html"))
361 (delete-file-recursively (string-append out "/share/doc/"
372 ("bcmatroska2" ,bcmatroska2)
373 ("bctoolbox" ,bctoolbox)
383 ("portaudio" ,portaudio)
384 ("pulseaudio" ,pulseaudio)
387 ("speexdsp" ,speexdsp)
389 ("theora" ,libtheora)
390 ("turbojpeg" ,libjpeg-turbo)
396 (synopsis "Belledonne Communications Streaming Engine")
397 (description "Mediastreamer2 is a powerful and lightweight streaming engine
398 for telephony applications. This media processing and streaming toolkit is
399 responsible for receiving and sending all multimedia streams in Linphone,
400 including media capture, encoding and decoding, and rendering.")
401 (home-page "https://gitlab.linphone.org/BC/public/mediastreamer2")
402 (license license:gpl2+)))
404 (define-public liblinphone
412 (string-append "https://www.linphone.org/releases/sources/linphone"
413 "/linphone-" version ".tar.gz"))
415 (base32 "0phhkx55xdyg28d4wn8l8q4yvsmdgzmjiw584d4s190sq1azm91x"))))
416 (outputs '("out" "doc" "tester"))
417 (build-system cmake-build-system)
419 `(#:tests? #f ; No test target
421 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
422 (string-append (assoc-ref %build-inputs "gtk2")
423 "/lib/gtk-2.0/include"))
424 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
425 (string-append (assoc-ref %build-inputs "glib")
426 "/lib/glib-2.0/include"))
427 "-DENABLE_STATIC=NO" ; Not required
429 "-DENABLE_GTK_UI=YES") ; for legacy UI
430 #:imported-modules (,@%cmake-build-system-modules
431 (guix build glib-or-gtk-build-system))
432 #:modules ((guix build cmake-build-system)
433 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
436 (modify-phases %standard-phases
437 (add-after 'unpack 'patch
439 (substitute* "gtk/main.c"
440 (("#include \"liblinphone_gitversion.h\"")
443 (add-after 'install 'separate-outputs
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let* ((out (assoc-ref outputs "out"))
446 (doc (assoc-ref outputs "doc"))
447 (tester (assoc-ref outputs "tester"))
448 (tester-name (string-append ,name "_tester")))
449 ;; Copy the tester executable.
450 (mkdir-p (string-append tester "/bin"))
451 (rename-file (string-append out "/bin/" tester-name)
452 (string-append tester "/bin/" tester-name))
453 ;; Copy the tester data files.
454 (mkdir-p (string-append tester "/share/"))
455 (rename-file (string-append out "/share/" tester-name)
456 (string-append tester "/share/" tester-name))
457 ;; Copy the HTML and XML documentation.
459 (string-append out "/share/doc/linphone-" ,version)
460 (string-append doc "/share/doc/" ,name "-" ,version))
461 (delete-file-recursively
462 (string-append out "/share/doc/linphone-" ,version))
464 (add-after 'install 'install-man-pages
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let* ((out (assoc-ref outputs "out"))
467 (man (string-append out "/share/man/man1")))
468 (for-each (lambda (file)
469 (install-file file man))
470 (find-files ".." ".*.1$"))
472 (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
473 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
474 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
475 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
477 `(("gettext" ,gettext-minimal)
478 ("udev" ,eudev) ;for libudev.h
479 ;; For generating the C++ wrappers.
483 ("pystache" ,python-pystache)
484 ("six" ,python-six)))
486 `(("bctoolbox" ,bctoolbox)
488 ("bellesip" ,belle-sip)
493 ("mediastreamer2" ,mediastreamer2)
494 ("notify" ,libnotify)
499 (synopsis "Belledonne Communications Softphone Library")
500 (description "Liblinphone is a high-level SIP library integrating
501 all calling and instant messaging features into an unified
502 easy-to-use API. It is the cross-platform VoIP library on which the
503 Linphone application is based on, and that anyone can use to add audio
504 and video calls or instant messaging capabilities to an application.")
505 (home-page "https://gitlab.linphone.org/BC/public/liblinphone")
506 (license license:gpl2+)))
508 (define-public linphoneqt
516 (string-append "https://www.linphone.org/releases/sources/" name
517 "/" name "-" version ".tar.gz"))
519 (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a"))
520 (patches (search-patches "linphoneqt-tabbutton.patch"))))
521 (build-system qt-build-system)
523 `(#:tests? #f ; No test target
525 (modify-phases %standard-phases
526 (add-after 'unpack 'fix-cmake-error
528 ;; This is fixed in commit efed2fd8 of the master branch.
529 (substitute* "CMakeLists.txt"
533 (add-after 'unpack 'set-version-string
535 (substitute* "src/app/AppController.cpp"
536 (("LINPHONE_QT_GIT_VERSION")
537 (format #f "~s" ,version)))
539 (add-after 'install 'extend-shared-resources
540 ;; Not using the FHS exposes an issue where the client refers to
541 ;; its own "share" directory, which lacks sound files installed by
543 (lambda* (#:key inputs outputs #:allow-other-keys)
544 (let ((liblinphone (assoc-ref inputs "linphone"))
545 (out (assoc-ref outputs "out")))
546 (symlink (string-append liblinphone "/share/sounds")
547 (string-append out "/share/sounds"))
550 `(("qttools" ,qttools)))
552 `(("bctoolbox" ,bctoolbox)
554 ("bellesip" ,belle-sip)
555 ("linphone" ,liblinphone)
556 ("mediastreamer2" ,mediastreamer2)
558 ("qtdeclarative" ,qtdeclarative)
559 ("qtgraphicaleffects" ,qtgraphicaleffects)
560 ("qtquickcontrols" ,qtquickcontrols)
561 ("qtquickcontrols2" ,qtquickcontrols2)
563 (synopsis "Desktop client for the Linphone SIP softphone")
564 (description "Linphone is a SIP softphone for voice and video over IP calling
565 (VoIP) and instant messaging. Amongst its features are:
567 @item High Definition (HD) audio and video calls
568 @item Multiple call management (pause and resume)
570 @item Audio conferencing (merge calls into a conference call)
571 @item Call recording and replay (audio only)
572 @item Instant Messaging with message delivery status (IMDN)
573 @item Picture and file sharing
574 @item Echo cancellation
575 @item Secure user authentication using TLS client certificates
576 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
577 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
578 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
579 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
581 (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop")
582 (license license:gpl2+)))
584 (define-public msopenh264
592 (string-append "https://www.linphone.org/releases/sources/plugins/"
593 name "/" name "-" version ".tar.gz"))
595 (base32 "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8"))
598 ;; For support for OpenH264 version >= 2.
602 (string-append "https://gitlab.linphone.org/BC/public/msopenh264/"
603 "commit/493d147d28c9a0f788ba4e50b47a1ce7b18bf326"
605 (file-name "msopenh264-openh264.patch")
608 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb")))))))
609 (build-system cmake-build-system)
611 `(#:tests? #f ; No test target
613 (list "-DENABLE_STATIC=NO"))) ; Not required
615 `(("mediastreamer2" ,mediastreamer2)
616 ("openh264" ,openh264)
618 (synopsis "Media Streamer H.264 Codec")
619 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
620 mediastreamer2 based on the openh264 library.")
621 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
622 (license license:gpl2+)))
624 (define-public mssilk
632 (string-append "https://www.linphone.org/releases/sources/plugins/"
633 name "/" name "-" version ".tar.gz"))
635 (base32 "07ip0vd29d1n98lnqs5wpimcsmpm65yl7g5vk4hbqghcbsjw94lj"))))
636 (build-system cmake-build-system)
638 `(#:tests? #f ; No test target
640 (list "-DENABLE_STATIC=NO"))) ; Not required
642 `(("mediastreamer2" ,mediastreamer2)
644 (synopsis "Media Streamer SILK Codec")
645 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
646 codec. It is based on the Skype's SILK implementation.")
647 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
648 (license license:gpl2+)))
650 (define-public mswebrtc
658 (string-append "https://www.linphone.org/releases/sources/plugins/"
659 name "/" name "-" version ".tar.gz"))
661 (base32 "1wj28hl9myhshqmn64xg0jf07aw75gmnilb5rff6rcbdxim87mqr"))))
662 (build-system cmake-build-system)
664 `(#:tests? #f ; No test target
667 "-DENABLE_STATIC=NO"))) ; Not required
669 `(("bctoolbox" ,bctoolbox)
670 ("mediastreamer2" ,mediastreamer2)
672 (synopsis "Media Streamer WebRTC Codec")
673 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
674 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
675 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
676 (license license:gpl2+)))
686 (string-append "https://www.linphone.org/releases/sources/plugins/"
687 name "/" name "-" version ".tar.gz"))
689 (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
690 (build-system cmake-build-system)
692 `(#:tests? #f ; No test target
694 (list "-DENABLE_STATIC=NO" ; Not required
695 "-DENABLE_WIDEBAND=YES")))
697 `(("mediastreamer2" ,mediastreamer2)
698 ("opencoreamr" ,opencore-amr)
700 ("voamrwbenc" ,vo-amrwbenc)))
701 (synopsis "Media Streamer AMR Codec")
702 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
703 codec. It is based on the opencore-amr implementation.")
704 (home-page "https://gitlab.linphone.org/BC/public/msamr")
705 (license license:gpl3+)))