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