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