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