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