freeswitch: disable flite module
[feed/telephony.git] / net / freeswitch / Makefile
1 #
2 # Copyright (C) 2009-2016 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
11 PKG_NAME:=freeswitch
12 PKG_SOURCE_PROTO:=git
13 PKG_DISTNAME:=$(PKG_NAME)_$(PKG_SOURCE_PROTO)
14 PKG_VERSION:=1.9.0
15
16
17 #
18 # The latest FS git hash in PKG_SOURCE_VERSION can be obtained from
19 # http://fisheye.freeswitch.org
20 #
21 PKG_SOURCE_URL:=https://$(PKG_NAME).org/stash/scm/fs/$(PKG_NAME).git
22 PATCH_DIR:=./patches/$(CONFIG_LIBC)
23
24
25 FS_WITH_DEFAULT_HEAD:=77d0cfbf9e9a546b4eee23d9668cf44022f5d454
26 FS_WITH_DEFAULT_HEAD_SHORT:=$(shell echo $(FS_WITH_DEFAULT_HEAD)|cut -b -7)
27 PKG_SOURCE_VERSION:=$(if $(CONFIG_FS_WITH_LATEST_HEAD),$(shell git ls-remote $(PKG_SOURCE_URL) HEAD | cut -f1),$(FS_WITH_DEFAULT_HEAD))
28 PKG_SOURCE_VERSION_SHORT:=$(shell echo $(PKG_SOURCE_VERSION)|cut -b -7)
29 PKG_RELEASE:=$(PKG_SOURCE_VERSION_SHORT)
30 PKG_SOURCE:=$(PKG_DISTNAME)-$(FS_WITH_DEFAULT_HEAD_SHORT).tar.xz
31 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
32 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
33
34
35 TAR_OPTIONS+= --strip-components=1 -C $(PKG_BUILD_DIR)
36
37
38 PKG_BUILD_DEPENDS:=swig/host
39 PKG_FIXUP:=autoreconf
40 PKG_BUILD_PARALLEL:=0
41 PKG_USE_MIPS16:=0
42
43
44 PKG_LICENSE:=MPL-1.1
45 PKG_LICENSE_FILES:=COPYING
46
47
48 ifeq ($(CONFIG_DEVEL),y)
49 export QUILT=1
50 endif
51
52
53 FS_MOD_AVAILABLE:= \
54 abstraction \
55 alsa \
56 amr \
57 amrwb \
58 av \
59 avmd \
60 basic \
61 bert \
62 blacklist \
63 bv \
64 callcenter \
65 cdr-csv \
66 cdr-mongodb \
67 cdr-pg-csv \
68 cdr-sqlite \
69 cepstral \
70 cidlookup \
71 cluechoo \
72 codec2 \
73 commands \
74 conference \
75 console \
76 curl \
77 cv \
78 dahdi-codec \
79 db \
80 dialplan-asterisk \
81 dialplan-directory \
82 dialplan-xml \
83 dingaling \
84 directory \
85 distributor \
86 dptools \
87 easyroute \
88 enum \
89 erlang-event \
90 esf \
91 esl \
92 event-multicast \
93 event-socket \
94 event-zmq \
95 expr \
96 fifo \
97 file-string \
98 flite \
99 format-cdr \
100 freetdm \
101 fsk \
102 fsv \
103 g723-1 \
104 g729 \
105 graylog2 \
106 gsmopen \
107 h26x \
108 h323 \
109 hash \
110 hiredis \
111 html5 \
112 httapi \
113 http-cache \
114 ilbc \
115 isac \
116 java \
117 json-cdr \
118 kazoo \
119 lcr \
120 ldap \
121 local-stream \
122 logfile \
123 loopback \
124 lua \
125 managed \
126 memcache \
127 mongo \
128 mp4 \
129 mp4v \
130 native-file \
131 nibblebill \
132 opus \
133 oreka \
134 perl \
135 png \
136 portaudio \
137 portaudio-stream \
138 posix-timer \
139 prefix \
140 python \
141 radius-cdr \
142 rayo \
143 redis \
144 rss \
145 rtc \
146 rtmp \
147 sangoma-codec \
148 say-de \
149 say-en \
150 say-es \
151 say-fa \
152 say-fr \
153 say-hu \
154 say-it \
155 say-nl \
156 say-pt \
157 say-ru \
158 say-th \
159 say-zh \
160 shell-stream \
161 silk \
162 siren \
163 skel \
164 skinny \
165 skypopen \
166 smpp \
167 sms \
168 snapshot \
169 sndfile \
170 snmp \
171 snom \
172 sofia \
173 sonar \
174 spandsp \
175 spidermonkey \
176 spidermonkey-core-db \
177 spidermonkey-curl \
178 spidermonkey-odbc \
179 spidermonkey-socket \
180 spidermonkey-teletone \
181 spy \
182 ssml \
183 stress \
184 syslog \
185 timerfd \
186 tone-stream \
187 translate \
188 tts-commandline \
189 unimrcp \
190 valet-parking \
191 verto \
192 vmd \
193 voicemail \
194 voicemail-ivr \
195 xml-cdr \
196 xml-curl \
197 xml-ldap \
198 xml-radius \
199 xml-rpc \
200 xml-scgi \
201 yaml \
202
203
204 PKG_CONFIG_DEPENDS:= \
205 CONFIG_FS_WITH_LATEST_HEAD \
206 CONFIG_FS_WITH_ALSA \
207 CONFIG_FS_WITH_APR_CONFIG_SWITCHES \
208 CONFIG_FS_WITH_APR_IPV6 \
209 CONFIG_FS_WITH_APR_SCTP \
210 CONFIG_FS_WITH_APR_THREADS \
211 CONFIG_FS_WITH_BUILTIN_ZRTP \
212 CONFIG_FS_WITH_CORE_LIBEDIT_SUPPORT \
213 CONFIG_FS_WITH_DEFAULT_HEAD \
214 CONFIG_FS_WITH_ERLANG \
215 CONFIG_FS_WITH_FHS \
216 CONFIG_FS_WITH_FIXED_POINT \
217 CONFIG_FS_WITH_LOCAL_SOURCE \
218 CONFIG_FS_WITH_LIBVPX \
219 CONFIG_FS_WITH_LIBYUV \
220 CONFIG_FS_WITH_LZMA \
221 CONFIG_FS_WITH_MYSQL \
222 CONFIG_FS_WITH_ODBC \
223 CONFIG_FS_WITH_OGG \
224 CONFIG_FS_WITH_OPENSSL \
225 CONFIG_FS_WITH_OPENWRT_SOURCE \
226 CONFIG_FS_WITH_OPT \
227 CONFIG_FS_WITH_POSTGRESQL \
228 CONFIG_FS_WITH_PYTHON \
229 CONFIG_FS_WITH_PYTHON_PATH \
230 CONFIG_FS_WITH_SILENT_RULES \
231 CONFIG_FS_WITH_SQLITE3 \
232 CONFIG_FS_WITH_SRTP \
233 CONFIG_FS_WITH_SRTP_GENERIC_AESICM \
234 CONFIG_FS_WITH_SRTP_KERNEL_LINUX \
235 CONFIG_FS_WITH_SRTP_OPENSSL \
236 CONFIG_FS_WITH_STUN \
237 CONFIG_FS_WITH_VISIBILITY \
238 $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_MOD_AVAILABLE)) \
239
240
241 include $(INCLUDE_DIR)/package.mk
242 include $(INCLUDE_DIR)/nls.mk
243 include $(TOPDIR)/feeds/packages/lang/perl/perlmod.mk
244
245
246 ifneq ($(CONFIG_FS_WITH_PYTHON),)
247 include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
248 #$(call include_mk, python3-package.mk)
249 endif
250
251
252 ifneq ($(CONFIG_CCACHE),)
253 TARGET_CC=$(TARGET_CC_NOCACHE)
254 TARGET_CXX=$(TARGET_CXX_NOCACHE)
255 endif
256
257
258 define Package/$(PKG_NAME)/Default
259 SECTION:=net
260 CATEGORY:=Network
261 SUBMENU:=Telephony
262 URL:=http://www.$(PKG_NAME).org/
263 MAINTAINER:=Mazi Lo <openwrt.mazilo@xoxy.net>
264 endef
265
266
267 define Package/$(PKG_NAME)
268 $(call Package/$(PKG_NAME)/Default)
269 MENU:=1
270 TITLE:=FreeSWITCH open source telephony platform ($(PKG_SOURCE_VERSION_SHORT))
271 DEPENDS:=+FS_WITH_CORE_LIBEDIT_SUPPORT:libedit +FS_WITH_OPENSSL:libopenssl +libcurl +libdb47 +libfreetype +libgdbm $(ICONV_DEPENDS) $(INTL_DEPENDS) +libjpeg +libncurses +libopenldap +libpcre +libpng +libpthread +librt +libspeex +libspeexdsp +FS_WITH_SQLITE3:libsqlite3 +libsrtp +SSP_SUPPORT:libssp +libstdcpp +libuuid +PACKAGE_$(PKG_NAME)-mod-perl:perl
272 endef
273
274
275 define Package/$(PKG_NAME)/description
276 FreeSWITCH is an open source telephony platform designed to
277 facilitate the creation of voice and chat driven products
278 scaling from a soft-phone up to a soft-switch.
279 endef
280
281
282 define Package/$(PKG_NAME)/config
283 source "$(SOURCE)/Config.in"
284 endef
285
286
287 define Package/$(PKG_NAME)-mod-spandsp/config
288 config FS_WITH_FIXED_POINT
289 depends on PACKAGE_$(PKG_NAME)-mod-spandsp
290 bool "Enable fixed point support for spandsp (may degrade performance)"
291 default n
292 help
293 Compile spandsp package with a fixed point support. ONLY enabled this
294 option when necessary, i.e. CPU doesn't support floating computation.
295 endef
296
297
298 define Package/$(PKG_NAME)-example-config
299 $(call Package/$(PKG_NAME)/Default)
300 TITLE:=FreeSWITCH example config (commented)
301 DEPENDS:= $(PKG_NAME)
302 endef
303
304
305 define Package/$(PKG_NAME)-example-config/description
306 The default configuration included with FreeSWITCH. It is not intended to be
307 a final product, and is thus moved to /usr/share/$(PKG_NAME)/examples/conf to
308 be an example of how FreeSWITCH can be configured.
309 endef
310
311
312 define Package/$(PKG_NAME)-config-upstream-defaults
313 $(call Package/$(PKG_NAME)/Default)
314 TITLE:=FreeSWITCH upstream config
315 DEPENDS:= $(PKG_NAME)
316 endef
317
318
319 define Package/$(PKG_NAME)-config-upstream-defaults/description
320 The default configuration included with FreeSWITCH. It is not intended to be
321 a final product, and but is included for those who don't want to use the
322 OpenWRT configuration and/or want to try things as prepared by upstream.
323 endef
324
325
326 define Package/$(PKG_NAME)-config-minimal
327 $(call Package/$(PKG_NAME)/Default)
328 TITLE:=FreeSWITCH minimal config
329 DEPENDS:= $(PKG_NAME)
330 endef
331
332
333 define Package/$(PKG_NAME)-config-minimal/description
334 A minimal configuration of FreeSWITCH for OpenWRT devices. Is what the UCI
335 configuration began with.
336 endef
337
338
339 define Package/$(PKG_NAME)-collection-upstream-defaults
340 $(call Package/$(PKG_NAME)/Default)
341 TITLE:=FS upstream def sample conf
342 DEPENDS:= $(PKG_NAME) \
343 +$(PKG_NAME)-mod-callcenter \
344 +$(PKG_NAME)-mod-commands \
345 +$(PKG_NAME)-mod-conference \
346 +$(PKG_NAME)-mod-curl \
347 +$(PKG_NAME)-mod-dialplan-xml \
348 +$(PKG_NAME)-mod-dingaling \
349 +$(PKG_NAME)-mod-dptools \
350 +$(PKG_NAME)-mod-event-socket \
351 +$(PKG_NAME)-mod-g723-1 \
352 +$(PKG_NAME)-mod-g729 \
353 +$(PKG_NAME)-mod-hash \
354 +$(PKG_NAME)-mod-http-cache \
355 +$(PKG_NAME)-mod-local-stream \
356 +$(PKG_NAME)-mod-lua \
357 +$(PKG_NAME)-mod-native-file \
358 +$(PKG_NAME)-mod-say-en \
359 +$(PKG_NAME)-mod-sndfile \
360 +$(PKG_NAME)-mod-sofia \
361 +$(PKG_NAME)-mod-syslog \
362 +$(PKG_NAME)-mod-tone-stream \
363 +$(PKG_NAME)-mod-xml-curl \
364 +$(PKG_NAME)-mod-xml-rpc \
365 +$(PKG_NAME)-tools
366 endef
367
368
369 define Package/$(PKG_NAME)-collection-minimal
370 $(call Package/$(PKG_NAME)/Default)
371 TITLE:=FreeSWITCH minimal package collection
372 DEFAULT:=y
373 DEPENDS:= $(PKG_NAME) \
374 +$(PKG_NAME)-config-minimal \
375 +$(PKG_NAME)-mod-commands \
376 +$(PKG_NAME)-mod-dialplan-xml \
377 +$(PKG_NAME)-mod-dptools \
378 +$(PKG_NAME)-mod-event-socket \
379 +$(PKG_NAME)-mod-hash \
380 +$(PKG_NAME)-mod-local-stream \
381 +$(PKG_NAME)-mod-sndfile \
382 +$(PKG_NAME)-mod-sofia \
383 +$(PKG_NAME)-mod-syslog \
384 +$(PKG_NAME)-mod-tone-stream \
385 +$(PKG_NAME)-tools
386 endef
387
388
389 define Package/$(PKG_NAME)-sounds-en-08KHz
390 $(call Package/$(PKG_NAME)/Default)
391 TITLE:=FreeSWITCH 8KHz english sounds
392 DEPENDS:= $(PKG_NAME)
393 endef
394
395
396 define Package/$(PKG_NAME)-sounds-en-16KHz
397 $(call Package/$(PKG_NAME)/Default)
398 TITLE:=FreeSWITCH 16KHz english sounds
399 DEPENDS:= +$(PKG_NAME)-sounds-en-08KHz
400 endef
401
402
403 define Package/$(PKG_NAME)-sounds-en-32KHz
404 $(call Package/$(PKG_NAME)/Default)
405 TITLE:=FreeSWITCH 32KHz english sounds
406 DEPENDS:= +$(PKG_NAME)-sounds-en-16KHz
407 endef
408
409
410 define Package/$(PKG_NAME)-sounds-en-48KHz
411 $(call Package/$(PKG_NAME)/Default)
412 TITLE:=FreeSWITCH 48KHz english sounds
413 DEPENDS:= +$(PKG_NAME)-sounds-en-32KHz
414 endef
415
416
417 define Package/$(PKG_NAME)-sounds-moh-08KHz
418 $(call Package/$(PKG_NAME)/Default)
419 TITLE:=FreeSWITCH 8KHz music-on-hold sounds
420 DEPENDS:= $(PKG_NAME)
421 endef
422
423
424 define Package/$(PKG_NAME)-sounds-moh-16KHz
425 $(call Package/$(PKG_NAME)/Default)
426 TITLE:=FreeSWITCH 16KHz music-on-hold sounds
427 DEPENDS:= +$(PKG_NAME)-sounds-moh-08KHz
428 endef
429
430
431 define Package/$(PKG_NAME)-sounds-moh-32KHz
432 $(call Package/$(PKG_NAME)/Default)
433 TITLE:=FreeSWITCH 32KHz music-on-hold sounds
434 DEPENDS:= +$(PKG_NAME)-sounds-moh-16KHz
435 endef
436
437
438 define Package/$(PKG_NAME)-sounds-moh-48KHz
439 $(call Package/$(PKG_NAME)/Default)
440 TITLE:=FreeSWITCH 48KHz music-on-hold sounds
441 DEPENDS:= +$(PKG_NAME)-sounds-moh-32KHz
442 endef
443
444
445 define Package/$(PKG_NAME)-tools
446 $(call Package/$(PKG_NAME)/Default)
447 TITLE:=FreeSWITCH control tools
448 DEPENDS:= $(PKG_NAME)
449 endef
450
451
452 define Download/files
453 define Download/$(1)
454 FILE:=$(2)
455 URL:=$(if $(4),$(4),http://files.$(PKG_NAME).org)/$(5)
456 MD5SUM:=$(3)
457 endef
458 define Prepare/$(1)
459 $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(6)
460 endef
461 $$(eval $$(call Download,$(1)))
462 endef
463
464
465 MAKE_INSTALL_TARGETS:=install
466
467
468 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
469 $(eval $(call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/))
470 endif
471
472
473 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
474 $(eval $(call Download/files,event-zmq,zeromq-2.1.9.tar.gz,94c5e0262a79c5f82bc0b178c1f8a33d,http://download.zeromq.org http://download.zeromq.org/historic,,libs/))
475 endif
476
477
478 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-mongo),)
479 $(eval $(call Download/files,mongo,mongo-c-driver-0.92.2.tar.gz,afab25a33abd3f1e0ba79c5a9da92651,,downloads/libs/,libs/))
480 endif
481
482
483 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-08KHz),)
484 $(eval $(call Download/files,sounds-en-08KHz,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.50.tar.gz,14cccba7b5c56f027fea391f1e0ee2d6,,,))
485 MAKE_INSTALL_TARGETS+= sounds-install
486 endif
487
488
489 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-16KHz),)
490 $(eval $(call Download/files,sounds-en-16KHz,$(PKG_NAME)-sounds-en-us-callie-16000-1.0.50.tar.gz,261f42e310baa97cc4dcfdc51971aff8,,,))
491 MAKE_INSTALL_TARGETS+= hd-sounds-install
492 endif
493
494
495 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-32KHz),)
496 $(eval $(call Download/files,sounds-en-32KHz,$(PKG_NAME)-sounds-en-us-callie-32000-1.0.50.tar.gz,f204512fadc49a3267ff4a5e899b77a5,,,))
497 MAKE_INSTALL_TARGETS+= uhd-sounds-install
498 endif
499
500
501 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-48KHz),)
502 $(eval $(call Download/files,sounds-en-48KHz,$(PKG_NAME)-sounds-en-us-callie-48000-1.0.50.tar.gz,8622a77a5d6dcf5e47bdf30d6a33e27c,,,))
503 MAKE_INSTALL_TARGETS+= cd-sounds-install
504 endif
505
506
507 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-08KHz),)
508 $(eval $(call Download/files,sounds-moh-08KHz,$(PKG_NAME)-sounds-music-8000-1.0.50.tar.gz,c1f62dc26360f39f8eb442d5efd0a3aa,,,))
509 MAKE_INSTALL_TARGETS+= moh-install
510 endif
511
512
513 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-16KHz),)
514 $(eval $(call Download/files,sounds-moh-16KHz,$(PKG_NAME)-sounds-music-16000-1.0.50.tar.gz,d253e26baa85e0e2e727a1cb1cca898e,,,))
515 MAKE_INSTALL_TARGETS+= hd-moh-install
516 endif
517
518
519 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-32KHz),)
520 $(eval $(call Download/files,sounds-moh-32KHz,$(PKG_NAME)-sounds-music-32000-1.0.50.tar.gz,0e3ee69cb4ba2813ed0d3f7811332b63,,,))
521 MAKE_INSTALL_TARGETS+= uhd-moh-install
522 endif
523
524
525 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-48KHz),)
526 $(eval $(call Download/files,sounds-moh-48KHz,$(PKG_NAME)-sounds-music-48000-1.0.50.tar.gz,873a62df1ab3be4191eb2488156ec2c2,,,))
527 MAKE_INSTALL_TARGETS+= cd-moh-install
528 endif
529
530
531 #
532 # XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
533 #
534 ifneq ($(CONFIG_avr32),)
535 TARGET_CFLAGS += -fgnu89-inline
536 TARGET_CXXFLAGS += -fgnu89-inline
537 endif
538
539
540 ifneq ($(CONFIG_USE_EGLIBC),)
541 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
542 TARGET_CFLAGS += -DNO_GETLOGIN
543 endif
544 endif
545
546
547 ifeq ($(CONFIG_LIBC),musl)
548 TARGET_CFLAGS += -D_GNU_SOURCE
549 endif
550
551
552 MAKE_FLAGS += \
553 AR="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \
554 CC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \
555 CXX="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
556 RANLIB="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \
557 CC_FOR_BUILD="$(HOSTCC)" \
558
559
560 MAKE_VARS += \
561 OPT_FLAGS+="$(TARGET_CFLAGS)"
562
563
564 CONFIGURE_ARGS+= \
565 --host=$(GNU_TARGET_NAME) \
566 --build=$(GNU_HOST_NAME) \
567 --prefix="/usr/share/$(PKG_NAME)" \
568 --bindir="/usr/bin" \
569 --libdir="/usr/lib" \
570 --srcdir="$(PKG_BUILD_DIR)" \
571 --sysconfdir="/etc" \
572 --with-modinstdir="/usr/lib/$(PKG_NAME)" \
573 --with-random="/dev/urandom" \
574 $(call autoconf_bool,CONFIG_FS_WITH_BUILTIN_ZRTP,zrtp) \
575 $(call autoconf_bool,CONFIG_FS_WITH_CORE_LIBEDIT_SUPPORT,core-libedit-support) \
576 $(call autoconf_bool,CONFIG_FS_WITH_FHS,fhs) \
577 $(call autoconf_bool,CONFIG_FS_WITH_APR_IPV6,ipv6) \
578 $(call autoconf_bool,CONFIG_FS_WITH_LIBVPX,libvpx) \
579 $(call autoconf_bool,CONFIG_FS_WITH_LIBYUV,libyuv) \
580 $(call autoconf_bool,CONFIG_FS_WITH_LZMA,lzma) \
581 $(call autoconf_bool,CONFIG_FS_WITH_ODBC,core-odbc-support) \
582 $(call autoconf_bool,CONFIG_FS_WITH_OPT,optimization) \
583 $(call autoconf_bool,CONFIG_FS_WITH_POSTGRESQL,core-pgsql-pkgconfig) \
584 $(call autoconf_bool,CONFIG_FS_WITH_POSTGRESQL,core-pgsql-support) \
585 $(call autoconf_bool,CONFIG_FS_WITH_SILENT_RULES,silent-rules) \
586 $(call autoconf_bool,CONFIG_FS_WITH_SRTP,srtp) \
587 $(call autoconf_bool,CONFIG_FS_WITH_SRTP_GENERIC_AESICM,generic-aesicm) \
588 $(call autoconf_bool,CONFIG_FS_WITH_SRTP_KERNEL_LINUX,kernel-linux) \
589 $(call autoconf_bool,CONFIG_FS_WITH_SRTP_OPENSSL,openssl) \
590 $(call autoconf_bool,CONFIG_FS_WITH_STUN,stun) \
591 $(call autoconf_bool,CONFIG_FS_WITH_APR_THREADS,threads) \
592 $(call autoconf_bool,CONFIG_FS_WITH_VISIBILITY,visibility) \
593 $(call autoconf_bool,CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp && CONFIG_FS_WITH_FIXED_POINT,fixed-point) \
594 $(call autoconf_bool,CONFIG_PACKAGE_$(PKG_NAME)-mod-timerfd,timerfd-wrapper) \
595 $(if $(CONFIG_FS_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
596 $(if $(CONFIG_FS_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
597 $(if $(CONFIG_FS_WITH_OGG),--with-ogg="$(STAGING_DIR)/usr") \
598 $(if $(CONFIG_FS_WITH_OPENSSL),--with-openssl="pkg-config") \
599 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event),--with-erlang="$(CONFIG_FS_WITH_ERLANG)",--without-erlang) \
600 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
601 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),--with-python="$(CONFIG_FS_WITH_PYTHON_PATH)",--without-python) \
602 $(if ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-cdr)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-curl)),--with-libcurl="$(STAGING_DIR)/usr",--without-libcurl) \
603 --with$(if $(CONFIG_FS_WITH_MYSQL),,out)-mysql \
604 --with$(if $(CONFIG_FS_WITH_POSTGRESQL),,out)-pgsql \
605 --with$(if $(CONFIG_FS_WITH_SQLITE3),,out)-sqlite3 \
606
607
608 ifeq ($(CONFIG_TARGET_ARCH_PACKAGES),"kirkwood")
609 CONFIGURE_ARGS+= --enable-arm5e-asm \
610
611 endif
612
613
614 #ifeq ($(CONFIG_LIBC),"uClibc")
615 ifeq ($(CONFIG_ARCH),"mips")
616 CONFIGURE_VARS+= \
617 ac_cv_file_dbd_apr_dbd_mysql_c="no" \
618
619 endif
620 #endif
621
622
623 define Build/Prepare
624 $(call Build/Prepare/Default)
625 $(call Prepare/event-zmq)
626 $(call Prepare/json-cdr)
627 $(call Prepare/mongo)
628 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-08KHz),$(call Prepare/sounds-en-08KHz))
629 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-16KHz),$(call Prepare/sounds-en-16KHz))
630 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-32KHz),$(call Prepare/sounds-en-32KHz))
631 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en-48KHz),$(call Prepare/sounds-en-48KHz))
632 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-08KHz),$(call Prepare/sounds-moh-08KHz))
633 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-16KHz),$(call Prepare/sounds-moh-16KHz))
634 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-32KHz),$(call Prepare/sounds-moh-32KHz))
635 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh-48KHz),$(call Prepare/sounds-moh-48KHz))
636 ifeq ($(CONFIG_FS_WITH_LOCAL_SOURCE),y)
637 (cd $(PKG_BUILD_DIR); $(if $(CONFIG_FS_WITH_LATEST_HEAD),if $(QUILT_CMD) top > /dev/null 2>&1 && [ -f $(PKG_BUILD_DIR)/patches/series ]; then $(QUILT_CMD) pop -a; fi; git pull;) if $(QUILT_CMD) next > /dev/null 2>&1; then $(QUILT_CMD) push -a; fi)
638 endif
639 (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
640 endef
641
642
643 define Build/Configure
644 $(foreach m,$(FS_MOD_AVAILABLE),
645 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
646 $(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
647 ,
648 $(SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR)/modules.conf
649 )
650 )
651 $(call Build/Configure/Default)
652 endef
653
654
655 define Build/Compile
656 $(call Build/Compile/Default, \
657 DESTDIR="$(PKG_INSTALL_DIR)" \
658 all $(MAKE_INSTALL_TARGETS) \
659 )
660 $(SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
661 $(SED) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
662 endef
663
664
665 define Package/$(PKG_NAME)/install
666 $(INSTALL_DIR) $(1)/etc/config
667 $(INSTALL_DIR) $(1)/etc/default
668 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
669 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)/scripts
670 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
671 $(INSTALL_DIR) $(1)/etc/init.d
672 $(INSTALL_DIR) $(1)/usr/bin
673 $(INSTALL_DIR) $(1)/usr/lib
674 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
675 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
676 $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
677 $(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
678 $(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME)
679 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
680 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME)* $(1)/usr/lib/
681 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/$(PKG_NAME).pc $(1)/usr/lib/pkgconfig/
682 $(if $(1)/usr/lib/lib$(PKG_NAME).la,$(STAGING_DIR_HOST)/bin/sed -i -re 's|$(STAGING_DIR)||g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;s|-L$(PKG_BUILD_DIR)(.*)libzrtp ||g;:a;s|((-[IL]/\S+\s).*)\2|\1|;ta' $(1)/usr/lib/lib$(PKG_NAME).la)
683 endef
684
685
686 define Package/$(PKG_NAME)-collection-upstream-defaults/install
687 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
688 endef
689
690
691 define Package/$(PKG_NAME)-example-config/install
692 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/examples/conf
693 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/usr/share/$(PKG_NAME)/examples/conf/
694 endef
695
696
697 define Package/$(PKG_NAME)-config-upstream-defaults/install
698 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
699 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME) $(1)/etc
700 endef
701
702
703 define Package/$(PKG_NAME)-collection-minimal/install
704 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
705 endef
706
707
708 define Package/$(PKG_NAME)-collection-uci-minimal/install
709 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
710 endef
711
712
713 define Package/$(PKG_NAME)-config-minimal/install
714 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)/autoload_configs
715
716 #
717 # Copying dialplan directory jingle_profiles sip_profiles $(PKG_NAME).xml
718 # fur_elise.ttml mime.types tetris.ttml tones.conf vars.xml
719 #
720 $(foreach f,dialplan directory jingle_profiles sip_profiles $(PKG_NAME).xml fur_elise.ttml mime.types tetris.ttml vars.xml,$(if $(PKG_BUILD_DIR)/conf/vanilla/$(f),$(CP) $(PKG_BUILD_DIR)/conf/vanilla/$(f) $(1)/etc/$(PKG_NAME);))
721
722 #
723 # Copying acl ivr modules post_load_modules switch timezones
724 #
725 $(foreach f,acl ivr modules post_load_modules switch timezones,$(if $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/$(f).conf.xml,$(CP) $(PKG_BUILD_DIR)/conf/vanilla/autoload_configs/$(f).conf.xml $(1)/etc/$(PKG_NAME)/autoload_configs;))
726 endef
727
728
729 define Package/$(PKG_NAME)-sounds-en-08KHz/install
730 #
731 # sounds-en-8KHz
732 #
733 for dir in `(cd $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie;ls)`; \
734 do \
735 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/8000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/8000; \
736 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/8000/* $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/8000; \
737 done
738 endef
739
740
741 define Package/$(PKG_NAME)-sounds-en-16KHz/install
742 #
743 # sounds-en-16KHz
744 #
745 for dir in `(cd $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie;ls)`; \
746 do \
747 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/16000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/16000; \
748 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/16000/* $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/16000; \
749 done
750 endef
751
752
753 define Package/$(PKG_NAME)-sounds-en-32KHz/install
754 #
755 # sounds-en-32KHz
756 #
757 for dir in `(cd $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie;ls)`; \
758 do \
759 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/32000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/32000; \
760 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/32000/* $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/32000; \
761 done
762 endef
763
764
765 define Package/$(PKG_NAME)-sounds-en-48KHz/install
766 #
767 # sounds-en-48KHz
768 #
769 for dir in `(cd $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie;ls)`; \
770 do \
771 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/48000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/48000; \
772 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/48000/* $(1)/usr/share/$(PKG_NAME)/sounds/en/us/callie/$$$${dir}/48000; \
773 done
774 endef
775
776
777 define Package/$(PKG_NAME)-sounds-moh-08KHz/install
778 #
779 # sounds-moh-8KHz
780 #
781 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/music/8000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/music/8000;
782 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music/8000 $(1)/usr/share/$(PKG_NAME)/sounds/music;
783 endef
784
785
786 define Package/$(PKG_NAME)-sounds-moh-16KHz/install
787 #
788 # sounds-moh-16KHz
789 #
790 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/music/16000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/music/16000;
791 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music/16000 $(1)/usr/share/$(PKG_NAME)/sounds/music;
792 endef
793
794
795 define Package/$(PKG_NAME)-sounds-moh-32KHz/install
796 #
797 # sounds-moh-32KHz
798 #
799 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/music/32000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/music/32000;
800 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music/32000 $(1)/usr/share/$(PKG_NAME)/sounds/music;
801 endef
802
803
804 define Package/$(PKG_NAME)-sounds-moh-48KHz/install
805 #
806 # sounds-moh-48KHz
807 #
808 [ -d $(1)/usr/share/$(PKG_NAME)/sounds/music/48000 ] || $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds/music/48000;
809 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music/48000 $(1)/usr/share/$(PKG_NAME)/sounds/music;
810 endef
811
812
813 define Package/$(PKG_NAME)-tools/install
814 $(INSTALL_DIR) $(1)/usr/bin
815 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_cli $(1)/usr/bin/
816 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_encode $(1)/usr/bin/
817 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_ivrd $(1)/usr/bin/
818 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/
819 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/
820 $(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
821 $(STAGING_DIR_HOST)/bin/sed -i -re 's|$(ICONV_LDFLAGS)||g;s|$(INTL_LDFLAGS)||g;s|$(PKG_BUILD_DIR)|/usr|g;s|$(STAGING_DIR)||g;s|$(STAGING_DIR_HOST)|/usr|g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;:a;s|((-[IL]/\S+\s).*)[ ,\n]\1|\1|;ta' $(1)/usr/bin/fsxs
822 endef
823
824
825 # 1. Name
826 # 2. Title
827 # 3. Selection on module configuration file
828 # 4. Files (module files include different names)
829 # 5. Files (supporting files include different names)
830 # 6. Inter module depends
831 # 7. Extra depends
832 #
833 define BuildPlugin
834 define Package/$(PKG_NAME)-mod-$(1)
835 $$(call Package/$(PKG_NAME)/Default)
836 TITLE:= FS $(2) module
837 DEPENDS:= $(PKG_NAME) $(foreach m,$(6),+$(PKG_NAME)-mod-$(m)) $(7)
838 endef
839
840 define Package/$(PKG_NAME)-mod-$(1)/install
841 [ -z "mod_$(subst -,_,$(1))" ] || $(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)
842
843 for f in $$$$(realpath $$$$(wildcard $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/mod_$(subst -,_,$(1)).*)) $$$$(wildcard $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/$(4)_*); \
844 do \
845 $(CP) $$$$$$$${f} $$(1)/usr/lib/$(PKG_NAME)/; \
846 done
847
848 #
849 # mod_$(subst -,_,$(1)): $(5)
850 #
851 $(foreach f,$(5),[ -d $(dir $$(1)/usr/${f}) ] || $(INSTALL_DIR) $(dir $$(1)/usr/${f});$(CP) $$$$(wildcard $(PKG_INSTALL_DIR)/usr/${f}*) $(dir $$(1)/usr/${f});)
852
853 #
854 # mod_$(subst -,_,$(1)): Clean installed library control files from referencig to OpenWRT PATH.
855 #
856 $(STAGING_DIR_HOST)/bin/sed -i -re 's|$(STAGING_DIR)||g;s|$(TOOLCHAIN_DIR)||g;s|$(TARGET_CROSS)|usr|g;s|$(REAL_GNU_TARGET_NAME)|usr|g;s|-L$(PKG_BUILD_DIR)(.*)libzrtp ||g;s|-L$(PKG_BUILD_DIR)(.*)libtiff ||g;:a;s|((-[IL]/\S+\s).*)\2|\1|;ta' $(foreach l,`find $$(1)/usr/lib -name "*.la" -print`,$(l))
857
858 #
859 # 1. mod_$(subst -,_,$(1)) XML configuration files from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/conf/$(3)/autoload_configs/$(subst -,_,$(1)).conf.xml)))
860 #
861 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/conf/$(3)/autoload_configs/$(subst -,_,$(1)).conf.xml)),[ -d $$(1)/etc/$(PKG_NAME)/autoload_configs ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(CP) $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/conf/$(3)/autoload_configs/$(subst -,_,$(1)).conf.xml)) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(SED) 's|/usr/local/lib|/usr/lib|g;s|/usr/local|/etc|g' $$(1)/etc/$(PKG_NAME)/autoload_configs/$(subst -,_,$(1)).conf.xml)
862
863 #
864 # 2. mod_$(subst -,_,$(1)) XML configuration files from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/$(3)/$(1)/*/$(subst -,_,$(1)).conf.xml)))
865 #
866 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/$(3)/$(1)/*/$(subst -,_,$(1)).conf.xml)),[ -d $$(1)/etc/$(PKG_NAME)/autoload_configs ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(CP) $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/$(3)/$(1)/*/$(subst -,_,$(1)).conf.xml)) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(SED) 's|/usr/local/lib|/usr/lib|g;s|/usr/local|/etc|g' $$(1)/etc/$(PKG_NAME)/autoload_configs/$(subst -,_,$(1)).conf.xml)
867
868 #
869 # 3. mod_$(subst -,_,$(1)) XML configuration files from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf/autoload_configs/$(subst -,_,$(1)).conf.xml)))
870 #
871 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf/autoload_configs/$(subst -,_,$(1)).conf.xml)),[ -d $$(1)/etc/$(PKG_NAME)/autoload_configs ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(CP) $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf/autoload_configs/$(subst -,_,$(1)).conf.xml)) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(SED) 's|/usr/local/lib|/usr/lib|g;s|/usr/local|/etc|g' $$(1)/etc/$(PKG_NAME)/autoload_configs/$(subst -,_,$(1)).conf.xml)
872
873 #
874 # 4. mod_$(subst -,_,$(1)) XML configuration files from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf*/$(subst -,_,$(1)).conf.xml)))
875 #
876 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf*/$(subst -,_,$(1)).conf.xml)),[ -d $$(1)/etc/$(PKG_NAME)/autoload_configs ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(CP) $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/conf*/$(subst -,_,$(1)).conf.xml)) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(SED) 's|/usr/local/lib|/usr/lib|g;s|/usr/local|/etc|g' $$(1)/etc/$(PKG_NAME)/autoload_configs/$(subst -,_,$(1)).conf.xml)
877
878 #
879 # 5. mod_$(subst -,_,$(1)) XML configuration files from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/$(subst -,_,$(1)).conf.xml)))
880 #
881 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/$(subst -,_,$(1)).conf.xml)),[ -d $$(1)/etc/$(PKG_NAME)/autoload_configs ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(CP) $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/src/$(3)/*/mod_$(subst -,_,$(1))/$(subst -,_,$(1)).conf.xml)) $$(1)/etc/$(PKG_NAME)/autoload_configs;$(SED) 's|/usr/local/lib|/usr/lib|g;s|/usr/local|/etc|g' $$(1)/etc/$(PKG_NAME)/autoload_configs/$(subst -,_,$(1)).conf.xml)
882
883 #
884 # 6. Additional configuration files for mod_$(subst -,_,$(1)) from: $$$$(patsubst $(PKG_BUILD_DIR)/%,%,$$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/conf/$(3)/$(1)/*.$(1))))
885 #
886 $$$$(if $$$$(firstword $$$$(wildcard $(PKG_BUILD_DIR)/conf/$(3)/$(1)/*.$(1))),[ -d $$(1)/etc/$(PKG_NAME)/$(1) ] || $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME)/$(1);$(CP) $(PKG_BUILD_DIR)/conf/$(3)/$(1) $$(1)/etc/$(PKG_NAME))
887 endef
888
889 define Package/$(PKG_NAME)-mod-$(1)/postinst
890 #!/bin/sh
891 sed -i -e 's#[^ \t]\(,*\)\(.*\)"mod_console"/>\(.*\)$$$$#\1<load module="mod_console"/>#g' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
892 exit 0
893 endef
894
895 define Package/$(PKG_NAME)-mod-$(1)/prerm
896 #!/bin/sh
897 sed -i -e 's#[^ \t]\(,*\)\(.*\)"mod_console"/>\(.*\)$$$$#\1<!-- <load module="mod_console"/> -->#g' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
898 exit 0
899 endef
900
901 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
902 endef
903
904
905 $(eval $(call BuildPackage,$(PKG_NAME)))
906 $(eval $(call BuildPackage,$(PKG_NAME)-collection-upstream-defaults))
907 $(eval $(call BuildPackage,$(PKG_NAME)-collection-minimal))
908 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en-08KHz))
909 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en-16KHz))
910 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en-32KHz))
911 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en-48KHz))
912 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh-08KHz))
913 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh-16KHz))
914 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh-32KHz))
915 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh-48KHz))
916 $(eval $(call BuildPackage,$(PKG_NAME)-tools))
917 $(eval $(call BuildPackage,$(PKG_NAME)-example-config))
918 $(eval $(call BuildPackage,$(PKG_NAME)-config-upstream-defaults))
919 $(eval $(call BuildPackage,$(PKG_NAME)-config-minimal))
920
921
922 #
923 # $(eval $(call BuildPlugin,Name,Title,Selection on module Conf File,Files,Inter Depends,Extra Depends))
924 #
925 $(eval $(call BuildPlugin,abstraction,An Abstraction To API Call,vanilla,,,,))
926 $(eval $(call BuildPlugin,alsa,Alsa Endpoint,vanilla,,,,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA))
927 $(eval $(call BuildPlugin,amr,Adaptive Multi-Rate On Bandwidth Codec,vanilla,,,,))
928 $(eval $(call BuildPlugin,amrwb,Wide Band AMR,vanilla,,,,))
929 $(eval $(call BuildPlugin,av,FS Video Codec / File Format,vanilla,,,,@BROKEN))
930 $(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,vanilla,,,,))
931 $(eval $(call BuildPlugin,basic,BASIC,vanilla,,,,))
932 $(eval $(call BuildPlugin,bert,Naive Bit Error Rate Tester,vanilla,,,,))
933 $(eval $(call BuildPlugin,blacklist,Blacklist,vanilla,,,,))
934 $(eval $(call BuildPlugin,bv,BroadVoice 16/32-bit Audio Codec,vanilla,,,,@BROKEN)) # Requires unsupported libbroadvoice
935 $(eval $(call BuildPlugin,callcenter,Call Center,vanilla,,,,))
936 $(eval $(call BuildPlugin,cdr-csv,CSV-CDR Handler,mod,,,,)) # ~/conf
937 $(eval $(call BuildPlugin,cdr-mongodb,MongoDB CDR logger,vanilla,,,,))
938 $(eval $(call BuildPlugin,cdr-pg-csv,PostgreSQL CDR Handler,vanilla,,,,+coreutils +FS_WITH_POSTGRESQL:libpq @FS_WITH_POSTGRESQL))
939 $(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR Handler,vanilla,,,,@FS_WITH_SQLITE3))
940 $(eval $(call BuildPlugin,cepstral,Cepstral Interface,vanilla,,,,@BROKEN)) # needs <swift.h>
941 $(eval $(call BuildPlugin,cidlookup,Data Query For CID->NAME Services,mod,,,,+libcurl)) # ~/conf
942 $(eval $(call BuildPlugin,cluechoo,Framework Demo,vanilla,,,,))
943 $(eval $(call BuildPlugin,codec2,CoDec 2,,,,,@BROKEN)) # Requires unsupported libcodec2
944 $(eval $(call BuildPlugin,commands,API Commands,vanilla,,,,))
945 $(eval $(call BuildPlugin,conference,Conference Room,vanilla,,,,))
946 $(eval $(call BuildPlugin,console,Console Logger,vanilla,,,,))
947 $(eval $(call BuildPlugin,curl,HTTP Request,vanilla,,,,+libcurl))
948 $(eval $(call BuildPlugin,cv,Detect Video motion,vanilla,,,,@BROKEN))
949 $(eval $(call BuildPlugin,dahdi-codec,DAHDI Codecs,vanilla,,,,))
950 $(eval $(call BuildPlugin,db,Database Backend,vanilla,,,,+libdb47))
951 $(eval $(call BuildPlugin,dialplan-asterisk,Asterisk Dialplan Parser,vanilla,,,,))
952 $(eval $(call BuildPlugin,dialplan-directory,Dialplan Directory,vanilla,,,,))
953 $(eval $(call BuildPlugin,dialplan-xml,Dialplan-XML Interface,vanilla,,,,))
954 $(eval $(call BuildPlugin,dingaling,Jabber Interface,vanilla,,,,+libopenssl))
955 $(eval $(call BuildPlugin,directory,Search By Name Directory IVR,vanilla,,,,))
956 $(eval $(call BuildPlugin,distributor,Simple Robin-Round Load,vanilla,,,,))
957 $(eval $(call BuildPlugin,dptools,Dialplan Tools,vanilla,,,,))
958 $(eval $(call BuildPlugin,easyroute,Simple DID Routing,vanilla,,,,))
959 $(eval $(call BuildPlugin,enum,ENUM Routing,,,,,+libldns))
960 $(eval $(call BuildPlugin,erlang-event,Erlang Event Handler,vanilla,,,,+erlang))
961 $(eval $(call BuildPlugin,esf,Extra SIP Functionality,vanilla,,,,))
962 $(eval $(call BuildPlugin,esl,Allow to generate remote ESL commands,vanilla,,,,@BROKEN))
963 $(eval $(call BuildPlugin,event-multicast,Multicast Event Handler,vanilla,,,,))
964 $(eval $(call BuildPlugin,event-socket,Socket Event Handler,vanilla,,,,))
965 $(eval $(call BuildPlugin,event-zmq,Socket Event Handler By Zero MQ,vanilla,,,,+libuuid))
966 $(eval $(call BuildPlugin,expr,Expression Evaluation,vanilla,,,,))
967 $(eval $(call BuildPlugin,fifo,FIFO,vanilla,,,,))
968 $(eval $(call BuildPlugin,file-string,Streaming Multiple Sound Files Sequentially,vanilla,,,,@OBSOLETE)) # merged into dptools
969 #$(eval $(call BuildPlugin,flite,Festival TTS,vanilla,,,,+flite @BROKEN)) # flite is from old package repo
970 $(eval $(call BuildPlugin,format-cdr,XML CDR Module to files or curl,vanilla,,,,))
971 $(eval $(call BuildPlugin,fsk,Bell-202 1200-Baud FSK Decoder,vanilla,,,,))
972 #$(eval $(call BuildPlugin,fsv,Video Player / Recorder,vanilla,,,,+libyuv @BROKEN)) # Requires unsupported libyuv.
973 $(eval $(call BuildPlugin,g723-1,G.723.1 Codec,vanilla,,,,))
974 $(eval $(call BuildPlugin,g729,G.729 Codec,vanilla,,,,))
975 $(eval $(call BuildPlugin,graylog2,Graylog2 GELF logger,vanilla,,,,))
976 $(eval $(call BuildPlugin,gsmopen,GSM Modem compatible Endpoint,mod,,,alsa,+FS_WITH_ALSA:alsa-lib +FS_WITH_LZMA:liblzma @FS_WITH_ALSA @BROKEN)) # needs gsmlib
977 $(eval $(call BuildPlugin,h26x,H26X Linear Codec,vanilla,,,,))
978 #$(eval $(call BuildPlugin,h323,H323 Endpoint,mod,,,,@BROKEN)) # Req. H323Plus v1.24.x or newer
979 $(eval $(call BuildPlugin,hash,API For Manipulating A Hash Table,vanilla,,,,))
980 $(eval $(call BuildPlugin,hiredis,Redis DB access,vanilla,,,,+libhiredis @BROKEN))
981 #$(eval $(call BuildPlugin,html5,HTML5 Endpoint Module,vanilla,,,,)) # defunct?
982 $(eval $(call BuildPlugin,httapi,HT Telephony API and HTTP Caching,mod,,,,)) # ~/conf
983 $(eval $(call BuildPlugin,http-cache,HTTP GET With Caching,mod,,,,+libcurl)) # ~/conf
984 #$(eval $(call BuildPlugin,ilbc,ILBC Codec,vanilla,,,,+libilbc @BROKEN)) # Requires unsupported libilbc.
985 $(eval $(call BuildPlugin,isac,iSAC Codec,vanilla,,,,))
986 #$(eval $(call BuildPlugin,java,Java Language Interface,vanilla,,,,@BROKEN)) # needs java
987 $(eval $(call BuildPlugin,json-cdr,JSon-CDR Interface,mod,,,,+libcurl))
988 $(eval $(call BuildPlugin,kazoo,Socket Controlled Event Handler,vanilla,,,,+erlang))
989 $(eval $(call BuildPlugin,ldap,LDAP interface,vanilla,,,,+libopenldap))
990 $(eval $(call BuildPlugin,lcr,Least Cost Routing,vanilla,,,,))
991 $(eval $(call BuildPlugin,local-stream,Multi-Channel On Same Stream,vanilla,,,,))
992 $(eval $(call BuildPlugin,logfile,File Logger,vanilla,,,,))
993 $(eval $(call BuildPlugin,loopback,Loopback to Dialplan Endpoint,vanilla,,,,))
994 $(eval $(call BuildPlugin,lua,LUA Language Interface,vanilla,,,,+liblua))
995 #$(eval $(call BuildPlugin,managed,Media Switching Software Library,vanilla,,,,+glib2 @BROKEN)) # needs Mono
996 #$(eval $(call BuildPlugin,memcache,MemCached Interface,vanilla,,,,+libmemcached @BROKEN)) # Req host libmemcached
997 #$(eval $(call BuildPlugin,mongo,A Document-Oriented Database,vanilla,,,,@BROKEN))
998 #$(eval $(call BuildPlugin,mp4,MP4 File Format Support For Video,vanilla,,,,@BROKEN)) # needs host libmp4v2
999 $(eval $(call BuildPlugin,mp4v,MP4 CoDec Support For Video,vanilla,,,,))
1000 $(eval $(call BuildPlugin,native-file,WAV Format Sound Player,vanilla,,,,))
1001 $(eval $(call BuildPlugin,nibblebill,Credit / Debit Billing,vanilla,,,,))
1002 $(eval $(call BuildPlugin,opus,Opus CoDec,vanilla,,,,+libopus))
1003 $(eval $(call BuildPlugin,oreka,Media Recording with Oreka,vanilla,,,,))
1004 $(eval $(call BuildPlugin,png,play a png as video with audio,vanilla,,,,+libpng))
1005 $(eval $(call BuildPlugin,perl,Perl Language Interface,vanilla,,lib/perl5/$(PERL_VERSION)/CORE/$(PKG_NAME).la lib/perl5/$(PERL_VERSION)/CORE/$(PKG_NAME).pm lib/perl5/$(PERL_VERSION)/CORE/$(PKG_NAME).so,,+perl +libdb47 +libgdbm))
1006 $(eval $(call BuildPlugin,portaudio,Portaudio To Sound Card Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio
1007 $(eval $(call BuildPlugin,portaudio-stream,Portaudio Streaming Interface,vanilla,,,alsa,+FS_WITH_ALSA:alsa-lib @FS_WITH_ALSA @BROKEN)) # needs portaudio
1008 $(eval $(call BuildPlugin,posix-timer,POSIX Compliant Soft Timer,vanilla,,,,))
1009 $(eval $(call BuildPlugin,prefix,longest-prefix match in store,mod,,,,))
1010 $(eval $(call BuildPlugin,python,Python Language Interface,vanilla,,lib/python$(PYTHON3_VERSION)/site-packages/freeswitch.py,,+FS_WITH_PYTHON:python3 @FS_WITH_PYTHON))
1011 #$(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,vanilla,,,,+freeradius3 @BROKEN)) # fails in freeradius-client
1012 $(eval $(call BuildPlugin,rayo,Rayo server & node implementation,vanilla,,,,))
1013 $(eval $(call BuildPlugin,redis,Redis limit backend,vanilla,,,,))
1014 $(eval $(call BuildPlugin,rss,RRS Feeds via TTS,vanilla,,,,))
1015 $(eval $(call BuildPlugin,rtc,RTC endpoint,vanilla,,,,))
1016 $(eval $(call BuildPlugin,rtmp,RTMP Protocol Handler,vanilla,,,,))
1017 #$(eval $(call BuildPlugin,sangoma-codec,Sangoma Codec,vanilla,,,,@BROKEN)) # Req. Sangoma CoDec source
1018 $(eval $(call BuildPlugin,say-de,German Say,vanilla,,,,))
1019 $(eval $(call BuildPlugin,say-en,English Say,vanilla,,,,))
1020 $(eval $(call BuildPlugin,say-es,Spanish Say,vanilla,,,,))
1021 $(eval $(call BuildPlugin,say-fa,Persian Say,vanilla,,,,))
1022 $(eval $(call BuildPlugin,say-fr,French Say,vanilla,,,,))
1023 $(eval $(call BuildPlugin,say-hu,Hungarian Say,vanilla,,,,))
1024 $(eval $(call BuildPlugin,say-it,Italian Say,vanilla,,,,))
1025 $(eval $(call BuildPlugin,say-nl,Dutch Say,vanilla,,,,))
1026 $(eval $(call BuildPlugin,say-pt,Portugeese Say,vanilla,,,,))
1027 $(eval $(call BuildPlugin,say-ru,Russian Say,vanilla,,,,))
1028 $(eval $(call BuildPlugin,say-th,Thai Say,vanilla,,,,))
1029 $(eval $(call BuildPlugin,say-zh,Chineese Say,vanilla,,,,))
1030 $(eval $(call BuildPlugin,shell-stream,Streaming Audio Through CLI,vanilla,,,,))
1031 #$(eval $(call BuildPlugin,silk,Skype(TM) SILK Codec Module,vanilla,,,,+libsilk @BROKEN)) # Requires unsupported libsilk
1032 #$(eval $(call BuildPlugin,siren,G.722.1 Codec,vanilla,,,,+libg7221 @BROKEN)) # Requires unsupported libg7221
1033 #$(eval $(call BuildPlugin,skel,Template For New Module,vanilla,,,,@BROKEN))
1034 $(eval $(call BuildPlugin,skinny,Skinny Call Control Protocol (SCCP),vanilla,,,,))
1035 $(eval $(call BuildPlugin,skypopen,Skype Compatible Endpoint,mod,,,,@FEATURE_drawing-backend_libX11))
1036 $(eval $(call BuildPlugin,sms,SMS,vanilla,,,,))
1037 #$(eval $(call BuildPlugin,smpp,smpp client and server implementation,vanilla,,,,@BROKEN))
1038 $(eval $(call BuildPlugin,snapshot,Record Audio Snapshot to File,vanilla,,,,))
1039 $(eval $(call BuildPlugin,sndfile,Multi-Format Sound File,vanilla,,,,+libsndfile))
1040 $(eval $(call BuildPlugin,snmp,SNMP AgentX Subagent,vanilla,,,,+libnetsnmp))
1041 $(eval $(call BuildPlugin,snom,SNOM specific features,vanilla,,,,))
1042 $(eval $(call BuildPlugin,sofia,SOFIA SIP,mod,,,,)) # ~/conf
1043 $(eval $(call BuildPlugin,sonar,Sonar Ping Timer,vanilla,,,,))
1044 $(eval $(call BuildPlugin,spandsp,Span DSP,mod,,,,+libjpeg +FS_WITH_LZMA:liblzma @FS_WITH_LZMA +libtiff)) # ~/conf
1045 $(eval $(call BuildPlugin,spidermonkey,JavaScript,vanilla,,,,@BROKEN)) # fails in js
1046 #$(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,vanilla,,,,@BROKEN))
1047 #$(eval $(call BuildPlugin,spidermonkey-curl,JavaScript Curl,vanilla,,,,@BROKEN))
1048 #$(eval $(call BuildPlugin,spidermonkey-odbc,JavaScript ODBC,vanilla,,,,@BROKEN))
1049 #$(eval $(call BuildPlugin,spidermonkey-socket,JavaScript Socket,vanilla,,,,@BROKEN))
1050 #$(eval $(call BuildPlugin,spidermonkey-teletone,JavaScript Teletone,vanilla,,,,@BROKEN))
1051 $(eval $(call BuildPlugin,spy,User Spy,vanilla,,,,))
1052 $(eval $(call BuildPlugin,ssml,SSML audio rendering format,mod,,,rayo,))
1053 $(eval $(call BuildPlugin,stress,Voice Stress Detection,vanilla,,,,))
1054 $(eval $(call BuildPlugin,syslog,SysLog logger,vanilla,,,,))
1055 $(eval $(call BuildPlugin,timerfd,Linux Kernel timerfd API,vanilla,,,,))
1056 $(eval $(call BuildPlugin,tone-stream,Tone Generation Stream,vanilla,,,,))
1057 $(eval $(call BuildPlugin,translate,Translate,vanilla,,,,))
1058 $(eval $(call BuildPlugin,tts-commandline,ASR TTS Command Interface,vanilla,,,,))
1059 #$(eval $(call BuildPlugin,unimrcp,UniMRCP (MRCP Client),vanilla,,,,@BROKEN))
1060 $(eval $(call BuildPlugin,valet-parking,Valet Parking Application,vanilla,,,,))
1061 $(eval $(call BuildPlugin,verto,HTML5 Verto interface,vanilla,,,perl rtc,+perl))
1062 $(eval $(call BuildPlugin,vmd,VoiceMail Beep Detection,vanilla,,,,))
1063 $(eval $(call BuildPlugin,voicemail,VoiceMail,vanilla,,,,))
1064 $(eval $(call BuildPlugin,voicemail-ivr,VoiceMail IVR,vanilla,,,,))
1065 $(eval $(call BuildPlugin,xml-cdr,XML-CDR Handler,vanilla,,,,+libcurl))
1066 $(eval $(call BuildPlugin,xml-curl,XML-Curl Gateway,vanilla,,,,+libcurl))
1067 $(eval $(call BuildPlugin,xml-ldap,LDAP-XML Gateway,vanilla,,,,+PACKAGE_$(PKG_NAME)-mod-ldap:libopenldap))
1068 $(eval $(call BuildPlugin,xml-rpc,XML-RPC Interface,vanilla,,,,))
1069 $(eval $(call BuildPlugin,xml-radius,Radius authentication and authorization,vanilla,,,,+freeradius3))
1070 $(eval $(call BuildPlugin,xml-scgi,SCGI XML Gateway,vanilla,,,,))
1071 $(eval $(call BuildPlugin,yaml,YAML language,vanilla,,,,+libyaml))