3bab325535d35d32c6b1090bb63d55bbd3d5b096
[feed/telephony.git] / net / freeswitch-stable / Makefile
1 #
2 # Copyright (C) 2017 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # TODO
9 #
10 # - try to use system xmlrpc-c once it compiles again :-)
11
12 include $(TOPDIR)/rules.mk
13
14 PRG_NAME:=freeswitch
15 PKG_NAME:=$(PRG_NAME)-stable
16 PKG_VERSION:=1.6.17
17 PKG_RELEASE:=1
18 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
19
20 PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
21 PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
22 PKG_MD5SUM:=709b3e43362d86b9682a7db14eb344b74362493d68244dfc4e6f40218089d4e1
23
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION)
25
26 # configure fails without libjpeg, but it's only needed for mod_spandsp
27 PKG_BUILD_DEPENDS:= \
28 erlang \
29 libjpeg \
30 python \
31 python-setuptools \
32 swig/host
33
34 # With mod_ssml and mod_rayo enabled the parallel compiles always failed
35 #PKG_BUILD_PARALLEL:=1
36 PKG_INSTALL:=1
37
38 PKG_LICENSE:= \
39 AGPL-3.0 \
40 Apache-2.0 \
41 BSD-2-Clause \
42 BSD-3-Clause \
43 BSD-4-Clause \
44 BSD-like \
45 Beerware \
46 GPL-1.0+ \
47 GPL-2.0 \
48 GPL-2.0+ \
49 GPL-3.0 \
50 ISC \
51 LGPL-2.0+ \
52 LGPL-2.1 \
53 LGPL-2.1+ \
54 MIT/X11 (BSD like) \
55 MPL-1.1 \
56 OpenLDAP \
57 RSA-MD \
58 zlib-acknowledgement
59
60 PKG_LICENSE_FILES:=debian/copyright
61
62 FS_STABLE_DEPS_BASE:= \
63 +FS_STABLE_WITH_PGSQL:libpq \
64 +libopenssl \
65 +libuuid
66
67 FS_STABLE_DEPS:= \
68 $(FS_STABLE_DEPS_BASE) \
69 +FS_STABLE_WITH_FREETYPE:libfreetype \
70 +FS_STABLE_WITH_LIBEDIT:libedit \
71 +FS_STABLE_WITH_ODBC:unixodbc \
72 +FS_STABLE_WITH_PNG:libpng \
73 +libcurl \
74 +libpcre \
75 +libpthread \
76 +librt \
77 +libspeex \
78 +libspeexdsp \
79 +libstdcpp \
80 +libsqlite3 \
81 +zlib
82
83 FS_STABLE_MOD_AVAILABLE:= \
84 abstraction \
85 alsa \
86 amr \
87 amrwb \
88 av \
89 avmd \
90 basic \
91 bert \
92 blacklist \
93 callcenter \
94 cdr_csv \
95 cdr_mongodb \
96 cdr_pg_csv \
97 cdr_sqlite \
98 cidlookup \
99 cluechoo \
100 commands \
101 conference \
102 console \
103 curl \
104 db \
105 dialplan_asterisk \
106 dialplan_xml \
107 dingaling \
108 directory \
109 distributor \
110 dptools \
111 easyroute \
112 enum \
113 erlang_event \
114 esf \
115 esl \
116 event_multicast \
117 event_socket \
118 expr \
119 fifo \
120 format_cdr \
121 fsk \
122 fsv \
123 g723_1 \
124 g729 \
125 graylog2 \
126 h26x \
127 hash \
128 hiredis \
129 httapi \
130 http_cache \
131 isac \
132 json_cdr \
133 kazoo \
134 lcr \
135 ldap \
136 local_stream \
137 logfile \
138 loopback \
139 lua \
140 mp4v \
141 native_file \
142 nibblebill \
143 odbc_cdr \
144 opus \
145 oreka \
146 png \
147 prefix \
148 python \
149 rayo \
150 redis \
151 rss \
152 rtc \
153 rtmp \
154 say_de \
155 say_en \
156 say_es \
157 say_es_ar \
158 say_fa \
159 say_fr \
160 say_he \
161 say_hr \
162 say_hu \
163 say_it \
164 say_ja \
165 say_nl \
166 say_pl \
167 say_pt \
168 say_ru \
169 say_sv \
170 say_th \
171 say_zh \
172 shell_stream \
173 shout \
174 skinny \
175 sms \
176 snapshot \
177 sndfile \
178 snmp \
179 snom \
180 sofia \
181 sonar \
182 spandsp \
183 spy \
184 ssml \
185 stress \
186 syslog \
187 theora \
188 tone_stream \
189 translate \
190 tts_commandline \
191 unimrcp \
192 valet_parking \
193 verto \
194 voicemail \
195 voicemail_ivr \
196 xml_cdr \
197 xml_curl \
198 xml_ldap \
199 xml_rpc \
200 xml_scgi \
201 yaml
202
203 include $(INCLUDE_DIR)/package.mk
204
205 $(call include_mk, python-version.mk)
206 PYTHON_DIR:=$(STAGING_DIR)/usr
207 PYTHON_INC_DIR:=$(PYTHON_DIR)/include/python$(PYTHON_VERSION)
208 PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
209
210 define Package/$(PKG_NAME)/install/bin
211 $(INSTALL_DIR) $(1)/usr/bin
212 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin
213 endef
214
215 define Package/$(PKG_NAME)/install/dir
216 for dir in $$$$(shell cd $(2); find -type d -print | sed 's|^./\?||'); \
217 do \
218 $(INSTALL_DIR) $(1)/$$$$$$$$dir; \
219 done
220 for file in $$$$(shell cd $(2); find -type f -print | sed 's|^./||'); \
221 do \
222 $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \
223 done
224 endef
225
226 define Package/$(PKG_NAME)/install/lib
227 $(INSTALL_DIR) $(1)/usr/lib
228 $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(2).so* $(1)/usr/lib
229 endef
230
231 define Package/$(PKG_NAME)/install/mod
232 $(INSTALL_DIR) $(1)/usr/lib/$(PRG_NAME)/mod
233 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(PRG_NAME)/mod/mod_$(2).so \
234 $(1)/usr/lib/$(PRG_NAME)/mod
235 ifeq ($(2),python)
236 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
237 $(INSTALL_DATA) \
238 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/$(PRG_NAME).py \
239 $(1)$(PYTHON_PKG_DIR)
240 endif
241 endef
242
243 define Package/$(PKG_NAME)/config
244 source "$(SOURCE)/Config.in"
245 endef
246
247 define Package/$(PKG_NAME)/Default
248 SUBMENU:=Telephony
249 SECTION:=net
250 CATEGORY:=Network
251 URL:=https://www.$(PRG_NAME).org
252 endef
253
254 define Package/$(PKG_NAME)
255 $(call Package/$(PKG_NAME)/Default)
256 TITLE:=Open source telephony platform, v$(PKG_VERSION)
257 MENU:=1
258 USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372
259 DEPENDS:=$(FS_STABLE_DEPS)
260 CONFLICTS:=$(PRG_NAME)
261 endef
262
263 define Package/$(PKG_NAME)/description
264 FreeSWITCH is a scalable open source cross-platform telephony platform
265 designed to route and interconnect popular communication protocols
266 using audio, video, text or any other form of media.
267 endef
268
269 define Package/$(PKG_NAME)/conffiles
270 /etc/$(PRG_NAME)
271 /etc/default/$(PRG_NAME)
272 /etc/init.d/$(PRG_NAME)
273 endef
274
275 define Package/$(PKG_NAME)/install
276 $(call Package/$(PKG_NAME)/install/bin,$(1),$(PRG_NAME))
277 $(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME))
278 $(INSTALL_DIR) $(1)/etc/$(PRG_NAME)/tls
279 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/fonts
280 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/grammar
281 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/htdocs
282 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/images
283 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/scripts
284 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/sounds
285 $(INSTALL_DIR) $(1)/etc/default
286 $(INSTALL_CONF) ./files/$(PRG_NAME).default $(1)/etc/default/$(PRG_NAME)
287 $(INSTALL_DIR) $(1)/etc/init.d
288 $(INSTALL_BIN) ./files/$(PRG_NAME).init $(1)/etc/init.d/$(PRG_NAME)
289 ifeq ($(CONFIG_FS_STABLE_WITH_LIBEDIT),)
290 $(SED) '/^ #procd_append_param command -nc -nf$$$$/s/#//' \
291 $(1)/etc/init.d/$(PRG_NAME)
292 endif
293 endef
294
295 define Package/$(PKG_NAME)/postinst
296 #!/bin/sh
297 if [ -z "$${IPKG_INSTROOT}" ]; then
298 # Prevent autostart of $(PRG_NAME)
299 touch /etc/$(PRG_NAME)_disabled
300
301 echo
302 echo "o-------------------------------------------------------------------o"
303 echo "| FreeSWITCH note |"
304 echo "o-------------------------------------------------------------------o"
305 echo "| Edit /etc/default/freeswitch to change basic init configuration. |"
306 echo "o-------------------------------------------------------------=^_^=-o"
307 echo
308 fi
309 exit 0
310 endef
311
312 define Package/$(PKG_NAME)-hotplug
313 $(call Package/$(PKG_NAME)/Default)
314 TITLE:=Hotplug script
315 DEPENDS:=$(PKG_NAME)
316 PKGARCH:=all
317 endef
318
319 define Package/$(PKG_NAME)-hotplug/description
320 This package includes a hotplug script for FreeSWITCH.
321 endef
322
323 define Package/$(PKG_NAME)-hotplug/install
324 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
325 $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \
326 $(1)/etc/hotplug.d/iface/99-$(PRG_NAME)
327 endef
328
329 define Package/$(PKG_NAME)-hotplug/postinst
330 #!/bin/sh
331 if [ -z "$${IPKG_INSTROOT}" ]; then
332 echo
333 echo "o-------------------------------------------------------------------o"
334 echo "| FreeSWITCH hotplug note |"
335 echo "o-------------------------------------------------------------------o"
336 echo "| See /etc/default/freeswitch for hotplug hints. |"
337 echo "o-------------------------------------------------------------=^_^=-o"
338 echo
339 fi
340 exit 0
341 endef
342
343 define Package/$(PKG_NAME)-python-esl
344 $(call Package/$(PKG_NAME)/Default)
345 TITLE:=Python ESL
346 DEPENDS:=$(PKG_NAME) +python-light
347 endef
348
349 define Package/$(PKG_NAME)-python-esl/description
350 This package contains the Python binding for FreeSWITCH's Event Socket
351 Library (ESL).
352 endef
353
354 define Package/$(PKG_NAME)-python-esl/install
355 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
356 $(INSTALL_DATA) \
357 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ESL.py \
358 $(1)$(PYTHON_PKG_DIR)
359 $(INSTALL_BIN) \
360 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/_ESL.so \
361 $(1)$(PYTHON_PKG_DIR)
362 endef
363
364 define Package/$(PKG_NAME)-timezones
365 $(call Package/$(PKG_NAME)/Default)
366 TITLE:=Timezones file
367 DEPENDS:=$(PKG_NAME)
368 PKGARCH:=all
369 endef
370
371 define Package/$(PKG_NAME)-timezones/description
372 This package includes a timezones file for FreeSWITCH.
373 endef
374
375 define Package/$(PKG_NAME)-timezones/install
376 $(INSTALL_DIR) $(1)/usr/share/$(PRG_NAME)/tz
377 $(INSTALL_DATA) \
378 $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/timezones.conf.xml \
379 $(1)/usr/share/$(PRG_NAME)/tz
380 endef
381
382 define Package/$(PKG_NAME)/Example
383 define Package/$(PKG_NAME)-example-$(1)
384 $(call Package/$(PKG_NAME)/Default)
385 TITLE:=Example configuration
386 DEPENDS:=$(PKG_NAME)
387 PKGARCH:=all
388 endef
389 define Package/$(PKG_NAME)-example-$(1)/description
390 This package does not install any configuration for FreeSWITCH into
391 /etc/freeswitch. The system administrator is completely responsible
392 for that directory. If you install one of the example configuration
393 packages, it will install the corresponding sample configuration to
394 /usr/share/freeswitch/conf where you can take a look at it.
395 endef
396 define Package/$(PKG_NAME)-example-$(1)/install
397 $(call Package/$(PKG_NAME)/install/dir,$$(1)/usr/share/$(PRG_NAME)/conf/$(1),$(PKG_BUILD_DIR)/conf/$(1))
398 endef
399 $$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(1)))
400 endef
401
402 define Package/$(PKG_NAME)/Language
403 define Package/$(PKG_NAME)-lang-$(1)
404 $(call Package/$(PKG_NAME)/Default)
405 TITLE:=$(2) language files
406 DEPENDS:=$(PKG_NAME)
407 PKGARCH:=all
408 endef
409 define Package/$(PKG_NAME)-lang-$(1)/description
410 This package includes the $(2) language files for FreeSWITCH.
411 endef
412 define Package/$(PKG_NAME)-lang-$(1)/install
413 $(call Package/$(PKG_NAME)/install/dir,$$(1)/usr/share/$(PRG_NAME)/lang/$(1),$(PKG_BUILD_DIR)/conf/vanilla/lang/$(1))
414 endef
415 $$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(1)))
416 endef
417
418 define Package/$(PKG_NAME)/Module
419 define Package/$(PKG_NAME)-mod-$(1)
420 $(call Package/$(PKG_NAME)/Default)
421 TITLE:=$(2) module
422 DEPENDS:=$(PKG_NAME) $(4)
423 endef
424 define Package/$(PKG_NAME)-mod-$(1)/description
425 $(subst \n,$(newline),$(3))
426 endef
427 define Package/$(PKG_NAME)-mod-$(1)/install
428 $(call Package/$(PKG_NAME)/install/mod,$$(1),$(1))
429 endef
430 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
431 endef
432
433 define Package/$(PKG_NAME)/Util
434 define Package/$(PKG_NAME)-util-$(1)
435 $(call Package/$(PKG_NAME)/Default)
436 TITLE:=$(2) utility
437 DEPENDS:=$(PKG_NAME) $(4)
438 ifeq ($(5),y)
439 PKGARCH:=all
440 endif
441 endef
442 define Package/$(PKG_NAME)-util-$(1)/description
443 $(subst \n,$(newline),$(3))
444 endef
445 define Package/$(PKG_NAME)-util-$(1)/install
446 $(call Package/$(PKG_NAME)/install/bin,$$(1),$(1))
447 endef
448 ifeq ($(1)$(CONFIG_FS_STABLE_WITH_LIBEDIT),fs_cli)
449 define Package/$(PKG_NAME)-util-$(1)/postinst
450 #!/bin/sh
451 if [ -z "$${IPKG_INSTROOT}" ]; then
452 echo
453 echo "o-------------------------------------------------------------------o"
454 echo "| fs_cli note |"
455 echo "o-------------------------------------------------------------------o"
456 echo "| Your FreeSWITCH was compiled without libedit support. Due to an |"
457 echo "| interop issue it's possible that when you try to exit fs_cli with |"
458 echo "| Ctrl-D, you'll see messages flashing by and have to kill fs_cli |"
459 echo "| manually. To avoid this you can either use Ctrl-C instead (fs_cli |"
460 echo "| needs to be started with '-i' for this to work; you could create |"
461 echo "| an appropriate alias in /etc/profile) or type /exit, /quit or |"
462 echo "| /bye. |"
463 echo "o-------------------------------------------------------------=^_^=-o"
464 echo
465 fi
466 exit 0
467 endef
468 endif
469 $$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(1)))
470 endef
471
472 # we neither need host-perl nor host-php
473 CONFIGURE_VARS+= \
474 ac_cv_prog_PERL=false \
475 ac_cv_have_perl=no \
476 ac_cv_prog_PHP=false \
477 ac_cv_have_php=no \
478 ac_cv_prog_PHP_CONFIG=false \
479 ac_cv_have_php_config=no
480
481 # The autoconf variables in this block are OK for both musl and glibc
482 CONFIGURE_VARS+= \
483 ac_cv_file__dev_ptmx=yes \
484 ac_cv_file__dev_urandom=yes \
485 ac_cv_file_dbd_apr_dbd_mysql_c=no \
486 ac_cv_free_null=yes \
487 ac_cv_func_mmap_fixed_mapped=yes \
488 ac_cv_func_pthread_rwlock_init=yes \
489 ac_cv_func_sem_open=yes \
490 ac_cv_have_working_memmove=yes \
491 ac_cv_negative_eai=yes \
492 ac_cv_o_nonblock_inherited=no \
493 ac_cv_struct_rlimit=yes \
494 apr_cv_epoll=yes \
495 apr_cv_gai_addrconfig=yes \
496 apr_cv_mutex_recursive=yes \
497 apr_cv_process_shared_works=yes \
498 apr_cv_pthreads_lib=-lpthread \
499 apr_cv_tcp_nodelay_with_cork=yes \
500 apr_cv_type_rwlock_t=yes
501
502 # Regarding apr_cv_mutex_robust_shared=no see
503 # http://www.openwall.com/lists/musl/2016/11/26/1
504 # _Don't_ remove quotes below!
505 ifeq ($(CONFIG_LIBC),"musl")
506 CONFIGURE_VARS+= \
507 apr_cv_mutex_robust_shared=no \
508 ac_cv_strerror_r_rc_int=yes
509 else
510 CONFIGURE_VARS+= \
511 apr_cv_mutex_robust_shared=yes
512 endif
513
514 # fs_cli
515 CONFIGURE_VARS+= \
516 disable_cc=yes
517
518 CONFIGURE_ARGS+= \
519 --build=$(GNU_HOST_NAME) \
520 --host=$(GNU_TARGET_NAME) \
521 --target=$(GNU_TARGET_NAME) \
522 --prefix=/usr/share/$(PRG_NAME) \
523 --bindir=/usr/bin \
524 --libdir=/usr/lib \
525 --srcdir=$(PKG_BUILD_DIR) \
526 --sysconfdir=/etc \
527 --disable-dependency-tracking \
528 --disable-static \
529 --disable-system-xmlrpc-c \
530 --enable-fhs \
531 --with-cachedir=/tmp/$(PRG_NAME)/cache \
532 --with-certsdir=/etc/$(PRG_NAME)/tls \
533 --with-dbdir=/tmp/$(PRG_NAME)/db \
534 --with-fontsdir=/usr/share/$(PRG_NAME)/fonts \
535 --with-grammardir=/usr/share/$(PRG_NAME)/grammar \
536 --with-htdocsdir=/usr/share/$(PRG_NAME)/htdocs \
537 --with-imagesdir=/usr/share/$(PRG_NAME)/images \
538 --with-logfiledir=/tmp/$(PRG_NAME)/log \
539 --with-modinstdir=/usr/lib/$(PRG_NAME)/mod \
540 --with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
541 --with-rundir=/var/run/$(PRG_NAME) \
542 --with-scriptdir=/usr/share/$(PRG_NAME)/scripts \
543 --with-soundsdir=/usr/share/$(PRG_NAME)/sounds \
544 --with-storagedir=/tmp/$(PRG_NAME)/storage \
545 _python_sysroot="$(STAGING_DIR)" \
546 _python_prefix="/usr" \
547 _python_exec_prefix="/usr" \
548 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBEDIT,core-libedit-support) \
549 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \
550 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \
551 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \
552 $(if $(CONFIG_FS_STABLE_WITH_DEBUG),,--disable-debug) \
553 $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \
554 $(if $(CONFIG_FS_STABLE_WITH_LIBYUV),,--disable-libyuv) \
555 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
556 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
557 $(if $(CONFIG_FS_STABLE_WITH_PGSQL),--enable-core-pgsql-support,--without-pgsql) \
558 $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \
559 $(if $(CONFIG_FS_STABLE_WITH_VPX),,--disable-libvpx)
560
561 define Build/Prepare
562 $(call Build/Prepare/Default)
563 $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
564 $(foreach m,$(FS_STABLE_MOD_AVAILABLE),
565 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
566 $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
567
568 $(SED) 's|^LOCAL_CFLAGS=.*|LOCAL_CFLAGS=-I$(PYTHON_INC_DIR)|' \
569 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
570 $(SED) 's|^LOCAL_LDFLAGS=.*|LOCAL_LDFLAGS=$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)|' \
571 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
572 $(SED) 's|^SITE_DIR=.*|SITE_DIR=$$$$(DESTDIR)$(PYTHON_PKG_DIR)|' \
573 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
574 $(SED)'s|swig2.0|$(STAGING_DIR)/host/bin/swig|' \
575 $(PKG_BUILD_DIR)/libs/esl/python/Makefile
576 $(RM) $(PKG_BUILD_DIR)/libs/esl/python/esl_wrap.cpp
577 $(SED)'s|swig2.0|$(STAGING_DIR)/host/bin/swig|' \
578 $(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
579 $(RM) $(PKG_BUILD_DIR)/src/mod/languages/mod_python/mod_python_wrap.cpp
580 $(SED)'s|^PYTHON_SITE_DIR=.*|PYTHON_SITE_DIR=$(PYTHON_PKG_DIR)|' \
581 $(PKG_BUILD_DIR)/src/mod/languages/mod_python/Makefile.am
582
583 # Hack for mod_unimrcp - it has a build-time dep on mod_sofia
584 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-unimrcp),)
585 ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-sofia),)
586 $(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
587 endif
588 endif
589 endef
590
591 define Build/Configure
592 find $(PKG_BUILD_DIR) -name missing -type f -exec rm {} \;
593 cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./rebootstrap.sh
594 $(call Build/Configure/Default)
595 endef
596
597 define Build/Compile
598 $(call Build/Compile/Default)
599 $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod)
600 endef
601
602 define Build/Install
603 $(call Build/Install/Default)
604 $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod-install)
605 endef
606
607 $(eval $(call BuildPackage,$(PKG_NAME)))
608 $(eval $(call BuildPackage,$(PKG_NAME)-hotplug))
609 $(eval $(call BuildPackage,$(PKG_NAME)-python-esl))
610 $(eval $(call BuildPackage,$(PKG_NAME)-timezones))
611
612 ################################
613 # FreeSWITCH example configs
614 # Params:
615 # 1 - Package subname
616 ################################
617
618 $(eval $(call Package/$(PKG_NAME)/Example,curl))
619 $(eval $(call Package/$(PKG_NAME)/Example,insideout))
620 $(eval $(call Package/$(PKG_NAME)/Example,minimal))
621 $(eval $(call Package/$(PKG_NAME)/Example,rayo))
622 $(eval $(call Package/$(PKG_NAME)/Example,sbc))
623 $(eval $(call Package/$(PKG_NAME)/Example,softphone))
624 $(eval $(call Package/$(PKG_NAME)/Example,testing))
625 $(eval $(call Package/$(PKG_NAME)/Example,vanilla))
626
627 ################################
628 # FreeSWITCH language files
629 # Params:
630 # 1 - Language code
631 # 2 - Language
632 ################################
633
634 $(eval $(call Package/$(PKG_NAME)/Language,de,German))
635 $(eval $(call Package/$(PKG_NAME)/Language,en,English))
636 $(eval $(call Package/$(PKG_NAME)/Language,es,Spanish))
637 $(eval $(call Package/$(PKG_NAME)/Language,fr,French))
638 $(eval $(call Package/$(PKG_NAME)/Language,he,Hebrew))
639 $(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
640 $(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
641 $(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
642
643 ################################
644 # FreeSWITCH modules
645 # Params:
646 # 1 - Package subname
647 # 2 - Package title
648 # 3 - Module description
649 # 4 - Module dependencies
650 ################################
651
652 $(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module provides a way to create new API functions via regex\nrewriting.,))
653 $(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
654 $(eval $(call Package/$(PKG_NAME)/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
655 $(eval $(call Package/$(PKG_NAME)/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
656 $(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @BROKEN))
657 $(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
658 $(eval $(call Package/$(PKG_NAME)/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
659 $(eval $(call Package/$(PKG_NAME)/Module,bert,BERT,Line testing tool.,))
660 $(eval $(call Package/$(PKG_NAME)/Module,blacklist,Blacklist helper,This module provides tools to blacklist callers.,))
661 $(eval $(call Package/$(PKG_NAME)/Module,callcenter,Call center,This module implements Automated Call Distribution queues.,))
662 $(eval $(call Package/$(PKG_NAME)/Module,cdr_csv,CSV CDR,CSV Call Detail Record handler.,))
663 $(eval $(call Package/$(PKG_NAME)/Module,cdr_mongodb,MongoDB CDR,MongoDB Call Detail Record handler.,))
664 $(eval $(call Package/$(PKG_NAME)/Module,cdr_pg_csv,PostgreSQL CDR,PostgreSQL Call Detail Record handler.,@FS_STABLE_WITH_PGSQL))
665 $(eval $(call Package/$(PKG_NAME)/Module,cdr_sqlite,SQLite CDR,SQLite Call Detail Record handler.,))
666 $(eval $(call Package/$(PKG_NAME)/Module,cidlookup,Caller ID lookup,This module provides an API for querying caller ID name and location\ndata.,))
667 $(eval $(call Package/$(PKG_NAME)/Module,cluechoo,Clue Choo,This demo module renders a Clue Choo train on the FreeSWITCH console.,+libncurses))
668 $(eval $(call Package/$(PKG_NAME)/Module,commands,Commands,This module provides miscellaneous API commands.,))
669 $(eval $(call Package/$(PKG_NAME)/Module,conference,Conference,This module provides multi-party conferencing.,))
670 $(eval $(call Package/$(PKG_NAME)/Module,console,Console logger,Allows control over what messages get logged to the console. When\nFreeSWITCH is compiled without libedit support - this is not the\ndefault - mod_console has no effect because the init script starts\nFreeSWITCH with the console disabled to work around an\ninteroperability issue that causes high CPU load.,))
671 $(eval $(call Package/$(PKG_NAME)/Module,curl,cURL,This module provides an API for making HTTP requests with cURL.,))
672 $(eval $(call Package/$(PKG_NAME)/Module,db,DB,This module implements a simple db API with group support. Also can be\nused as a limit db backend.,))
673 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_asterisk,Asterisk dialplan,Asterisk extensions.conf style dialplan parser.,))
674 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_xml,XML dialplan,Standard FreeSWITCH XML dialplan support.,))
675 $(eval $(call Package/$(PKG_NAME)/Module,dingaling,Generic XMPP,Allows FreeSWITCH to be used as a client for XMPP Servers.,))
676 $(eval $(call Package/$(PKG_NAME)/Module,directory,Dial-by-name directory,This module implements a dial-by-name directory IVR.,))
677 $(eval $(call Package/$(PKG_NAME)/Module,distributor,Load distributor,This module implements a mechanism for performing load balancing.,))
678 $(eval $(call Package/$(PKG_NAME)/Module,dptools,Dialplan tools,This module implements basic dialplan tools.,))
679 $(eval $(call Package/$(PKG_NAME)/Module,easyroute,DID routing,This module does destination lookup based on DID.,))
680 $(eval $(call Package/$(PKG_NAME)/Module,enum,ENUM routing,This module implements ENUM support.,+libldns))
681 $(eval $(call Package/$(PKG_NAME)/Module,erlang_event,Erlang event,Erlang event module.,))
682 $(eval $(call Package/$(PKG_NAME)/Module,esf,Multicast,This module adds multi-cast support.,))
683 $(eval $(call Package/$(PKG_NAME)/Module,esl,Single ESL,This module adds an API for generating one-off ESL requests.,))
684 $(eval $(call Package/$(PKG_NAME)/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
685 $(eval $(call Package/$(PKG_NAME)/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
686 $(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,))
687 $(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
688 $(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
689 $(eval $(call Package/$(PKG_NAME)/Module,fsk,FSK,This module adds frequency-shift keying support which can be used to\nsend and receive caller ID.,))
690 $(eval $(call Package/$(PKG_NAME)/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
691 $(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
692 $(eval $(call Package/$(PKG_NAME)/Module,g729,G.729 passthrough,G.729 codec passthrough.,))
693 $(eval $(call Package/$(PKG_NAME)/Module,graylog2,Graylog2 logger,GELF logger for Graylog2 and Logstash.,))
694 $(eval $(call Package/$(PKG_NAME)/Module,h26x,H.26x passthrough,H.26x video codec passthrough.,))
695 $(eval $(call Package/$(PKG_NAME)/Module,hash,Hash,This module provides a key-value in-memory datastore. Usable as a\nlimit backend.,))
696 $(eval $(call Package/$(PKG_NAME)/Module,hiredis,Redis client,This module provides a mechanism to use Redis as a datastore.,libhiredis))
697 $(eval $(call Package/$(PKG_NAME)/Module,httapi,HT-TAPI,This module provides an API for controlling the switch by responding\nto HTTP requests.,))
698 $(eval $(call Package/$(PKG_NAME)/Module,http_cache,HTTP GET with caching,This module provides an API for making HTTP GET requests where the\nresult is cached.,))
699 $(eval $(call Package/$(PKG_NAME)/Module,isac,iSAC,iSAC codec support.,))
700 $(eval $(call Package/$(PKG_NAME)/Module,json_cdr,JSON CDR,JSON-based Call Detail Record handler.,))
701 $(eval $(call Package/$(PKG_NAME)/Module,kazoo,Kazoo,Kazoo module for FreeSWITCH.,))
702 $(eval $(call Package/$(PKG_NAME)/Module,lcr,LCR,This module adds a facility for least-cost routing.,))
703 $(eval $(call Package/$(PKG_NAME)/Module,ldap,LDAP,LDAP module for FreeSWITCH.,+libopenldap))
704 $(eval $(call Package/$(PKG_NAME)/Module,local_stream,Local stream,Connects multiple channels to a looped stream.,))
705 $(eval $(call Package/$(PKG_NAME)/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
706 $(eval $(call Package/$(PKG_NAME)/Module,loopback,Loopback,A loopback channel driver.,))
707 $(eval $(call Package/$(PKG_NAME)/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
708 $(eval $(call Package/$(PKG_NAME)/Module,mp4v,MP4 video passthrough,MP4 video passthrough..,))
709 $(eval $(call Package/$(PKG_NAME)/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
710 $(eval $(call Package/$(PKG_NAME)/Module,nibblebill,Nibblebill,This module allows for real-time accounting of a cash balance and\nusing that information for call routing.,))
711 $(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
712 $(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus))
713 $(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,))
714 $(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,))
715 $(eval $(call Package/$(PKG_NAME)/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
716 $(eval $(call Package/$(PKG_NAME)/Module,python,Python,Python support module.,+python-light))
717 $(eval $(call Package/$(PKG_NAME)/Module,rayo,Rayo,Rayo/XMPP 3PCC server for FreeSWITCH.,+$(PKG_NAME)-mod-ssml))
718 $(eval $(call Package/$(PKG_NAME)/Module,redis,Redis limit backend,This module provides a mechanism to use Redis as a limit backend data\nstore.,))
719 $(eval $(call Package/$(PKG_NAME)/Module,rss,RSS,Parses and reads XML based RSS feeds and reads the entries aloud via a TTS engine.,))
720 $(eval $(call Package/$(PKG_NAME)/Module,rtc,Media streaming,Media streaming as used by WebRTC and mod_verto.,))
721 $(eval $(call Package/$(PKG_NAME)/Module,rtmp,RTMP endpoint,RTMP endpoint support. Allows FreeSWITCH to be used from RTMP clients.,))
722 $(eval $(call Package/$(PKG_NAME)/Module,say_de,German Say,Uses prerecorded sounds to read or say various things.,))
723 $(eval $(call Package/$(PKG_NAME)/Module,say_en,English Say,Uses prerecorded sounds to read or say various things.,))
724 $(eval $(call Package/$(PKG_NAME)/Module,say_es,Spanish Say,Uses prerecorded sounds to read or say various things.,))
725 $(eval $(call Package/$(PKG_NAME)/Module,say_es_ar,Argentinian Spanish Say,Uses prerecorded sounds to read or say various things.,))
726 $(eval $(call Package/$(PKG_NAME)/Module,say_fa,Persian Say,Uses prerecorded sounds to read or say various things.,))
727 $(eval $(call Package/$(PKG_NAME)/Module,say_fr,French Say,Uses prerecorded sounds to read or say various things.,))
728 $(eval $(call Package/$(PKG_NAME)/Module,say_he,Hebrew Say,Uses prerecorded sounds to read or say various things.,))
729 $(eval $(call Package/$(PKG_NAME)/Module,say_hr,Croatian Say,Uses prerecorded sounds to read or say various things.,))
730 $(eval $(call Package/$(PKG_NAME)/Module,say_hu,Hungarian Say,Uses prerecorded sounds to read or say various things.,))
731 $(eval $(call Package/$(PKG_NAME)/Module,say_it,Italian Say,Uses prerecorded sounds to read or say various things.,))
732 $(eval $(call Package/$(PKG_NAME)/Module,say_ja,Japanese Say,Uses prerecorded sounds to read or say various things.,))
733 $(eval $(call Package/$(PKG_NAME)/Module,say_nl,Dutch Say,Uses prerecorded sounds to read or say various things.,))
734 $(eval $(call Package/$(PKG_NAME)/Module,say_pl,Polish Say,Uses prerecorded sounds to read or say various things.,))
735 $(eval $(call Package/$(PKG_NAME)/Module,say_pt,Portuguese Say,Uses prerecorded sounds to read or say various things.,))
736 $(eval $(call Package/$(PKG_NAME)/Module,say_ru,Russian Say,Uses prerecorded sounds to read or say various things.,))
737 $(eval $(call Package/$(PKG_NAME)/Module,say_sv,Swedish Say,Uses prerecorded sounds to read or say various things.,))
738 $(eval $(call Package/$(PKG_NAME)/Module,say_th,Thai Say,Uses prerecorded sounds to read or say various things.,))
739 $(eval $(call Package/$(PKG_NAME)/Module,say_zh,Chinese Say,Uses prerecorded sounds to read or say various things.,))
740 $(eval $(call Package/$(PKG_NAME)/Module,shell_stream,Shell stream,Allows to stream audio from an arbitrary shell command.,))
741 $(eval $(call Package/$(PKG_NAME)/Module,shout,Shout,Allows to stream audio from MP3s or Shoutcast streams.,+lame-lib +libmpg123 +libshout))
742 $(eval $(call Package/$(PKG_NAME)/Module,skinny,Skinny,Skinny Call Control Protocol endpoint support.,))
743 $(eval $(call Package/$(PKG_NAME)/Module,sms,SMS,This module provides an abstract facility for interfacing with SMS\nsystems.,))
744 $(eval $(call Package/$(PKG_NAME)/Module,snapshot,Snapshot,This module can record a sliding window of audio and take snapshots\nto disk.,))
745 $(eval $(call Package/$(PKG_NAME)/Module,sndfile,Soundfile,Adds sound format support via libsndfile.,+libsndfile))
746 $(eval $(call Package/$(PKG_NAME)/Module,snmp,SNMP,An SNMP stats reporter.,+libnetsnmp))
747 $(eval $(call Package/$(PKG_NAME)/Module,snom,SNOM,This module implements features specific to SNOM phones.,))
748 $(eval $(call Package/$(PKG_NAME)/Module,sofia,Sofia SIP,SIP module.,))
749 $(eval $(call Package/$(PKG_NAME)/Module,sonar,Sonar,This module measures the latency on an audio link by sending audible\naudio sonar pings.,))
750 $(eval $(call Package/$(PKG_NAME)/Module,spandsp,SpanDSP,This module implements SpanDSP fax. It includes DSP and codec\nfunctionality.,+libjpeg +liblzma))
751 $(eval $(call Package/$(PKG_NAME)/Module,spy,User Spy,This module adds the ability to monitor the audio of a channel.,))
752 $(eval $(call Package/$(PKG_NAME)/Module,ssml,SSML,mod_ssml is a FreeSWITCH module that renders SSML into audio. This\nmodule requires a text-to-speech module for speech synthesis.,))
753 $(eval $(call Package/$(PKG_NAME)/Module,stress,Stress,This module attempts to detect voice stress on an audio channel.,))
754 $(eval $(call Package/$(PKG_NAME)/Module,syslog,Syslog logger,Logs FreeSWITCH output to the syslog.,))
755 $(eval $(call Package/$(PKG_NAME)/Module,theora,Theora passthrough,Theora video codec passthrough.,))
756 $(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation stream.,))
757 $(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
758 $(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
759 $(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
760 $(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
761 $(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
762 $(eval $(call Package/$(PKG_NAME)/Module,voicemail,Voicemail,This module provides a voicemail system.,))
763 $(eval $(call Package/$(PKG_NAME)/Module,voicemail_ivr,Voicemail IVR,This module provides an extensible voicemail IVR system.,))
764 $(eval $(call Package/$(PKG_NAME)/Module,xml_cdr,XML CDR,XML Call Detail Record handler.,))
765 $(eval $(call Package/$(PKG_NAME)/Module,xml_curl,XML cURL,Provides an XML cURL interfaces to pull dynamic XML configuration for\nFreeSWITCH over HTTP.,))
766 $(eval $(call Package/$(PKG_NAME)/Module,xml_ldap,XML LDAP,LDAP XML gateway.,+libopenldap))
767 $(eval $(call Package/$(PKG_NAME)/Module,xml_rpc,XML RPC,Allows using the webapi to control FreeSWITCH.,))
768 $(eval $(call Package/$(PKG_NAME)/Module,xml_scgi,XML SCGI,SCGI XML Gateway.,))
769 $(eval $(call Package/$(PKG_NAME)/Module,yaml,YAML,YAML language module.,+libyaml))
770
771 ################################
772 # FreeSWITCH utilities
773 # Params:
774 # 1 - Package subname
775 # 2 - Package title
776 # 3 - Utility description
777 # 4 - Utility dependencies
778 # 5 - Utility is a script (y/n)
779 ################################
780
781 $(eval $(call Package/$(PKG_NAME)/Util,fs_cli,CLI,The fs_cli program is a Command-Line Interface that allows a user to\nconnect to a FreeSWITCH instance running on the local or a remote\nsystem.,$(FS_STABLE_DEPS_BASE) +FS_STABLE_WITH_LIBEDIT:libedit,n))
782 $(eval $(call Package/$(PKG_NAME)/Util,fs_encode,Sound file conversion,Format conversion of sound files so the result can be used by\nmod_native_file.,$(FS_STABLE_DEPS) +$(PKG_NAME)-mod-native_file +$(PKG_NAME)-mod-sndfile +$(PKG_NAME)-mod-spandsp,n))
783 $(eval $(call Package/$(PKG_NAME)/Util,fs_ivrd,IVR daemon,The FreeSWITCH IVR daemon is an abstraction layer that sits on top of\nthe ESL. The basic idea is that the ivrd will allow the user to have\na STDIN/STDOUT interface for simple call control.,$(FS_STABLE_DEPS_BASE),n))
784 $(eval $(call Package/$(PKG_NAME)/Util,gentls_cert,TLS certificate,Can be used to create TLS certificates and setup CAs.,+openssl-util,y))
785 $(eval $(call Package/$(PKG_NAME)/Util,tone2wav,Sound file generation,Generates a sound file from a teletone script. The output can be in\nany format that is supported by libsndfile.,$(FS_STABLE_DEPS) +$(PKG_NAME)-mod-sndfile,n))