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 java)
41 #:use-module (gnu packages sqlite)
42 #:use-module (gnu packages telephony)
43 #:use-module (gnu packages tls)
44 #:use-module (gnu packages video)
45 #:use-module (gnu packages xiph)
46 #:use-module (gnu packages xml)
47 #:use-module (gnu packages xorg)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix build-system cmake)
52 #:use-module (guix build-system glib-or-gtk)
53 #:use-module (guix build-system gnu))
63 (string-append "https://www.linphone.org/releases/sources/" name
64 "/" name "-" version ".tar.gz"))
66 (base32 "0ylchj8w98ic2fkqpxc6yk4s6s0h0ql2zsz5n49jd7126m4h8dqk"))))
67 (build-system cmake-build-system)
69 '(#:tests? #f ; No test target
72 "-DENABLE_STATIC=NO"))) ; Not required
73 (synopsis "Belledonne Communications Unit Testing Framework")
74 (description "BCUnit is a fork of the defunct project CUnit,
75 with several fixes and patches applied. It is an unit testing
76 framework for writing, administering, and running unit tests in C.")
77 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
78 (license license:lgpl2.0+)))
80 (define-public bctoolbox
88 (string-append "https://www.linphone.org/releases/sources/" name
89 "/" name "-" version ".tar.gz"))
91 (base32 "1a1i70pb4hhnykkwyhhc7fv67q556l8kprny8xzgfqpj1nby2ms6"))))
92 (build-system cmake-build-system)
94 '(#:tests? #f ; No test target
97 "-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
124 "-DENABLE_STATIC=OFF"))) ; Not required
126 `(("bctoolbox" ,bctoolbox)))
127 (synopsis "Belledonne Communications Language Recognition Library")
128 (description "Belr is Belledonne Communications' language recognition library,
129 written in C++11. It parses text inputs formatted according to a language
130 defined by an ABNF grammar, such as the protocols standardized at IETF.")
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
151 "-DENABLE_STATIC=OFF"))) ; Not required
153 `(("bctoolbox" ,bctoolbox)
155 (synopsis "Belledonne Communications VCard Library")
156 (description "Belcard is a C++ library to manipulate VCard standard format.")
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
180 container format. It can hold an unlimited number of video, audio,
181 picture, or subtitle tracks in one file. ")
182 (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2")
185 ;; That license applies for Core C and LibEBML2.
186 ;; https://www.matroska.org/node/47
188 ;; That license applies for LibMatroska2.
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
209 "-DENABLE_STATIC=NO"))) ; Not required
210 (synopsis "Belledonne Communications G729 Codec")
211 (description "BcG729 is an implementation of both encoder and decoder of
212 the ITU G729 speech codec. The library written in C 99 is fully portable and
213 can be executed on many platforms including both ARM and x86 processors. It
214 supports concurrent channels encoding and decoding for multi call application
215 such as conferencing.")
216 (home-page "https://gitlab.linphone.org/BC/public/belcard")
217 (license license:gpl2+)))
227 (string-append "https://www.linphone.org/releases/sources/" name
228 "/" name "-" version ".tar.gz"))
230 (base32 "016qg0lmdgmqh2kv19w9qhi4kkiyi5h1xp35g2s65b1j8ccm25d5"))))
231 (build-system cmake-build-system)
233 `(#:tests? #f ; No test target
236 "-DENABLE_STATIC=NO"))) ; Not required
239 ("doxygen" ,doxygen)))
241 `(("bctoolbox" ,bctoolbox)))
242 (synopsis "Belledonne Communications RTP Library")
243 (description "oRTP is a C library implementing the RTP protocol. It
244 implements the RFC 3550 standard.")
245 (home-page "https://gitlab.linphone.org/BC/public/ortp")
246 (license license:gpl2+)))
256 (string-append "https://www.linphone.org/releases/sources/" name
257 "/" name "-" version ".tar.gz"))
259 (base32 "12y0kkh90pixaaxfyx26ca2brhy6nw57fsypp6vh8jk1illv0j5z"))))
260 (build-system cmake-build-system)
262 `(#:tests? #f ; No test target
265 "-DENABLE_STATIC=NO")))
267 `(("bctoolbox" ,bctoolbox)
270 (synopsis "Belledonne Communications ZRTP Library")
271 (description "BZRTP is an implementation of ZRTP keys exchange
272 protocol, written in C. It is fully portable and can be executed on many
273 platforms 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
294 "-DENABLE_STATIC=NO")
296 (modify-phases %standard-phases
297 (add-after 'unpack 'patch
299 (substitute* "src/CMakeLists.txt"
300 ;; ANTLR would use multithreaded DFA generation
301 ;; otherwise--which would not be reproducible.
302 (("-Xmultithreaded ") ""))
305 `(("antlr3" ,antlr3-3.3)
306 ("antlr3c" ,libantlr3c)
307 ("bctoolbox" ,bctoolbox)
310 (synopsis "Belledonne Communications SIP Library")
311 (description "Belle-sip is a modern library implementing SIP transport,
312 transaction and dialog layers. It is written in C, with an object-oriented
313 API. It also comprises a simple HTTP/HTTPS client implementation.")
314 (home-page "https://gitlab.linphone.org/BC/public/belle-sip")
315 (license license:gpl2+)))
317 (define-public mediastreamer2
319 (name "mediastreamer2")
325 (string-append "https://www.linphone.org/releases/sources/"
326 "mediastreamer/mediastreamer-" version ".tar.gz"))
328 (base32 "0whpqr69wz0pnzvragkpfblxhd0rds8k06c3mw5a0ag216a1yd9k"))
329 (patches (search-patches "mediastreamer2-srtp2.patch"))))
330 (outputs '("out" "doc" "tester"))
331 (build-system cmake-build-system)
333 `(#:tests? #f ; No test target
336 "-DENABLE_STATIC=NO" ; Not required
337 "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err
338 "-DENABLE_BV16=NO" ; Not available
339 "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\""
340 "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"")
342 (modify-phases %standard-phases
343 (add-after 'install 'separate-outputs
344 (lambda* (#:key outputs #:allow-other-keys)
345 (let* ((out (assoc-ref outputs "out"))
346 (doc (assoc-ref outputs "doc"))
347 (tester (assoc-ref outputs "tester"))
348 (tester-name (string-append ,name "_tester")))
349 ;; Copy the tester executable.
350 (mkdir-p (string-append tester "/bin"))
351 (rename-file (string-append out "/bin/" tester-name)
352 (string-append tester "/bin/" tester-name))
353 ;; Copy the tester data files.
354 (copy-recursively (string-append out "/share/" tester-name)
355 (string-append tester "/share/" tester-name))
356 (delete-file-recursively (string-append out "/share/"
358 ;; Copy the HTML documentation.
359 (copy-recursively (string-append out "/share/doc/"
360 ,name "-" ,version "/html")
361 (string-append doc "/share/doc/"
362 ,name "-" ,version "/html"))
363 (delete-file-recursively (string-append out "/share/doc/"
374 ("bcmatroska2" ,bcmatroska2)
375 ("bctoolbox" ,bctoolbox)
385 ("portaudio" ,portaudio)
386 ("pulseaudio" ,pulseaudio)
389 ("speexdsp" ,speexdsp)
391 ("theora" ,libtheora)
392 ("turbojpeg" ,libjpeg-turbo)
398 (synopsis "Belledonne Communications Streaming Engine")
399 (description "Mediastreamer2 is a powerful and lightweight
400 streaming engine for telephony applications. This media processing
401 and streaming toolkit is responsible for receiving and sending all
402 multimedia streams in Linphone, including media capture, encoding and
403 decoding, and rendering.")
404 (home-page "https://gitlab.linphone.org/BC/public/mediastreamer2")
405 (license license:gpl2+)))
407 (define-public liblinphone
415 (string-append "https://www.linphone.org/releases/sources/linphone"
416 "/linphone-" version ".tar.gz"))
418 (base32 "0phhkx55xdyg28d4wn8l8q4yvsmdgzmjiw584d4s190sq1azm91x"))))
419 (outputs '("out" "doc" "tester"))
420 (build-system cmake-build-system)
422 `(#:tests? #f ; No test target
425 (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
426 (string-append (assoc-ref %build-inputs "gtk2")
427 "/lib/gtk-2.0/include"))
428 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
429 (string-append (assoc-ref %build-inputs "glib")
430 "/lib/glib-2.0/include"))
431 "-DENABLE_STATIC=NO" ; Not required
432 "-DENABLE_GTK_UI=YES") ; For Legacy UI
433 #:imported-modules (,@%cmake-build-system-modules
434 (guix build glib-or-gtk-build-system))
435 #:modules ((guix build cmake-build-system)
436 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
439 (modify-phases %standard-phases
440 (add-after 'unpack 'patch
442 (substitute* "gtk/main.c"
443 (("#include \"liblinphone_gitversion.h\"")
446 (add-after 'install 'separate-outputs
447 (lambda* (#:key outputs #:allow-other-keys)
448 (let* ((out (assoc-ref outputs "out"))
449 (doc (assoc-ref outputs "doc"))
450 (tester (assoc-ref outputs "tester"))
451 (tester-name (string-append ,name "_tester")))
452 ;; Copy the tester executable.
453 (mkdir-p (string-append tester "/bin"))
454 (rename-file (string-append out "/bin/" tester-name)
455 (string-append tester "/bin/" tester-name))
456 ;; Copy the tester data files.
457 (mkdir-p (string-append tester "/share/"))
458 (rename-file (string-append out "/share/" tester-name)
459 (string-append tester "/share/" tester-name))
460 ;; Copy the HTML and XML documentation.
462 (string-append out "/share/doc/linphone-" ,version)
463 (string-append doc "/share/doc/" ,name "-" ,version))
464 (delete-file-recursively
465 (string-append out "/share/doc/linphone-" ,version))
467 (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
468 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
469 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
470 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
472 `(("gettext" ,gettext-minimal)
473 ("udev" ,eudev) ;for libudev.h
474 ;; For generating the C++ wrappers.
478 ("pystache" ,python-pystache)
479 ("six" ,python-six)))
481 `(("bctoolbox" ,bctoolbox)
483 ("bellesip" ,belle-sip)
488 ("mediastreamer2" ,mediastreamer2)
489 ("notify" ,libnotify)
494 (synopsis "Belledonne Communications Softphone Library")
495 (description "Liblinphone is a high-level SIP library integrating
496 all calling and instant messaging features into an unified
497 easy-to-use API. It is the cross-platform VoIP library on which the
498 Linphone application is based on, and that anyone can use to add audio
499 and video calls or instant messaging capabilities to an application.")
500 (home-page "https://gitlab.linphone.org/BC/public/liblinphone")
501 (license license:gpl2+)))
503 (define-public msopenh264
511 (string-append "https://www.linphone.org/releases/sources/plugins/"
512 name "/" name "-" version ".tar.gz"))
514 (base32 "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8"))
517 ;; For support for OpenH264 version >= 2.
521 (string-append "https://gitlab.linphone.org/BC/public/msopenh264/commit/"
522 "493d147d28c9a0f788ba4e50b47a1ce7b18bf326.diff"))
523 (file-name "msopenh264-openh264.patch")
525 (base32 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb")))))))
526 (build-system cmake-build-system)
528 `(#:tests? #f ; No test target
531 "-DENABLE_STATIC=NO"))) ; Not required
533 `(("mediastreamer2" ,mediastreamer2)
534 ("openh264" ,openh264)
536 (synopsis "Media Streamer H.264 Codec")
537 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
538 mediastreamer2 based on the openh264 library.")
539 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
540 (license license:gpl2+)))
542 (define-public mssilk
550 (string-append "https://www.linphone.org/releases/sources/plugins/"
551 name "/" name "-" version ".tar.gz"))
553 (base32 "07ip0vd29d1n98lnqs5wpimcsmpm65yl7g5vk4hbqghcbsjw94lj"))))
554 (build-system cmake-build-system)
556 `(#:tests? #f ; No test target
559 "-DENABLE_STATIC=NO"))) ; Not required
561 `(("mediastreamer2" ,mediastreamer2)
563 (synopsis "Media Streamer SILK Codec")
564 (description "MSSILK is a plugin of MediaStreamer, adding support for
565 AMR codec. It is based on the Skype's SILK implementation.")
566 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
567 (license license:gpl2+)))
569 (define-public mswebrtc
577 (string-append "https://www.linphone.org/releases/sources/plugins/"
578 name "/" name "-" version ".tar.gz"))
580 (base32 "1wj28hl9myhshqmn64xg0jf07aw75gmnilb5rff6rcbdxim87mqr"))))
581 (build-system cmake-build-system)
583 `(#:tests? #f ; No test target
586 "-DENABLE_STATIC=NO")))
588 `(("bctoolbox" ,bctoolbox)
589 ("mediastreamer2" ,mediastreamer2)
591 (synopsis "Media Streamer WebRTC Codec")
592 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
593 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
594 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
595 (license license:gpl2+)))
605 (string-append "https://www.linphone.org/releases/sources/plugins/"
606 name "/" name "-" version ".tar.gz"))
608 (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
609 (build-system cmake-build-system)
611 `(#:tests? #f ; No test target
614 "-DENABLE_STATIC=NO" ; Not required
615 "-DENABLE_WIDEBAND=YES")))
617 `(("mediastreamer2" ,mediastreamer2)
618 ("opencoreamr" ,opencore-amr)
620 ("voamrwbenc" ,vo-amrwbenc)))
621 (synopsis "Media Streamer AMR Codec")
622 (description "MSAMR is a plugin of MediaStreamer, adding support for
623 AMR codec. It is based on the opencore-amr implementation.")
624 (home-page "https://gitlab.linphone.org/BC/public/msamr")
625 (license license:gpl3+)))