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