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