gnu: Use 'modify-phases' syntax.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
CommitLineData
8fd3de0b 1;;; GNU Guix --- Functional package management for GNU
63af948f
AE
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3c9e35cc 4;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6f09178d 5;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
4ff20605 6;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
319ac02b 7;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
bd9f8869 8;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
8fd3de0b
JD
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages telephony)
26 #:use-module (gnu packages)
4ff20605 27 #:use-module (gnu packages autotools)
faa29e4b 28 #:use-module (gnu packages avahi)
29 #:use-module (gnu packages boost)
30 #:use-module (gnu packages protobuf)
8fd3de0b 31 #:use-module (gnu packages gnupg)
3c9e35cc 32 #:use-module (gnu packages linux)
319ac02b
FF
33 #:use-module (gnu packages multiprecision)
34 #:use-module (gnu packages ncurses)
8fd3de0b 35 #:use-module (gnu packages pkg-config)
faa29e4b 36 #:use-module (gnu packages pulseaudio)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages speech)
99e6f9c8 39 #:use-module (gnu packages tls)
319ac02b 40 #:use-module (gnu packages xiph)
faa29e4b 41 #:use-module (gnu packages xorg)
974aaf71 42 #:use-module ((guix licenses) #:prefix license:)
8fd3de0b
JD
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix build-system gnu))
46
47(define-public commoncpp
48 (package
49 (name "commoncpp")
50 (version "1.8.1")
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
54 version ".tar.gz"))
55 (sha256 (base32
56 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
57 (arguments
58 `(#:phases
dc1d3cde
KK
59 (modify-phases %standard-phases
60 (add-before 'configure 'pre-configure
61 (lambda _
62 (substitute* "src/applog.cpp"
63 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
64 #t)))))
8fd3de0b 65 (build-system gnu-build-system)
12bcf94a 66 (synopsis "(u)Common C++ framework for threaded applications")
8fd3de0b
JD
67 (description "GNU Common C++ is an portable, optimized class framework for
68threaded applications, supporting concurrent synchronization, inter-process
69communications via sockets, and various methods for data handling, such as
70serialization and XML parsing. It includes the uCommon C++ library, a smaller
71reimplementation.")
974aaf71 72 (license license:gpl2+) ; plus runtime exception
6fd52309 73 (home-page "https://www.gnu.org/software/commoncpp/")))
8fd3de0b
JD
74
75(define-public ucommon
76 (package
77 (name "ucommon")
99e6f9c8 78 (version "7.0.0")
8fd3de0b
JD
79 (source (origin
80 (method url-fetch)
81 (uri (string-append "mirror://gnu/commoncpp/" name "-"
82 version ".tar.gz"))
83 (sha256 (base32
99e6f9c8 84 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
8fd3de0b 85 (build-system gnu-build-system)
99e6f9c8 86 (inputs `(("gnutls" ,gnutls)))
35b9e423
EB
87 (synopsis "Common C++ framework for threaded applications")
88 (description "GNU uCommon C++ is meant as a very light-weight C++ library
89to facilitate using C++ design patterns even for very deeply embedded
90applications, such as for systems using uclibc along with posix threading
91support.")
974aaf71 92 (license license:gpl3+)
6fd52309 93 (home-page "https://www.gnu.org/software/commoncpp/")
63e8bb12 94 (properties '((ftp-directory . "/gnu/commoncpp")))))
8fd3de0b
JD
95
96(define-public ccrtp
97 (package
98 (name "ccrtp")
9dc9053f 99 (version "2.1.2")
8fd3de0b
JD
100 (source (origin
101 (method url-fetch)
102 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
103 version ".tar.gz"))
104 (sha256 (base32
9dc9053f 105 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
8fd3de0b
JD
106 (build-system gnu-build-system)
107 (inputs `(("ucommon" ,ucommon)
108 ("libgcrypt" ,libgcrypt)))
109 (native-inputs `(("pkg-config" ,pkg-config)))
110 (synopsis "Implementation of RTP (real-time transport protocol)")
111 (description "GNU ccRTP is an implementation of RTP, the real-time transport
112protocol from the IETF. It is suitable both for high capacity servers and
113personal client applications. It is flexible in its design, allowing it to
114function as a framework for the framework, rather than just being a
115packet-manipulation library.")
974aaf71 116 (license license:gpl2+) ; plus runtime exception
6fd52309 117 (home-page "https://www.gnu.org/software/ccrtp/")))
8fd3de0b
JD
118
119
120(define-public osip
121 (package
122 (name "osip")
6dfbbd2c 123 (version "5.0.0")
8fd3de0b
JD
124 (source (origin
125 (method url-fetch)
126 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
75072795 127 (patches (search-patches "osip-CVE-2017-7853.patch"))
6dfbbd2c
LF
128 (sha256
129 (base32
130 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
8fd3de0b
JD
131 (build-system gnu-build-system)
132
133 (synopsis "Library implementing SIP (RFC-3261)")
134 (description "GNU oSIP is an implementation of the SIP protocol. It is
135used to provide multimedia and telecom software developers with an interface
136to initiate and control SIP sessions.")
974aaf71 137 (license license:lgpl2.1+)
6fd52309 138 (home-page "https://www.gnu.org/software/osip/")))
8fd3de0b
JD
139
140
141(define-public exosip
142 (package
143 (name "exosip")
144 (version "4.1.0")
145 (source (origin
146 (method url-fetch)
966a543b
LC
147 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
148 version ".tar.gz"))
8fd3de0b
JD
149 (sha256 (base32
150 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
151 (build-system gnu-build-system)
152 (inputs `(("osip" ,osip)))
153 (synopsis "Sip abstraction library")
154 (description "EXosip is a library that hides the complexity of using the
e881752c 155SIP protocol for multimedia session establishment. This protocol is mainly to
8fd3de0b 156be used by VoIP telephony applications (endpoints or conference server) but
e881752c 157might be also useful for any application that wish to establish sessions like
8fd3de0b 158multiplayer games.")
974aaf71 159 (license license:gpl2+)
8fd3de0b
JD
160 ;; (plus OpenSSL linking exception)
161 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
162 (home-page "http://savannah.nongnu.org/projects/exosip")))
163
164(define-public sipwitch
165 (package
166 (name "sipwitch")
419fa59b 167 (version "1.9.15")
8fd3de0b
JD
168 (source (origin
169 (method url-fetch)
170 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
171 version ".tar.gz"))
172 (sha256 (base32
419fa59b 173 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
8fd3de0b 174 (build-system gnu-build-system)
e881752c 175 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
8fd3de0b
JD
176 ;; cross-compiling. Among other issues there the program name "pkg-config"
177 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
e881752c
AK
178 ;; Fortunately we can avoid the use of pkg-config and set the dependency
179 ;; flags ourselves.
180 (arguments `(#:configure-flags
8fd3de0b 181 `("--without-pkg-config"
e881752c 182 ,(string-append "UCOMMON_CFLAGS=-I"
8fd3de0b
JD
183 (assoc-ref %build-inputs "ucommon") "/include")
184 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
e881752c 185 ,(string-append "LIBOSIP2_CFLAGS=-I"
8fd3de0b
JD
186 (assoc-ref %build-inputs "osip") "/include")
187 "LIBOSIP2_LIBS=-losipparser2 -losip2"
e881752c 188 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
8fd3de0b
JD
189 "/etc")
190 "EXOSIP2_LIBS=-leXosip2"
e881752c 191 ,(string-append "EXOSIP2_CFLAGS=-I"
8fd3de0b
JD
192 (assoc-ref %build-inputs "exosip")
193 "/include"))))
194 (inputs `(("ucommon" ,ucommon)
195 ("exosip" ,exosip)
196 ("osip" ,osip)))
197 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
198 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
199uses the SIP protocol. Calls can be made from behind NAT firewalls and
200without the need for a service provider. Its peer-to-peer design ensures that
201there is no central point for media intercept or capture and thus it can be
202used to construct a secure telephone system that operates over the public
203internet.")
974aaf71 204 (license license:gpl3+)
6fd52309 205 (home-page "https://www.gnu.org/software/sipwitch/")))
8fd3de0b 206
3c9e35cc
DH
207(define-public libsrtp
208 (package
209 (name "libsrtp")
8d9ac926 210 (version "1.5.4")
3c9e35cc
DH
211 (source (origin
212 (method url-fetch)
213 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
214 version ".tar.gz"))
6f09178d 215 (file-name (string-append name "-" version ".tar.gz"))
3c9e35cc
DH
216 (sha256
217 (base32
8d9ac926 218 "1w2g623qkd7gdyydglx2hr4s2y237lg0nszjmy7z8d2iq8hvb9sn"))))
3c9e35cc 219 (native-inputs
340f9b9f
LC
220 `(("psmisc" ,psmisc) ;some tests require 'killall'
221 ("procps" ,procps)))
3c9e35cc
DH
222 (build-system gnu-build-system)
223 (arguments
310248c6
EF
224 '(#:test-target "runtest"
225 #:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-mips-variable-in-testsuite
228 ;; This comes from https://github.com/cisco/libsrtp/pull/151
229 (lambda _
230 (substitute* "test/srtp_driver.c"
231 (("mips ") "mips_est ")
232 (("mips\\)") "mips_est)"))
233 #t))
234 (add-after 'unpack 'patch-dictionary-location
235 ;; With the above changes, the rtpw_test.sh test finally runs, and fails
236 (lambda _
237 (substitute* "test/rtpw.c"
238 (("/usr/share/dict/words")
239 (string-append (assoc-ref %build-inputs "procps")
340f9b9f
LC
240 "/share/doc/procps-ng/FAQ"))
241 (("words.txt") "FAQ"))
310248c6 242 #t)))))
3c9e35cc
DH
243 (synopsis "Secure RTP (SRTP) Reference Implementation")
244 (description "This package provides an implementation of the Secure
245Real-time Transport Protocol (SRTP), the Universal Security Transform (UST),
246and a supporting cryptographic kernel.")
247 (home-page "https://github.com/cisco/libsrtp")
974aaf71 248 (license license:bsd-3)))
4ff20605
LG
249
250(define-public libiax2
251 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
252 ;; This is the commit used by the Ring Project.
253 (package
254 (name "libiax2")
255 (version (string-append "0.0.0-1." (string-take commit 7)))
256 (source
257 (origin
258 (method url-fetch)
259 (uri
260 (string-append
261 "https://gitlab.savoirfairelinux.com/sflphone/libiax2/"
262 "repository/archive.tar.gz?ref="
263 commit))
264 (file-name (string-append name "-" version ".tar.gz"))
265 (sha256
266 (base32
267 "0cj5293bixp3k5x3hjwyd0iq7z8w5p7yavxvvkqk5817hjq386y2"))))
268 (build-system gnu-build-system)
269 (native-inputs
270 `(("autoconf" ,autoconf)
271 ("automake" ,automake)
272 ("libtool" ,libtool)))
273 (arguments
274 `(#:phases (modify-phases %standard-phases
d10092b8 275 (add-after 'unpack 'autoconf
4ff20605
LG
276 (lambda _
277 (zero? (system* "autoreconf" "-vfi")))))))
278 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
279 (synopsis "Inter-Asterisk-Protocol library")
280 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
281Voice-over-IP (VoIP) communications.")
282 ;; The file 'src/md5.c' is released into the public domain by RSA Data
283 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
284 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
285 ;; covered under the 'GPL'.
286 ;; The package as a whole is distributed under the LGPL 2.0.
974aaf71
LG
287 (license (list license:lgpl2.0
288 license:public-domain
289 license:gpl2+)))))
319ac02b
FF
290
291(define-public seren
292 (package
293 (name "seren")
294 (version "0.0.21")
295 (source (origin
296 (method url-fetch)
297 (uri (string-append "http://holdenc.altervista.org/"
298 "seren/downloads/seren-" version
299 ".tar.gz"))
300 (sha256
301 (base32
302 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
303 (build-system gnu-build-system)
304 (arguments '(#:tests? #f)) ; no "check" target
305 (inputs
306 `(("alsa-lib" ,alsa-lib)
307 ("gmp" ,gmp)
308 ("libogg" ,libogg)
309 ("ncurses" ,ncurses)
310 ("opus" ,opus)))
311 (synopsis "Simple VoIP program to create conferences from the terminal")
312 (description
313 "Seren is a simple VoIP program based on the Opus codec that allows you
314to create a voice conference from the terminal, with up to 10 participants,
315without having to register accounts, exchange emails, or add people to contact
316lists. All you need to join an existing conference is the host name or IP
317address of one of the participants.")
318 (home-page "http://holdenc.altervista.org/seren/")
974aaf71 319 (license license:gpl3+)))
faa29e4b 320
321(define-public mumble
322 (package
323 (name "mumble")
69ec0391 324 (version "1.2.19")
faa29e4b 325 (source (origin
326 (method url-fetch)
327 (uri (string-append "https://mumble.info/snapshot/"
328 name "-" version ".tar.gz"))
329 (sha256
330 (base32
69ec0391 331 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
faa29e4b 332 (modules '((guix build utils)))
333 (snippet
334 `(begin
335 ;; Remove bundled software.
336 (for-each delete-file-recursively '("3rdparty"
337 "speex"
338 "speexbuild"
339 "opus-build"
340 "opus-src"
341 "sbcelt-helper-build"
342 "sbcelt-lib-build"
343 "sbcelt-src"))
344 ;; TODO: Celt is still bundled. It has been merged into Opus
345 ;; and will be removed after 1.3.0.
346 ;; https://github.com/mumble-voip/mumble/issues/1999
347 #t))))
348 (build-system gnu-build-system)
349 (arguments
350 `(#:tests? #f ; no "check" target
351 #:phases
352 (modify-phases %standard-phases
353 (replace 'configure
354 (lambda* (#:key outputs #:allow-other-keys)
355 (zero? (system* "qmake" "main.pro" "-recursive"
356 (string-append "CONFIG+="
357 (string-join
358 (list "no-update"
bd9f8869 359 "no-ice"
faa29e4b 360 "no-embed-qt-translations"
361 "no-bundled-speex"
362 "pch"
363 "no-bundled-opus"
364 "no-celt"
365 "no-alsa"
366 "no-oss"
367 "no-portaudio"
368 "speechd"
369 "no-g15"
370 "no-bonjour"
371 "release")))
372 (string-append "DEFINES+="
373 "PLUGIN_PATH="
374 (assoc-ref outputs "out")
375 "/lib/mumble")))))
376 (add-before 'configure 'fix-libspeechd-include
377 (lambda _
378 (substitute* "src/mumble/TextToSpeech_unix.cpp"
379 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
380 (replace 'install ; install phase does not exist
381 (lambda* (#:key inputs outputs #:allow-other-keys)
382 (let* ((out (assoc-ref outputs "out"))
bd9f8869 383 (etc (string-append out "/etc/murmur"))
384 (dbus (string-append out "/etc/dbus-1/system.d/"))
faa29e4b 385 (bin (string-append out "/bin"))
386 (services (string-append out "/share/services"))
387 (applications (string-append out "/share/applications"))
388 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
389 (man (string-append out "/share/man/man1"))
390 (lib (string-append out "/lib/mumble")))
391 (install-file "release/mumble" bin)
392 (install-file "scripts/mumble-overlay" bin)
393 (install-file "scripts/mumble.protocol" services)
394 (install-file "scripts/mumble.desktop" applications)
395 (install-file "icons/mumble.svg" icons)
396 (install-file "man/mumble-overlay.1" man)
397 (install-file "man/mumble.1" man)
bd9f8869 398 (install-file "release/murmurd" bin)
399 (install-file "scripts/murmur.ini.system" etc)
400 (rename-file (string-append etc "/murmur.ini.system")
401 (string-append etc "/murmur.ini"))
402 (install-file "scripts/murmur.conf" dbus)
403 (install-file "man/murmurd.1" man)
faa29e4b 404 (for-each (lambda (file) (install-file file lib))
405 (find-files "." "\\.so\\."))
406 (for-each (lambda (file) (install-file file lib))
407 (find-files "release/plugins" "\\.so$"))))))))
408 (inputs
409 `(("avahi" ,avahi)
410 ("protobuf" ,protobuf)
411 ("openssl" ,openssl)
412 ("libsndfile" ,libsndfile)
413 ("boost" ,boost)
414 ("opus" ,opus)
415 ("speex" ,speex)
b5a1359d 416 ("speexdsp" ,speexdsp)
faa29e4b 417 ("speech-dispatcher" ,speech-dispatcher)
418 ("libx11" ,libx11)
419 ("libxi" ,libxi)
420 ("qt-4" ,qt-4)
421 ("alsa-lib" ,alsa-lib)
422 ("pulseaudio" ,pulseaudio)))
423 (native-inputs
424 `(("pkg-config" ,pkg-config)))
425 (synopsis "Low-latency, high quality voice chat software")
426 (description
427 "Mumble is an low-latency, high quality voice chat
bd9f8869 428software primarily intended for use while gaming.
429Mumble consists of two applications for separate usage:
430@code{mumble} for the client, and @code{murmur} for the server.")
faa29e4b 431 (home-page "https://wiki.mumble.info/wiki/Main_Page")
432 (license (list license:bsd-3
433 ;; The bundled celt is bsd-2. Remove after 1.3.0.
434 license:bsd-2))))