freeswitch-stable: Add more 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 include $(TOPDIR)/rules.mk
9
10 PRG_NAME:=freeswitch
11 PKG_NAME:=$(PRG_NAME)-stable
12 PKG_VERSION:=1.6.18
13 PKG_RELEASE:=1
14 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
15
16 PKG_SOURCE:=$(PRG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=https://files.$(PRG_NAME).org/releases/$(PRG_NAME)
18 PKG_HASH:=ac1b32f61e5c35680c5a2d6f145bc480cf26e6527af07d8b8b9fa2d5280252cd
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PRG_NAME)-$(PKG_VERSION)
21
22 # configure fails without libjpeg, but it's only needed for mod_spandsp
23 PKG_BUILD_DEPENDS:= \
24 libjpeg \
25 perl/host \
26 python/host
27
28 # With mod_ssml and mod_rayo enabled the parallel compiles always failed
29 #PKG_BUILD_PARALLEL:=1
30 PKG_INSTALL:=1
31
32 PKG_LICENSE:= \
33 AGPL-3.0 \
34 Apache-2.0 \
35 BSD-2-Clause \
36 BSD-3-Clause \
37 BSD-4-Clause \
38 BSD-like \
39 Beerware \
40 GPL-1.0+ \
41 GPL-2.0 \
42 GPL-2.0+ \
43 GPL-3.0 \
44 ISC \
45 LGPL-2.0+ \
46 LGPL-2.1 \
47 LGPL-2.1+ \
48 MIT/X11 (BSD like) \
49 MPL-1.1 \
50 OpenLDAP \
51 RSA-MD \
52 zlib-acknowledgement
53
54 PKG_LICENSE_FILES:=debian/copyright
55
56 FS_STABLE_PREFIX_DIR:=/usr/share/$(PRG_NAME)
57
58 FS_STABLE_BIN_DIR:=/usr/bin
59 FS_STABLE_EXAMPLES_DIR:=$(FS_STABLE_PREFIX_DIR)/examples
60 FS_STABLE_FONTS_DIR:=$(FS_STABLE_PREFIX_DIR)/fonts
61 FS_STABLE_GRAMMAR_DIR:=$(FS_STABLE_PREFIX_DIR)/grammar
62 FS_STABLE_HTDOCS_DIR:=$(FS_STABLE_PREFIX_DIR)/htdocs
63 FS_STABLE_IMAGES_DIR:=$(FS_STABLE_PREFIX_DIR)/images
64 FS_STABLE_INCLUDES_DIR:=/usr/include/$(PRG_NAME)
65 FS_STABLE_LANG_DIR:=$(FS_STABLE_PREFIX_DIR)/lang
66 FS_STABLE_LIB_DIR:=/usr/lib
67 FS_STABLE_MOD_DIR:=$(FS_STABLE_LIB_DIR)/$(PRG_NAME)/mod
68 FS_STABLE_PKGCONFIG_DIR:=$(FS_STABLE_LIB_DIR)/pkgconfig
69 FS_STABLE_SCRIPTS_DIR:=$(FS_STABLE_PREFIX_DIR)/scripts
70 FS_STABLE_SOUNDS_DIR:=$(FS_STABLE_PREFIX_DIR)/sounds
71 FS_STABLE_SYSCONF_DIR:=/etc
72 FS_STABLE_TLS_DIR:=$(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)/tls
73 FS_STABLE_TZ_DIR:=$(FS_STABLE_PREFIX_DIR)/tz
74
75 FS_STABLE_MOD_AVAILABLE:= \
76 abstraction \
77 alsa \
78 amr \
79 amrwb \
80 av \
81 avmd \
82 b64 \
83 basic \
84 bert \
85 blacklist \
86 callcenter \
87 cdr_csv \
88 cdr_mongodb \
89 cdr_pg_csv \
90 cdr_sqlite \
91 cidlookup \
92 clearmode \
93 cluechoo \
94 commands \
95 conference \
96 console \
97 curl \
98 cv \
99 dahdi_codec \
100 db \
101 dialplan_asterisk \
102 dialplan_directory \
103 dialplan_xml \
104 dingaling \
105 directory \
106 distributor \
107 dptools \
108 easyroute \
109 enum \
110 erlang_event \
111 esf \
112 esl \
113 event_multicast \
114 event_socket \
115 event_test \
116 event_zmq \
117 expr \
118 fifo \
119 format_cdr \
120 fsk \
121 fsv \
122 g723_1 \
123 g729 \
124 graylog2 \
125 h26x \
126 hash \
127 hiredis \
128 httapi \
129 http_cache \
130 isac \
131 json_cdr \
132 kazoo \
133 lcr \
134 ldap \
135 local_stream \
136 logfile \
137 loopback \
138 lua \
139 mp4v \
140 native_file \
141 nibblebill \
142 odbc_cdr \
143 opus \
144 oreka \
145 perl \
146 png \
147 pocketsphinx \
148 portaudio \
149 portaudio_stream \
150 posix_timer \
151 prefix \
152 python \
153 radius_cdr \
154 random \
155 rayo \
156 redis \
157 rss \
158 rtc \
159 rtmp \
160 say_de \
161 say_en \
162 say_es \
163 say_es_ar \
164 say_fa \
165 say_fr \
166 say_he \
167 say_hr \
168 say_hu \
169 say_it \
170 say_ja \
171 say_nl \
172 say_pl \
173 say_pt \
174 say_ru \
175 say_sv \
176 say_th \
177 say_zh \
178 shell_stream \
179 shout \
180 skinny \
181 sms \
182 snapshot \
183 sndfile \
184 snmp \
185 snom \
186 sofia \
187 sonar \
188 spandsp \
189 spy \
190 ssml \
191 stress \
192 syslog \
193 theora \
194 tone_stream \
195 translate \
196 tts_commandline \
197 unimrcp \
198 v8 \
199 valet_parking \
200 verto \
201 vmd \
202 voicemail \
203 voicemail_ivr \
204 xml_cdr \
205 xml_curl \
206 xml_ldap \
207 xml_rpc \
208 xml_scgi \
209 yaml \
210 yuv
211
212 include $(INCLUDE_DIR)/package.mk
213
214 FS_STABLE_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
215 FS_STABLE_PYTHON_FEED:=$(TOPDIR)/feeds/packages/lang/python
216
217 include $(FS_STABLE_PERL_FEED)/perlmod.mk
218 include $(FS_STABLE_PYTHON_FEED)/files/python-host.mk
219
220 FS_STABLE_PERL_LIBS:=$(shell grep "^libs=" \
221 $(FS_STABLE_PERL_FEED)/files/base.config | \
222 sed "s/^libs=//;s/'//g")
223
224 FS_STABLE_PYTHON_SITE_DIR:=$(FS_STABLE_LIB_DIR)/python$(PYTHON_VERSION)/site-packages
225
226 define Download/files
227 define Download/$(1)
228 FILE:=$(2)
229 URL:=$(3)
230 HASH:=$(4)
231 endef
232 $$(eval $$(call Download,$(1)))
233 endef
234
235 define Package/$(PKG_NAME)/install/bin
236 $(INSTALL_DIR) $(1)$(FS_STABLE_BIN_DIR)
237 $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_BIN_DIR)/$(2) \
238 $(1)$(FS_STABLE_BIN_DIR)
239 endef
240
241 define Package/$(PKG_NAME)/install/dir
242 if [ -d $(2) ]; then $(INSTALL_DIR) $(1); fi
243 for dir in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type d -print | sed 's|^./\?||'); \
244 do \
245 $(INSTALL_DIR) $(1)/$$$$$$$$dir; \
246 done
247 for file in $$$$(shell [ -d $(2) ] && cd $(2) && $(FIND) -type f -print | sed 's|^./||'); \
248 do \
249 $(INSTALL_DATA) $(2)/$$$$$$$$file $(1)/$$$$$$$$file; \
250 done
251 endef
252
253 define Package/$(PKG_NAME)/install/lib
254 $(INSTALL_DIR) $(1)$(FS_STABLE_LIB_DIR)
255 $(CP) $(PKG_INSTALL_DIR)$(FS_STABLE_LIB_DIR)/$(2).so* \
256 $(1)$(FS_STABLE_LIB_DIR)
257 endef
258
259 define Package/$(PKG_NAME)/install/mod
260 $(INSTALL_DIR) $(1)$(FS_STABLE_MOD_DIR)
261 $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(FS_STABLE_MOD_DIR)/mod_$(2).so \
262 $(1)$(FS_STABLE_MOD_DIR)
263 endef
264
265 define Package/$(PKG_NAME)/config
266 source "$(SOURCE)/Config.in"
267 endef
268
269 define Package/$(PKG_NAME)/Default
270 SUBMENU:=Telephony
271 SECTION:=net
272 CATEGORY:=Network
273 URL:=https://www.$(PRG_NAME).org
274 endef
275
276 define Package/$(PKG_NAME)
277 $(call Package/$(PKG_NAME)/Default)
278 TITLE:=Open source telephony platform, v$(PKG_VERSION)
279 MENU:=1
280 USERID:=$(PRG_NAME)=372:$(PRG_NAME)=372
281 DEPENDS:= \
282 +FS_STABLE_WITH_FREETYPE:libfreetype \
283 +FS_STABLE_WITH_LIBEDIT:libedit \
284 +FS_STABLE_WITH_ODBC:unixodbc \
285 +FS_STABLE_WITH_PGSQL:libpq \
286 +FS_STABLE_WITH_PNG:libpng \
287 +libcurl \
288 +libopenssl \
289 +libpcre \
290 +libpthread \
291 +librt \
292 +libspeex \
293 +libspeexdsp \
294 +libsqlite3 \
295 +libstdcpp \
296 +libuuid \
297 +zlib
298 CONFLICTS:=$(PRG_NAME)
299 endef
300
301 define Package/$(PKG_NAME)/description
302 FreeSWITCH is a scalable open source cross-platform telephony platform
303 designed to route and interconnect popular communication protocols
304 using audio, video, text or any other form of media.
305 endef
306
307 define Package/$(PKG_NAME)/conffiles
308 $(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)
309 $(FS_STABLE_SYSCONF_DIR)/default/$(PRG_NAME)
310 $(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
311 endef
312
313 define Package/$(PKG_NAME)/install
314 $(call Package/$(PKG_NAME)/install/bin,$(1),$(PRG_NAME))
315 $(call Package/$(PKG_NAME)/install/lib,$(1),lib$(PRG_NAME))
316 $(INSTALL_DIR) $(1)$(FS_STABLE_FONTS_DIR)
317 $(INSTALL_DIR) $(1)$(FS_STABLE_GRAMMAR_DIR)
318 $(INSTALL_DIR) $(1)$(FS_STABLE_HTDOCS_DIR)
319 $(INSTALL_DIR) $(1)$(FS_STABLE_IMAGES_DIR)
320 $(INSTALL_DIR) $(1)$(FS_STABLE_SCRIPTS_DIR)
321 $(INSTALL_DIR) $(1)$(FS_STABLE_SOUNDS_DIR)
322 $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/default
323 $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/init.d
324 $(INSTALL_DIR) $(1)$(FS_STABLE_TLS_DIR)
325 $(INSTALL_BIN) ./files/$(PRG_NAME).init \
326 $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
327 $(INSTALL_CONF) ./files/$(PRG_NAME).default \
328 $(1)$(FS_STABLE_SYSCONF_DIR)/default/$(PRG_NAME)
329 ifeq ($(CONFIG_FS_STABLE_WITH_LIBEDIT),)
330 $(SED) '/^ #procd_append_param command -nc -nf$$$$/s/#//' \
331 $(1)$(FS_STABLE_SYSCONF_DIR)/init.d/$(PRG_NAME)
332 endif
333 endef
334
335 define Package/$(PKG_NAME)/postinst
336 #!/bin/sh
337 if [ -z "$${IPKG_INSTROOT}" ]; then
338 # Prevent autostart of $(PRG_NAME)
339 touch $(FS_STABLE_SYSCONF_DIR)/$(PRG_NAME)_disabled
340
341 echo
342 echo "o-------------------------------------------------------------------o"
343 echo "| FreeSWITCH note |"
344 echo "o-------------------------------------------------------------------o"
345 echo "| Edit /etc/default/freeswitch to change basic init configuration. |"
346 echo "o-------------------------------------------------------------=^_^=-o"
347 echo
348 fi
349 exit 0
350 endef
351
352 define Package/$(PKG_NAME)-misc-hotplug
353 $(call Package/$(PKG_NAME)/Default)
354 TITLE:=Hotplug script
355 DEPENDS:=$(PKG_NAME)
356 PKGARCH:=all
357 endef
358
359 define Package/$(PKG_NAME)-misc-hotplug/description
360 This package includes a hotplug script for FreeSWITCH.
361 endef
362
363 define Package/$(PKG_NAME)-misc-hotplug/install
364 $(INSTALL_DIR) $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface
365 $(INSTALL_BIN) ./files/$(PRG_NAME).hotplug \
366 $(1)$(FS_STABLE_SYSCONF_DIR)/hotplug.d/iface/99-$(PRG_NAME)
367 endef
368
369 define Package/$(PKG_NAME)-misc-hotplug/postinst
370 #!/bin/sh
371 if [ -z "$${IPKG_INSTROOT}" ]; then
372 echo
373 echo "o-------------------------------------------------------------------o"
374 echo "| FreeSWITCH hotplug note |"
375 echo "o-------------------------------------------------------------------o"
376 echo "| See /etc/default/freeswitch for hotplug hints. |"
377 echo "o-------------------------------------------------------------=^_^=-o"
378 echo
379 fi
380 exit 0
381 endef
382
383 define Package/$(PKG_NAME)-misc-perl-esl
384 $(call Package/$(PKG_NAME)/Default)
385 TITLE:=Perl ESL
386 DEPENDS:=$(PKG_NAME) \
387 +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-autoloader \
388 +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-data \
389 +PACKAGE_$(PKG_NAME)-misc-perl-esl:perlbase-dynaloader \
390 @PERL_THREADS
391 endef
392
393 define Package/$(PKG_NAME)-misc-perl-esl/description
394 This package contains the Perl binding for FreeSWITCH's Event Socket
395 Library (ESL).
396 endef
397
398 define Package/$(PKG_NAME)-misc-perl-esl/install
399 $(INSTALL_DIR) $(1)$(PERL_SITELIB)/ESL
400 $(INSTALL_DIR) $(1)$(PERL_SITELIB)/auto/ESL
401 $(INSTALL_BIN) \
402 $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.so \
403 $(1)$(PERL_SITELIB)/auto/ESL
404 $(INSTALL_DATA) \
405 $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL.pm \
406 $(1)$(PERL_SITELIB)
407 $(INSTALL_DATA) \
408 $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/Dispatch.pm \
409 $(1)$(PERL_SITELIB)/ESL
410 $(INSTALL_DATA) \
411 $(PKG_INSTALL_DIR)$(PERL_SITELIB)/ESL/IVR.pm \
412 $(1)$(PERL_SITELIB)/ESL
413 endef
414
415 define Package/$(PKG_NAME)-misc-python-esl
416 $(call Package/$(PKG_NAME)/Default)
417 TITLE:=Python ESL
418 DEPENDS:=$(PKG_NAME) +PACKAGE_$(PKG_NAME)-misc-python-esl:python-light
419 endef
420
421 define Package/$(PKG_NAME)-misc-python-esl/description
422 This package contains the Python binding for FreeSWITCH's Event Socket
423 Library (ESL).
424 endef
425
426 define Package/$(PKG_NAME)-misc-python-esl/install
427 $(INSTALL_DIR) $(1)$(FS_STABLE_PYTHON_SITE_DIR)
428 $(INSTALL_BIN) \
429 $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/_ESL.so \
430 $(1)$(FS_STABLE_PYTHON_SITE_DIR)
431 $(INSTALL_DATA) \
432 $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/ESL.py \
433 $(1)$(FS_STABLE_PYTHON_SITE_DIR)
434 endef
435
436 define Package/$(PKG_NAME)-misc-timezones
437 $(call Package/$(PKG_NAME)/Default)
438 TITLE:=Timezones file
439 DEPENDS:=$(PKG_NAME)
440 PKGARCH:=all
441 endef
442
443 define Package/$(PKG_NAME)-misc-timezones/description
444 This package includes a timezones file for FreeSWITCH.
445 endef
446
447 define Package/$(PKG_NAME)-misc-timezones/install
448 $(INSTALL_DIR) $(1)$(FS_STABLE_TZ_DIR)
449 $(INSTALL_DATA) \
450 $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/timezones.conf.xml \
451 $(1)$(FS_STABLE_TZ_DIR)
452 endef
453
454 define Package/$(PKG_NAME)/Example
455 define Package/$(PKG_NAME)-example-$(1)
456 $(call Package/$(PKG_NAME)/Default)
457 TITLE:=Example configuration
458 DEPENDS:=$(PKG_NAME)
459 PKGARCH:=all
460 endef
461 define Package/$(PKG_NAME)-example-$(1)/description
462 This package does not install any configuration for FreeSWITCH into
463 /etc/freeswitch. The system administrator is completely responsible
464 for that directory. If you install one of the example configuration
465 packages, it will install the corresponding sample configuration to
466 /usr/share/freeswitch/examples where you can take a look at it.
467 endef
468 define Package/$(PKG_NAME)-example-$(1)/install
469 $(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/$(1),$(PKG_BUILD_DIR)/conf/$(1))
470 endef
471 $$(eval $$(call BuildPackage,$(PKG_NAME)-example-$(1)))
472 endef
473
474 define Package/$(PKG_NAME)/Language
475 define Package/$(PKG_NAME)-lang-$(1)
476 $(call Package/$(PKG_NAME)/Default)
477 TITLE:=$(2) language files
478 DEPENDS:=$(PKG_NAME)
479 PKGARCH:=all
480 endef
481 define Package/$(PKG_NAME)-lang-$(1)/description
482 This package includes the $(2) language files for FreeSWITCH.
483 endef
484 define Package/$(PKG_NAME)-lang-$(1)/install
485 $(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_LANG_DIR)/$(1),$(PKG_BUILD_DIR)/conf/vanilla/lang/$(1))
486 endef
487 $$(eval $$(call BuildPackage,$(PKG_NAME)-lang-$(1)))
488 endef
489
490 # The next package generator is for miscellaneous files that only
491 # require being copied from PKG_INSTALL_DIR to the ipkg.
492 define Package/$(PKG_NAME)/Misc
493 define Package/$(PKG_NAME)-$(1)
494 $(call Package/$(PKG_NAME)/Default)
495 TITLE:=$(2)
496 DEPENDS:=$(PKG_NAME)
497 ifeq ($(6),y)
498 PKGARCH:=all
499 endif
500 endef
501 define Package/$(PKG_NAME)-$(1)/description
502 $(subst \n,$(newline),$(3))
503 endef
504 define Package/$(PKG_NAME)-$(1)/install
505 $(call Package/$(PKG_NAME)/install/dir,$$(1)$(5),$(PKG_INSTALL_DIR)$(4))
506 endef
507 $$(eval $$(call BuildPackage,$(PKG_NAME)-$(1)))
508 endef
509
510 define Package/$(PKG_NAME)/Module
511 define Package/$(PKG_NAME)-mod-$(1)
512 $(call Package/$(PKG_NAME)/Default)
513 TITLE:=$(2) module
514 DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-mod-$(1):%,$(4))
515 endef
516 define Package/$(PKG_NAME)-mod-$(1)/description
517 $(subst \n,$(newline),$(3))
518 endef
519 define Package/$(PKG_NAME)-mod-$(1)/install
520 $(call Package/$(PKG_NAME)/install/mod,$$(1),$(1))
521 ifeq ($(CONFIG_FS_STABLE_WITH_MODCONF),y)
522 $(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/mod_$(1),$(PKG_BUILD_DIR)/src/mod/*/mod_$(1)/conf)
523 endif
524 ifeq ($(1),perl)
525 $(INSTALL_DIR) $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
526 $(INSTALL_BIN) \
527 $(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).so \
528 $$(1)$(PERL_SITELIB)/auto/$(PRG_NAME)
529 $(INSTALL_DATA) \
530 $(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).pm \
531 $$(1)$(PERL_SITELIB)
532 endif
533 ifeq ($(1),python)
534 $(INSTALL_DIR) $$(1)$(FS_STABLE_PYTHON_SITE_DIR)
535 $(INSTALL_DATA) \
536 $(PKG_INSTALL_DIR)$(FS_STABLE_PYTHON_SITE_DIR)/$(PRG_NAME).py \
537 $$(1)$(FS_STABLE_PYTHON_SITE_DIR)
538 endif
539 endef
540 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
541 endef
542
543 define Package/$(PKG_NAME)/Util
544 define Package/$(PKG_NAME)-util-$(1)
545 $(call Package/$(PKG_NAME)/Default)
546 TITLE:=$(2) utility
547 DEPENDS:=$(PKG_NAME) $(patsubst +%,+PACKAGE_$(PKG_NAME)-util-$(1):%,$(4))
548 ifeq ($(5),y)
549 PKGARCH:=all
550 endif
551 endef
552 define Package/$(PKG_NAME)-util-$(1)/description
553 $(subst \n,$(newline),$(3))
554 endef
555 define Package/$(PKG_NAME)-util-$(1)/install
556 $(call Package/$(PKG_NAME)/install/bin,$$(1),$(1))
557 endef
558 ifeq ($(1)$(CONFIG_FS_STABLE_WITH_LIBEDIT),fs_cli)
559 define Package/$(PKG_NAME)-util-$(1)/postinst
560 #!/bin/sh
561 if [ -z "$${IPKG_INSTROOT}" ]; then
562 echo
563 echo "o-------------------------------------------------------------------o"
564 echo "| fs_cli note |"
565 echo "o-------------------------------------------------------------------o"
566 echo "| Your FreeSWITCH was compiled without libedit support. Due to an |"
567 echo "| interop issue it's possible that when you try to exit fs_cli with |"
568 echo "| Ctrl-D, you'll see messages flashing by and have to kill fs_cli |"
569 echo "| manually. To avoid this you can either use Ctrl-C instead (fs_cli |"
570 echo "| needs to be started with '-i' for this to work; you could create |"
571 echo "| an appropriate alias in /etc/profile) or type /exit, /quit or |"
572 echo "| /bye. |"
573 echo "o-------------------------------------------------------------=^_^=-o"
574 echo
575 fi
576 exit 0
577 endef
578 endif
579 $$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(1)))
580 endef
581
582 CONFIGURE_ARGS+= \
583 --build=$(GNU_HOST_NAME) \
584 --host=$(GNU_TARGET_NAME) \
585 --target=$(GNU_TARGET_NAME) \
586 --prefix=$(FS_STABLE_PREFIX_DIR) \
587 --bindir=$(FS_STABLE_BIN_DIR) \
588 --includedir=$(FS_STABLE_INCLUDES_DIR) \
589 --libdir=$(FS_STABLE_LIB_DIR) \
590 --srcdir=$(PKG_BUILD_DIR) \
591 --sysconfdir=$(FS_STABLE_SYSCONF_DIR) \
592 --disable-dependency-tracking \
593 --disable-static \
594 --disable-system-xmlrpc-c \
595 --enable-fhs \
596 --with-cachedir=/tmp/$(PRG_NAME)/cache \
597 --with-certsdir=$(FS_STABLE_TLS_DIR) \
598 --with-dbdir=/tmp/$(PRG_NAME)/db \
599 --with-fontsdir=$(FS_STABLE_FONTS_DIR) \
600 --with-grammardir=$(FS_STABLE_GRAMMAR_DIR) \
601 --with-htdocsdir=$(FS_STABLE_HTDOCS_DIR) \
602 --with-imagesdir=$(FS_STABLE_IMAGES_DIR) \
603 --with-logfiledir=/tmp/$(PRG_NAME)/log \
604 --with-modinstdir=$(FS_STABLE_MOD_DIR) \
605 --with-pkgconfigdir=$(FS_STABLE_PKGCONFIG_DIR) \
606 --with-recordingsdir=/tmp/$(PRG_NAME)/recordings \
607 --with-rundir=/var/run/$(PRG_NAME) \
608 --with-scriptdir=$(FS_STABLE_SCRIPTS_DIR) \
609 --with-soundsdir=$(FS_STABLE_SOUNDS_DIR) \
610 --with-storagedir=/tmp/$(PRG_NAME)/storage \
611 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_LIBEDIT,core-libedit-support) \
612 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ODBC,core-odbc-support) \
613 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_SRTP,srtp) \
614 $(call autoconf_bool,CONFIG_FS_STABLE_WITH_ZRTP,zrtp) \
615 $(if $(CONFIG_FS_STABLE_WITH_DEBUG),,--disable-debug) \
616 $(if $(CONFIG_FS_STABLE_WITH_FREETYPE),,--without-freetype) \
617 $(if $(CONFIG_FS_STABLE_WITH_LIBYUV),,--disable-libyuv) \
618 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)$(FS_STABLE_LIB_DIR)") \
619 $(if $(CONFIG_FS_STABLE_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
620 $(if $(CONFIG_FS_STABLE_WITH_PGSQL),--enable-core-pgsql-support,--without-pgsql) \
621 $(if $(CONFIG_FS_STABLE_WITH_PNG),,--without-png) \
622 $(if $(CONFIG_FS_STABLE_WITH_VPX),,--disable-libvpx)
623
624 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
625 CONFIGURE_ARGS+= \
626 --with-python=$(STAGING_DIR_HOSTPKG)/bin/python$(PYTHON_VERSION)
627 else
628 CONFIGURE_ARGS+= \
629 --with-python=no
630 endif
631
632 ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang_event)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-kazoo),)
633 CONFIGURE_ARGS+= \
634 --with-erlang=no
635 endif
636
637 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
638 CONFIGURE_ARGS+= \
639 --enable-static-v8
640 endif
641
642 # Make mod_spandsp use fixed point math when soft float support is
643 # enabled on target devices.
644 ifeq ($(CONFIG_SOFT_FLOAT),y)
645 CONFIGURE_ARGS+= \
646 --enable-fixed-point
647 endif
648
649 # Don't want host-php
650 CONFIGURE_VARS+= \
651 ac_cv_have_php=no \
652 ac_cv_have_php_config=no \
653 ac_cv_prog_PHP=false \
654 ac_cv_prog_PHP_CONFIG=false
655
656 # The autoconf variables in this block are OK for both musl and glibc
657 CONFIGURE_VARS+= \
658 ac_cv_dev_urandom=yes \
659 ac_cv_file__dev_ptmx=yes \
660 ac_cv_file__dev_urandom=yes \
661 ac_cv_file_dbd_apr_dbd_mysql_c=no \
662 ac_cv_free_null=yes \
663 ac_cv_func_mmap_fixed_mapped=yes \
664 ac_cv_func_pthread_rwlock_init=yes \
665 ac_cv_func_sem_open=yes \
666 ac_cv_have_working_memmove=yes \
667 ac_cv_negative_eai=yes \
668 ac_cv_o_nonblock_inherited=no \
669 ac_cv_struct_rlimit=yes \
670 apr_cv_epoll=yes \
671 apr_cv_gai_addrconfig=yes \
672 apr_cv_mutex_recursive=yes \
673 apr_cv_process_shared_works=yes \
674 apr_cv_pthreads_lib=-lpthread \
675 apr_cv_tcp_nodelay_with_cork=yes \
676 apr_cv_type_rwlock_t=yes
677
678 # fs_cli
679 CONFIGURE_VARS+= \
680 disable_cc=yes
681
682 # Regarding apr_cv_mutex_robust_shared=no see
683 # http://www.openwall.com/lists/musl/2016/11/26/1
684 # _Don't_ remove quotes below!
685 ifeq ($(CONFIG_LIBC),"musl")
686 CONFIGURE_VARS+= \
687 apr_cv_mutex_robust_shared=no \
688 ac_cv_strerror_r_rc_int=yes
689 else
690 CONFIGURE_VARS+= \
691 apr_cv_mutex_robust_shared=yes
692 endif
693
694 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),)
695 CONFIGURE_VARS+= \
696 PERL="$(PERL_CMD)" \
697 PERL_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
698 PERL_INC="-I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
699 PERL_LDFLAGS="$(FPIC) -Wl,-rpath,$(PERL_SITELIB)/CORE -L$(STAGING_DIR)$(PERL_SITELIB)/CORE -lperl" \
700 PERL_LIBDIR="-L$(PERL_SITELIB)/CORE" \
701 PERL_LIBS="-lpthread $(FS_STABLE_PERL_LIBS) $(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%)" \
702 PERL_SITEDIR="$(PERL_SITELIB)"
703 else
704 CONFIGURE_VARS+= \
705 ac_cv_have_perl=no \
706 ac_cv_prog_PERL=false
707 endif
708
709 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
710 CONFIGURE_VARS+= \
711 PYTHON_CFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION)" \
712 PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION) -ldl -lpthread -lm -Xlinker -export-dynamic" \
713 PYTHON_LIB="python$(PYTHON_VERSION)" \
714 PYTHON_LIBDIR="$(FS_STABLE_LIB_DIR)" \
715 PYTHON_SITE_DIR="$(FS_STABLE_PYTHON_SITE_DIR)"
716 endif
717
718 # mod_radius_cdr runs configure in libs/freeradius-client. Let
719 # freeradius-client know /dev/urandom is available on target devices.
720 MAKE_VARS+= \
721 ac_cv_dev_urandom=yes
722
723 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
724
725 # arm
726 ifeq ($(CONFIG_arm),y)
727 FS_STABLE_MYARCH:=arm
728 FS_STABLE_MYDEFINES:=v8_target_arch=arm
729 ifeq ($(CONFIG_arm_v6),y)
730 FS_STABLE_MYDEFINES+=arm_version=6
731 else
732 ifeq ($(CONFIG_arm_v7),y)
733 FS_STABLE_MYDEFINES+=arm_version=7
734 else
735 FS_STABLE_MYDEFINES+=arm_version=default
736 endif
737 endif
738 ifeq ($(CONFIG_VFP),y)
739 ifeq ($(CONFIG_VFPv3),y)
740 ifeq ($(CONFIG_NEON),y)
741 FS_STABLE_MYDEFINES+=arm_fpu=neon
742 else
743 FS_STABLE_MYDEFINES+=arm_fpu=vfpv3
744 endif
745 else
746 FS_STABLE_MYDEFINES+=arm_fpu=vfp
747 endif
748 else
749 FS_STABLE_MYDEFINES+=arm_fpu=default
750 endif
751 ifeq ($(CONFIG_SOFT_FLOAT),y)
752 FS_STABLE_MYDEFINES+=arm_float_abi=softfp
753 else
754 FS_STABLE_MYDEFINES+=arm_float_abi=hard
755 endif
756 endif
757
758 # i386
759 ifeq ($(CONFIG_i386),y)
760 FS_STABLE_MYARCH:=ia32
761 FS_STABLE_MYDEFINES:=v8_target_arch=ia32
762 endif
763
764 # mipsel
765 ifeq ($(CONFIG_mipsel),y)
766 FS_STABLE_MYARCH:=mipsel
767 FS_STABLE_MYDEFINES:=v8_target_arch=mipsel
768 ifeq ($(CONFIG_CPU_MIPS32),y)
769 ifeq ($(CONFIG_CPU_MIPS32_R2),y)
770 FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r2
771 else
772 ifeq ($(CONFIG_CPU_MIPS32_R1),y)
773 FS_STABLE_MYDEFINES+=mips_arch_variant=mips32r1
774 endif
775 endif
776 endif
777 ifeq ($(CONFIG_SOFT_FLOAT),y)
778 FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=false
779 else
780 FS_STABLE_MYDEFINES+=v8_use_mips_abi_hardfloat=true
781 endif
782 endif
783
784 # x86_64
785 ifeq ($(CONFIG_x86_64),y)
786 FS_STABLE_MYARCH:=x64
787 FS_STABLE_MYDEFINES:=v8_target_arch=x64
788 endif
789
790 MAKE_VARS+= \
791 FS_STABLE_HOSTCC="$(HOSTCC)" \
792 FS_STABLE_HOSTCXX="$(HOSTCXX)" \
793 FS_STABLE_HOST_CFLAGS="$(HOST_CFLAGS)" \
794 FS_STABLE_HOST_LDFLAGS="$(HOST_LDFLAGS)" \
795 FS_STABLE_HOST_PYTHONPATH="$(HOST_PYTHONPATH)" \
796 FS_STABLE_MYARCH="$(FS_STABLE_MYARCH)" \
797 FS_STABLE_MYDEFINES="$(FS_STABLE_MYDEFINES)"
798
799 endif
800
801 # Make sphinxbase use fixed point math when soft float support is
802 # enabled on target devices.
803 ifeq ($(CONFIG_SOFT_FLOAT),y)
804 MAKE_VARS+= \
805 FS_STABLE_USE_FIXED_POINT="--enable-fixed"
806 endif
807
808 # Some common URLs
809 FS_STABLE_LIBS_URL:=https://files.$(PRG_NAME).org/downloads/libs
810 FS_STABLE_SPHINX_URL:=@SF/cmusphinx
811
812 # mod_event_zmq
813 FS_STABLE_ZEROMQ_FILE:=zeromq-2.1.9.tar.gz
814 FS_STABLE_ZEROMQ_HASH:=f3542f756687e622beef3a75c8e027fe2d95d4654350cbca4c070ffc58d9ace0
815 FS_STABLE_ZEROMQ_URL:=http://download.zeromq.org
816
817 # mod_pocketsphinx
818 FS_STABLE_POCKETSPHINX_FILE:=pocketsphinx-0.8.tar.gz
819 FS_STABLE_POCKETSPHINX_HASH:=874c4c083d91c8ff26a2aec250b689e537912ff728923c141c4dac48662cce7a
820
821 FS_STABLE_SPHINXBASE_FILE:=sphinxbase-0.8.tar.gz
822 FS_STABLE_SPHINXBASE_HASH:=55708944872bab1015b8ae07b379bf463764f469163a8fd114cbb16c5e486ca8
823
824 FS_STABLE_SPHINXMODEL_FILE:=communicator_semi_6000_20080321.tar.gz
825 FS_STABLE_SPHINXMODEL_HASH:=dbb5e9fb85000a7cb97d6958a3ef8d77532dc55fc730ac6979705e8645cb0c18
826
827 # mod_radius_cdr
828 FS_STABLE_FREERADIUS_CLIENT_FILE:=freeradius-client-1.1.6.tar.gz
829 FS_STABLE_FREERADIUS_CLIENT_HASH:=3fc609af328258e00345389d5478b099fe4ea3ad694d0472525ef3adab9cf053
830
831 # mod_v8
832 FS_STABLE_V8_FILE:=v8-3.24.14.tar.bz2
833 FS_STABLE_V8_HASH:=395f4eaf5580b973b1e33fe0aa27f8d013ddf1b163ad76992c50dd91ff182828
834
835 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event_zmq),)
836 $(eval $(call Download/files,zmq,$(FS_STABLE_ZEROMQ_FILE),$(FS_STABLE_ZEROMQ_URL),$(FS_STABLE_ZEROMQ_HASH)))
837 endif
838
839 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
840 $(eval $(call Download/files,pocketsphinx,$(FS_STABLE_POCKETSPHINX_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_POCKETSPHINX_HASH)))
841 $(eval $(call Download/files,sphinxbase,$(FS_STABLE_SPHINXBASE_FILE),$(FS_STABLE_SPHINX_URL),$(FS_STABLE_SPHINXBASE_HASH)))
842 $(eval $(call Download/files,communicator,$(FS_STABLE_SPHINXMODEL_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_SPHINXMODEL_HASH)))
843 endif
844
845 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius_cdr),)
846 $(eval $(call Download/files,freeradius-client,$(FS_STABLE_FREERADIUS_CLIENT_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_FREERADIUS_CLIENT_HASH)))
847 endif
848
849 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
850 $(eval $(call Download/files,v8,$(FS_STABLE_V8_FILE),$(FS_STABLE_LIBS_URL),$(FS_STABLE_V8_HASH)))
851 endif
852
853 # Need to update LDFLAGS for libs/unimrcp, otherwise it will try to link to a
854 # different apr/apr-util if found.
855 # FS_STABLE_ANCHOR: string in build/acmacros/apr.m4 that will be replaced
856 FS_STABLE_ANCHOR:=dnl Get build information from APR
857 FS_STABLE_APR_LIBS:=-L$(PKG_BUILD_DIR)/libs/apr -L$(PKG_BUILD_DIR)/libs/apr-util
858
859 define Build/Prepare
860 $(call Build/Prepare/Default)
861
862 echo '#applications/mod_random' >> $(PKG_BUILD_DIR)/modules.conf
863 echo '#codecs/mod_yuv' >> $(PKG_BUILD_DIR)/modules.conf
864 echo '#event_handlers/mod_event_test' >> $(PKG_BUILD_DIR)/modules.conf
865 $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/modules.conf
866 $(foreach m,$(FS_STABLE_MOD_AVAILABLE),
867 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
868 $(SED) '/mod_$(m)$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf))
869
870 $(SED) 's|$(FS_STABLE_ANCHOR)|APR_SETVAR(LDFLAGS,$(FS_STABLE_APR_LIBS) $(TARGET_LDFLAGS))|' \
871 $(PKG_BUILD_DIR)/libs/unimrcp/build/acmacros/apr.m4
872
873 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event_zmq),)
874 $(CP) $(DL_DIR)/$(FS_STABLE_ZEROMQ_FILE) $(PKG_BUILD_DIR)/libs
875 endif
876
877 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx)$(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
878 $(CP) $(DL_DIR)/$(FS_STABLE_POCKETSPHINX_FILE) $(PKG_BUILD_DIR)/libs
879 $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXBASE_FILE) $(PKG_BUILD_DIR)/libs
880 $(CP) $(DL_DIR)/$(FS_STABLE_SPHINXMODEL_FILE) $(PKG_BUILD_DIR)/libs
881 endif
882
883 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-radius_cdr),)
884 $(CP) $(DL_DIR)/$(FS_STABLE_FREERADIUS_CLIENT_FILE) $(PKG_BUILD_DIR)/libs
885 endif
886
887 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-v8),)
888 $(CP) $(DL_DIR)/$(FS_STABLE_V8_FILE) $(PKG_BUILD_DIR)/libs
889 endif
890
891 # Hack for misc-grammar - needs mod_pocketsphinx to provide grammar files
892 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-grammar),)
893 ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-pocketsphinx),)
894 $(SED) '/mod_pocketsphinx$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
895 endif
896 endif
897
898 # Hack for mod_unimrcp - it has a build-time dep on mod_sofia
899 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-unimrcp),)
900 ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-sofia),)
901 $(SED) '/mod_sofia$$$$/s/^#//' $(PKG_BUILD_DIR)/modules.conf
902 endif
903 endif
904 endef
905
906 define Build/Configure
907 $(FIND) $(PKG_BUILD_DIR) -name missing -type f -exec rm {} \;
908 cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./rebootstrap.sh
909 $(call Build/Configure/Default)
910 endef
911
912 define Build/Compile
913 $(call Build/Compile/Default)
914 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
915 $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
916 endif
917 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
918 $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod)
919 endif
920 endef
921
922 define Build/Install
923 $(call Build/Install/Default)
924 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
925 $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
926 endif
927 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
928 $(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod-install)
929 endif
930 endef
931
932 define Build/InstallDev
933 $(INSTALL_DIR) $(1)$(FS_STABLE_INCLUDES_DIR)
934 $(INSTALL_DIR) $(1)$(FS_STABLE_PKGCONFIG_DIR)
935 $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(FS_STABLE_INCLUDES_DIR)/*.h \
936 $(1)$(FS_STABLE_INCLUDES_DIR)
937 $(INSTALL_DATA) \
938 $(PKG_INSTALL_DIR)$(FS_STABLE_PKGCONFIG_DIR)/$(PRG_NAME).pc \
939 $(1)$(FS_STABLE_PKGCONFIG_DIR)
940 endef
941
942 $(eval $(call BuildPackage,$(PKG_NAME)))
943 $(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug))
944 $(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl))
945 $(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl))
946 $(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))
947
948 ################################
949 # FreeSWITCH example configs
950 # Params:
951 # 1 - Package subname
952 ################################
953
954 $(eval $(call Package/$(PKG_NAME)/Example,curl))
955 $(eval $(call Package/$(PKG_NAME)/Example,insideout))
956 $(eval $(call Package/$(PKG_NAME)/Example,minimal))
957 $(eval $(call Package/$(PKG_NAME)/Example,rayo))
958 $(eval $(call Package/$(PKG_NAME)/Example,sbc))
959 $(eval $(call Package/$(PKG_NAME)/Example,softphone))
960 $(eval $(call Package/$(PKG_NAME)/Example,testing))
961 $(eval $(call Package/$(PKG_NAME)/Example,vanilla))
962
963 ################################
964 # FreeSWITCH language files
965 # Params:
966 # 1 - Language code
967 # 2 - Language
968 ################################
969
970 $(eval $(call Package/$(PKG_NAME)/Language,de,German))
971 $(eval $(call Package/$(PKG_NAME)/Language,en,English))
972 $(eval $(call Package/$(PKG_NAME)/Language,es,Spanish))
973 $(eval $(call Package/$(PKG_NAME)/Language,fr,French))
974 $(eval $(call Package/$(PKG_NAME)/Language,he,Hebrew))
975 $(eval $(call Package/$(PKG_NAME)/Language,pt,Portuguese))
976 $(eval $(call Package/$(PKG_NAME)/Language,ru,Russian))
977 $(eval $(call Package/$(PKG_NAME)/Language,sv,Swedish))
978
979 ################################
980 # FreeSWITCH misc packages
981 # Params:
982 # 1 - Package subname
983 # 2 - Package title
984 # 3 - Package description
985 # 4 - Source dir relative to
986 # PKG_INSTALL_DIR
987 # 5 - Dest dir relative to ipkg
988 # 6 - Arch independent files
989 ################################
990
991 $(eval $(call Package/$(PKG_NAME)/Misc,misc-fonts,Fonts,This package includes the fonts bundled with FreeSWITCH.,$(FS_STABLE_FONTS_DIR),$(FS_STABLE_FONTS_DIR),y))
992 $(eval $(call Package/$(PKG_NAME)/Misc,misc-grammar,Grammar,This package contains grammar files. mod_pocketsphinx would be a\npotential user.,$(FS_STABLE_GRAMMAR_DIR),$(FS_STABLE_GRAMMAR_DIR),y))
993 $(eval $(call Package/$(PKG_NAME)/Misc,misc-images,Images,This package includes the images bundled with FreeSWITCH.,$(FS_STABLE_IMAGES_DIR),$(FS_STABLE_IMAGES_DIR),y))
994
995 ################################
996 # FreeSWITCH modules
997 # Params:
998 # 1 - Package subname
999 # 2 - Package title
1000 # 3 - Module description
1001 # 4 - Module dependencies
1002 ################################
1003
1004 $(eval $(call Package/$(PKG_NAME)/Module,abstraction,API abstraction,This module provides a way to create new API functions via regex\nrewriting.,))
1005 $(eval $(call Package/$(PKG_NAME)/Module,alsa,ALSA endpoint,ALSA endpoint module.,+alsa-lib))
1006 $(eval $(call Package/$(PKG_NAME)/Module,amr,AMR passthrough,Passthrough AMR codec support.,))
1007 $(eval $(call Package/$(PKG_NAME)/Module,amrwb,AMR wideband passthrough,Passthrough AMR wideband codec support.,))
1008 $(eval $(call Package/$(PKG_NAME)/Module,av,AV,Video codec and format support via FFmpeg.,+libffmpeg-full @BROKEN)) # libffmpeg-full doesn't provide avresample
1009 $(eval $(call Package/$(PKG_NAME)/Module,avmd,Voicemail detection,This module attempts to determine when a voicemail system has answered\nthe call.,))
1010 $(eval $(call Package/$(PKG_NAME)/Module,b64,Base64,Transfers data Base64 encoded.,))
1011 $(eval $(call Package/$(PKG_NAME)/Module,basic,BASIC,BASIC module for FreeSWITCH.,))
1012 $(eval $(call Package/$(PKG_NAME)/Module,bert,BERT,Line testing tool.,))
1013 $(eval $(call Package/$(PKG_NAME)/Module,blacklist,Blacklist helper,This module provides tools to blacklist callers.,))
1014 $(eval $(call Package/$(PKG_NAME)/Module,callcenter,Call center,This module implements Automated Call Distribution queues.,))
1015 $(eval $(call Package/$(PKG_NAME)/Module,cdr_csv,CSV CDR,CSV Call Detail Record handler.,))
1016 $(eval $(call Package/$(PKG_NAME)/Module,cdr_mongodb,MongoDB CDR,MongoDB Call Detail Record handler.,))
1017 $(eval $(call Package/$(PKG_NAME)/Module,cdr_pg_csv,PostgreSQL CDR,PostgreSQL Call Detail Record handler.,@FS_STABLE_WITH_PGSQL))
1018 $(eval $(call Package/$(PKG_NAME)/Module,cdr_sqlite,SQLite CDR,SQLite Call Detail Record handler.,))
1019 $(eval $(call Package/$(PKG_NAME)/Module,cidlookup,Caller ID lookup,This module provides an API for querying caller ID name and location\ndata.,))
1020 $(eval $(call Package/$(PKG_NAME)/Module,clearmode,Clearmode,Clearmode codec passthrough support.,))
1021 $(eval $(call Package/$(PKG_NAME)/Module,cluechoo,Clue Choo,This demo module renders a Clue Choo train on the FreeSWITCH console.,+libncurses))
1022 $(eval $(call Package/$(PKG_NAME)/Module,commands,Commands,This module provides miscellaneous API commands.,))
1023 $(eval $(call Package/$(PKG_NAME)/Module,conference,Conference,This module provides multi-party conferencing.,))
1024 $(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.,))
1025 $(eval $(call Package/$(PKG_NAME)/Module,curl,cURL,This module provides an API for making HTTP requests with cURL.,))
1026 $(eval $(call Package/$(PKG_NAME)/Module,cv,OpenCV,This module exposes opencv actions to enable computer vision actions.,+opencv @BROKEN)) # opencv package too stripped-down
1027 $(eval $(call Package/$(PKG_NAME)/Module,dahdi_codec,DAHDI codec,DAHDI codec module.,))
1028 $(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.,))
1029 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_asterisk,Asterisk dialplan,Asterisk extensions.conf style dialplan parser.,))
1030 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_directory,Directory dialplan,Directory dialplan support.,))
1031 $(eval $(call Package/$(PKG_NAME)/Module,dialplan_xml,XML dialplan,Standard FreeSWITCH XML dialplan support.,))
1032 $(eval $(call Package/$(PKG_NAME)/Module,dingaling,Generic XMPP,Allows FreeSWITCH to be used as a client for XMPP Servers.,))
1033 $(eval $(call Package/$(PKG_NAME)/Module,directory,Dial-by-name directory,This module implements a dial-by-name directory IVR.,))
1034 $(eval $(call Package/$(PKG_NAME)/Module,distributor,Load distributor,This module implements a mechanism for performing load balancing.,))
1035 $(eval $(call Package/$(PKG_NAME)/Module,dptools,Dialplan tools,This module implements basic dialplan tools.,))
1036 $(eval $(call Package/$(PKG_NAME)/Module,easyroute,DID routing,This module does destination lookup based on DID.,))
1037 $(eval $(call Package/$(PKG_NAME)/Module,enum,ENUM routing,This module implements ENUM support.,+libldns))
1038 $(eval $(call Package/$(PKG_NAME)/Module,erlang_event,Erlang event,Erlang event module.,+erlang))
1039 $(eval $(call Package/$(PKG_NAME)/Module,esf,Multicast,This module adds multi-cast support.,))
1040 $(eval $(call Package/$(PKG_NAME)/Module,esl,Single ESL,This module adds an API for generating one-off ESL requests.,))
1041 $(eval $(call Package/$(PKG_NAME)/Module,event_multicast,Multicast Event,Multicast Event System for FreeSWITCH.,))
1042 $(eval $(call Package/$(PKG_NAME)/Module,event_socket,Event socket,Sends events via a single socket. Needed for fs_cli.,))
1043 $(eval $(call Package/$(PKG_NAME)/Module,event_test,Event test,Event demo module.,))
1044 $(eval $(call Package/$(PKG_NAME)/Module,event_zmq,ZMQ event,ZMQ event module.,))
1045 $(eval $(call Package/$(PKG_NAME)/Module,expr,Expr,This module adds expr support for expression evaluation.,))
1046 $(eval $(call Package/$(PKG_NAME)/Module,fifo,FIFO,This module adds a first-in first-out queue system.,))
1047 $(eval $(call Package/$(PKG_NAME)/Module,format_cdr,Multiformat CDR,A superset of mod_json_cdr and mod_xml_cdr.,))
1048 $(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.,))
1049 $(eval $(call Package/$(PKG_NAME)/Module,fsv,FSV,This module provides dialplan applications for recording and playing\nvideos.,))
1050 $(eval $(call Package/$(PKG_NAME)/Module,g723_1,G.723.1 passthrough,G.723.1 codec passthrough.,))
1051 $(eval $(call Package/$(PKG_NAME)/Module,g729,G.729 passthrough,G.729 codec passthrough.,))
1052 $(eval $(call Package/$(PKG_NAME)/Module,graylog2,Graylog2 logger,GELF logger for Graylog2 and Logstash.,))
1053 $(eval $(call Package/$(PKG_NAME)/Module,h26x,H.26x passthrough,H.26x video codec passthrough.,))
1054 $(eval $(call Package/$(PKG_NAME)/Module,hash,Hash,This module provides a key-value in-memory datastore. Usable as a\nlimit backend.,))
1055 $(eval $(call Package/$(PKG_NAME)/Module,hiredis,Redis client,This module provides a mechanism to use Redis as a datastore.,+libhiredis))
1056 $(eval $(call Package/$(PKG_NAME)/Module,httapi,HT-TAPI,This module provides an API for controlling the switch by responding\nto HTTP requests.,))
1057 $(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.,))
1058 $(eval $(call Package/$(PKG_NAME)/Module,isac,iSAC,iSAC codec support.,@arm||i386||mips||mips64||mips64el||mipsel||x86_64))
1059 $(eval $(call Package/$(PKG_NAME)/Module,json_cdr,JSON CDR,JSON-based Call Detail Record handler.,))
1060 $(eval $(call Package/$(PKG_NAME)/Module,kazoo,Kazoo,Kazoo module for FreeSWITCH.,+erlang))
1061 $(eval $(call Package/$(PKG_NAME)/Module,lcr,LCR,This module adds a facility for least-cost routing.,))
1062 $(eval $(call Package/$(PKG_NAME)/Module,ldap,LDAP,LDAP module for FreeSWITCH.,+libopenldap))
1063 $(eval $(call Package/$(PKG_NAME)/Module,local_stream,Local stream,Connects multiple channels to a looped stream.,))
1064 $(eval $(call Package/$(PKG_NAME)/Module,logfile,File logger,Logs FreeSWITCH output to a file.,))
1065 $(eval $(call Package/$(PKG_NAME)/Module,loopback,Loopback,A loopback channel driver.,))
1066 $(eval $(call Package/$(PKG_NAME)/Module,lua,Lua,Lua language interface for FreeSWITCH.,+liblua))
1067 $(eval $(call Package/$(PKG_NAME)/Module,mp4v,MP4 video passthrough,MP4 video passthrough..,))
1068 $(eval $(call Package/$(PKG_NAME)/Module,native_file,Native file,Plays files that are already encoded in the right format.,))
1069 $(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.,))
1070 $(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
1071 $(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus))
1072 $(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,))
1073 $(eval $(call Package/$(PKG_NAME)/Module,perl,Perl,This package contains mod_perl for FreeSWITCH.,+libdb47 +libgdbm +perlbase-essential @PERL_THREADS))
1074 $(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,))
1075 $(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,+libsamplerate)) # When libsamplerate is found it'll be linked against, there is no switch to turn it off
1076 $(eval $(call Package/$(PKG_NAME)/Module,portaudio,Portaudio,Voice through a local soundcard.,+portaudio))
1077 $(eval $(call Package/$(PKG_NAME)/Module,portaudio_stream,Portaudio streaming,Stream from an external audio source for Music on Hold.,+portaudio))
1078 $(eval $(call Package/$(PKG_NAME)/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
1079 $(eval $(call Package/$(PKG_NAME)/Module,prefix,Prefix match,This module provides a data store with fast lookups by the longest\nprefix match rule.,))
1080 $(eval $(call Package/$(PKG_NAME)/Module,python,Python,Python support module.,+python-light))
1081 $(eval $(call Package/$(PKG_NAME)/Module,radius_cdr,Radius CDR,Radius Call Detail Record handler.,))
1082 $(eval $(call Package/$(PKG_NAME)/Module,random,Entropy,This module extracts entropy from FreeSWITCH and feeds it into\n/dev/random.,))
1083 $(eval $(call Package/$(PKG_NAME)/Module,rayo,Rayo,Rayo/XMPP 3PCC server for FreeSWITCH.,+$(PKG_NAME)-mod-ssml))
1084 $(eval $(call Package/$(PKG_NAME)/Module,redis,Redis limit backend,This module provides a mechanism to use Redis as a limit backend data\nstore.,))
1085 $(eval $(call Package/$(PKG_NAME)/Module,rss,RSS,Parses and reads XML based RSS feeds and reads the entries aloud via a TTS engine.,))
1086 $(eval $(call Package/$(PKG_NAME)/Module,rtc,Media streaming,Media streaming as used by WebRTC and mod_verto.,))
1087 $(eval $(call Package/$(PKG_NAME)/Module,rtmp,RTMP endpoint,RTMP endpoint support. Allows FreeSWITCH to be used from RTMP clients.,))
1088 $(eval $(call Package/$(PKG_NAME)/Module,say_de,German Say,Uses prerecorded sounds to read or say various things.,))
1089 $(eval $(call Package/$(PKG_NAME)/Module,say_en,English Say,Uses prerecorded sounds to read or say various things.,))
1090 $(eval $(call Package/$(PKG_NAME)/Module,say_es,Spanish Say,Uses prerecorded sounds to read or say various things.,))
1091 $(eval $(call Package/$(PKG_NAME)/Module,say_es_ar,Argentinian Spanish Say,Uses prerecorded sounds to read or say various things.,))
1092 $(eval $(call Package/$(PKG_NAME)/Module,say_fa,Persian Say,Uses prerecorded sounds to read or say various things.,))
1093 $(eval $(call Package/$(PKG_NAME)/Module,say_fr,French Say,Uses prerecorded sounds to read or say various things.,))
1094 $(eval $(call Package/$(PKG_NAME)/Module,say_he,Hebrew Say,Uses prerecorded sounds to read or say various things.,))
1095 $(eval $(call Package/$(PKG_NAME)/Module,say_hr,Croatian Say,Uses prerecorded sounds to read or say various things.,))
1096 $(eval $(call Package/$(PKG_NAME)/Module,say_hu,Hungarian Say,Uses prerecorded sounds to read or say various things.,))
1097 $(eval $(call Package/$(PKG_NAME)/Module,say_it,Italian Say,Uses prerecorded sounds to read or say various things.,))
1098 $(eval $(call Package/$(PKG_NAME)/Module,say_ja,Japanese Say,Uses prerecorded sounds to read or say various things.,))
1099 $(eval $(call Package/$(PKG_NAME)/Module,say_nl,Dutch Say,Uses prerecorded sounds to read or say various things.,))
1100 $(eval $(call Package/$(PKG_NAME)/Module,say_pl,Polish Say,Uses prerecorded sounds to read or say various things.,))
1101 $(eval $(call Package/$(PKG_NAME)/Module,say_pt,Portuguese Say,Uses prerecorded sounds to read or say various things.,))
1102 $(eval $(call Package/$(PKG_NAME)/Module,say_ru,Russian Say,Uses prerecorded sounds to read or say various things.,))
1103 $(eval $(call Package/$(PKG_NAME)/Module,say_sv,Swedish Say,Uses prerecorded sounds to read or say various things.,))
1104 $(eval $(call Package/$(PKG_NAME)/Module,say_th,Thai Say,Uses prerecorded sounds to read or say various things.,))
1105 $(eval $(call Package/$(PKG_NAME)/Module,say_zh,Chinese Say,Uses prerecorded sounds to read or say various things.,))
1106 $(eval $(call Package/$(PKG_NAME)/Module,shell_stream,Shell stream,Allows to stream audio from an arbitrary shell command.,))
1107 $(eval $(call Package/$(PKG_NAME)/Module,shout,Shout,Allows to stream audio from MP3s or Shoutcast streams.,+lame-lib +libmpg123 +libshout))
1108 $(eval $(call Package/$(PKG_NAME)/Module,skinny,Skinny,Skinny Call Control Protocol endpoint support.,))
1109 $(eval $(call Package/$(PKG_NAME)/Module,sms,SMS,This module provides an abstract facility for interfacing with SMS\nsystems.,))
1110 $(eval $(call Package/$(PKG_NAME)/Module,snapshot,Snapshot,This module can record a sliding window of audio and take snapshots\nto disk.,))
1111 $(eval $(call Package/$(PKG_NAME)/Module,sndfile,Soundfile,Adds sound format support via libsndfile.,+libsndfile))
1112 $(eval $(call Package/$(PKG_NAME)/Module,snmp,SNMP,An SNMP stats reporter.,+libnetsnmp))
1113 $(eval $(call Package/$(PKG_NAME)/Module,snom,SNOM,This module implements features specific to SNOM phones.,))
1114 $(eval $(call Package/$(PKG_NAME)/Module,sofia,Sofia SIP,SIP module.,))
1115 $(eval $(call Package/$(PKG_NAME)/Module,sonar,Sonar,This module measures the latency on an audio link by sending audible\naudio sonar pings.,))
1116 $(eval $(call Package/$(PKG_NAME)/Module,spandsp,SpanDSP,This module implements SpanDSP fax. It includes DSP and codec\nfunctionality.,+libjpeg +liblzma))
1117 $(eval $(call Package/$(PKG_NAME)/Module,spy,User Spy,This module adds the ability to monitor the audio of a channel.,))
1118 $(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.,))
1119 $(eval $(call Package/$(PKG_NAME)/Module,stress,Stress,This module attempts to detect voice stress on an audio channel.,))
1120 $(eval $(call Package/$(PKG_NAME)/Module,syslog,Syslog logger,Logs FreeSWITCH output to the syslog.,))
1121 $(eval $(call Package/$(PKG_NAME)/Module,theora,Theora passthrough,Theora video codec passthrough.,))
1122 $(eval $(call Package/$(PKG_NAME)/Module,tone_stream,Tone stream,Tone generation stream.,))
1123 $(eval $(call Package/$(PKG_NAME)/Module,translate,Number translation,This module implements number translation.,))
1124 $(eval $(call Package/$(PKG_NAME)/Module,tts_commandline,TTS command-line,Run a command-line and play the output file.,))
1125 $(eval $(call Package/$(PKG_NAME)/Module,unimrcp,UniMRCP,Allows communication with Media Resource Control Protocol servers.,))
1126 $(eval $(call Package/$(PKG_NAME)/Module,v8,V8,This package contains mod_v8 for FreeSWITCH.,@FS_STABLE_WITH_V8 @arm||i386||mipsel||x86_64))
1127 $(eval $(call Package/$(PKG_NAME)/Module,valet_parking,Valet parking,This module implements the valet call parking strategy.,))
1128 $(eval $(call Package/$(PKG_NAME)/Module,verto,Verto,Verto signaling protocol.,))
1129 $(eval $(call Package/$(PKG_NAME)/Module,vmd,Voicemail detection,This module detects voicemail beeps.,))
1130 $(eval $(call Package/$(PKG_NAME)/Module,voicemail,Voicemail,This module provides a voicemail system.,))
1131 $(eval $(call Package/$(PKG_NAME)/Module,voicemail_ivr,Voicemail IVR,This module provides an extensible voicemail IVR system.,))
1132 $(eval $(call Package/$(PKG_NAME)/Module,xml_cdr,XML CDR,XML Call Detail Record handler.,))
1133 $(eval $(call Package/$(PKG_NAME)/Module,xml_curl,XML cURL,Provides an XML cURL interfaces to pull dynamic XML configuration for\nFreeSWITCH over HTTP.,))
1134 $(eval $(call Package/$(PKG_NAME)/Module,xml_ldap,XML LDAP,LDAP XML gateway.,+libopenldap))
1135 $(eval $(call Package/$(PKG_NAME)/Module,xml_rpc,XML RPC,Allows using the webapi to control FreeSWITCH.,))
1136 $(eval $(call Package/$(PKG_NAME)/Module,xml_scgi,XML SCGI,SCGI XML Gateway.,))
1137 $(eval $(call Package/$(PKG_NAME)/Module,yaml,YAML,YAML language module.,+libyaml))
1138 $(eval $(call Package/$(PKG_NAME)/Module,yuv,Raw YUV,Raw YUV I420 video codec support.,@FS_STABLE_WITH_LIBYUV))
1139
1140 ################################
1141 # FreeSWITCH utilities
1142 # Params:
1143 # 1 - Package subname
1144 # 2 - Package title
1145 # 3 - Utility description
1146 # 4 - Utility dependencies
1147 # 5 - Utility is a script (y/n)
1148 ################################
1149
1150 $(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))
1151 $(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))
1152 $(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))
1153 $(eval $(call Package/$(PKG_NAME)/Util,gentls_cert,TLS certificate,Can be used to create TLS certificates and setup CAs.,+openssl-util,y))
1154 $(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))