bb6263193dd7dac6020ebf4e00099202936d3b9e
[packages.git] / net / freeswitch / Makefile
1 #
2 # Copyright (C) 2009-2011 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 PKG_NAME:=freeswitch
11 PKG_VERSION:=1.0.7
12 PKG_REV:=2146583663a5067f6ff71df1e48c3bb900e89db8
13 PKG_RELEASE:=$(PKG_REV)
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=git://git.$(PKG_NAME).org/$(PKG_NAME).git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_FIXUP:=libtool
23
24 FS_MOD_AVAILABLE:= \
25         alsa \
26         amr \
27         amrwb \
28         avmd \
29         bv \
30         callcenter \
31         cdr-csv \
32         cdr-pg-csv \
33         cdr-sqlite \
34         celt \
35         cepstral \
36         cidlookup \
37         cluechoo \
38         codec2 \
39         commands \
40         conference \
41         console \
42         curl \
43         dahdi-codec \
44         db \
45         dialplan-asterisk \
46         dialplan-directory \
47         dialplan-xml \
48         dingaling \
49         directory \
50         distributor \
51         dptools \
52         easyroute \
53         enum \
54         erlang-event \
55         esf \
56         event-multicast \
57         event-socket \
58         event-zmq \
59         expr \
60         fifo \
61         file-string \
62         flite \
63         fsv \
64         g723-1 \
65         g729 \
66         h26x \
67         h323 \
68         hash \
69         ilbc \
70         java \
71         lcr \
72         ldap \
73         local-stream \
74         logfile \
75         loopback \
76         lua \
77         managed \
78         memcache \
79         native-file \
80         nibblebill \
81         opal \
82         openzap \
83         perl \
84         pocketsphinx \
85         portaudio \
86         portaudio-stream \
87         python \
88         radius-cdr \
89         rss \
90         say-de \
91         say-en \
92         say-es \
93         say-fr \
94         say-hu \
95         say-it \
96         say-nl \
97         say-pt \
98         say-ru \
99         say-th \
100         say-zh \
101         shell-stream \
102         shout \
103         silk \
104         siren \
105         skinny \
106         skypopen \
107         sangoma-codec \
108         snapshot \
109         snipe-hunt \
110         sndfile \
111         snom \
112         sofia \
113         spandsp \
114         speex \
115         spidermonkey \
116         spidermonkey-core-db \
117         spidermonkey-curl \
118         spidermonkey-odbc \
119         spidermonkey-socket \
120         spidermonkey-teletone \
121         spy \
122         stress \
123         syslog \
124         tone-stream \
125         tts-commandline \
126         unimrcp \
127         valet-parking \
128         vmd \
129         voicemail \
130         xml-cdr \
131         xml-curl \
132         xml-ldap \
133         xml-rpc \
134         yaml \
135
136 PKG_CONFIG_DEPENDS:= \
137         $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_MOD_AVAILABLE)) \
138
139 include $(INCLUDE_DIR)/package.mk
140
141 define Package/$(PKG_NAME)/Default
142   SECTION:=net
143   CATEGORY:=Network
144   SUBMENU:=Telephony
145   URL:=http://www.$(PKG_NAME).org/
146   MAINTAINER:=Mazilo <OpenWRT@slickdeals.endjunk.com>
147 endef
148
149
150 define Package/$(PKG_NAME)
151 $(call Package/$(PKG_NAME)/Default)
152   TITLE:=FreeSWITCH open source telephony platform
153   DEPENDS:= +libopenssl +libreadline +libncurses +libpthread +libstdcpp
154   MENU:=1
155 endef
156
157 define Package/$(PKG_NAME)/description
158   FreeSWITCH is an open source telephony platform designed to 
159   facilitate the creation of voice and chat driven products scaling 
160   from a soft-phone up to a soft-switch.  See http://wiki.$(PKG_NAME).org
161 endef
162
163 define Package/$(PKG_NAME)-example-config
164 $(call Package/$(PKG_NAME)/Default)
165   TITLE:=FreeSWITCH example config (commented)
166   DEPENDS:= $(PKG_NAME)
167 endef
168
169 define Package/$(PKG_NAME)-example-config/description
170   The default configuration included with FreeSWITCH. It is not intended to be
171   a final product, and is thus moved to /usr/share/$(PKG_NAME)/examples/conf to
172   be an example of how FreeSWITCH can be configured.
173 endef
174
175 define Package/$(PKG_NAME)-config-upstream-defaults
176 $(call Package/$(PKG_NAME)/Default)
177   TITLE:=FreeSWITCH upstream config
178   DEPENDS:= $(PKG_NAME)
179 endef
180
181 define Package/$(PKG_NAME)-config-upstream-defaults/description
182   The default configuration included with FreeSWITCH. It is not intended to be
183   a final product, and but is included for those who don't want to use the 
184   OpenWRT configuration and/or want to try things as prepared by upstream.
185 endef
186
187 define Package/$(PKG_NAME)-config-minimal
188 $(call Package/$(PKG_NAME)/Default)
189   TITLE:=FreeSWITCH a minimal FS config
190   DEPENDS:= $(PKG_NAME)
191 endef
192
193 define Package/$(PKG_NAME)-config-minimal/description
194   A minimal configuration of FreeSWITCH for OpenWRT devices.  Is what the UCI 
195   configuration began with.
196 endef
197
198 define Package/$(PKG_NAME)-collection-upstream-defaults
199 $(call Package/$(PKG_NAME)/Default)
200   TITLE:=FreeSWITCH upstream default (sample) config
201   DEPENDS:= $(PKG_NAME) \
202                 +$(PKG_NAME)-config-upstream-defaults \
203                 +$(PKG_NAME)-mod-callcenter \
204                 +$(PKG_NAME)-mod-codec2 \
205                 +$(PKG_NAME)-mod-commands \
206                 +$(PKG_NAME)-mod-conference \
207                 +$(PKG_NAME)-mod-curl \
208                 +$(PKG_NAME)-mod-dialplan-xml \
209                 +$(PKG_NAME)-mod-dingaling \
210                 +$(PKG_NAME)-mod-dptools \
211                 +$(PKG_NAME)-mod-event-socket \
212                 +$(PKG_NAME)-mod-g723-1 \
213                 +$(PKG_NAME)-mod-g729 \
214                 +$(PKG_NAME)-mod-hash \
215                 +$(PKG_NAME)-mod-ilbc \
216                 +$(PKG_NAME)-mod-local-stream \
217                 +$(PKG_NAME)-mod-logfile \
218                 +$(PKG_NAME)-mod-lua \
219                 +$(PKG_NAME)-mod-native-file \
220                 +$(PKG_NAME)-mod-siren \
221                 +$(PKG_NAME)-mod-sndfile \
222                 +$(PKG_NAME)-mod-sofia \
223                 +$(PKG_NAME)-mod-spandsp \
224                 +$(PKG_NAME)-mod-speex \
225                 +$(PKG_NAME)-mod-syslog \
226                 +$(PKG_NAME)-mod-tone-stream \
227                 +$(PKG_NAME)-mod-xml-curl \
228                 +$(PKG_NAME)-mod-xml-rpc \
229                 +$(PKG_NAME)-tools
230 endef
231
232 define Package/$(PKG_NAME)-collection-minimal
233 $(call Package/$(PKG_NAME)/Default)
234   TITLE:=A FreeSWITCH minimal package collection
235   DEPENDS:= $(PKG_NAME) \
236                 +$(PKG_NAME)-config-minimal \
237                 +$(PKG_NAME)-mod-codec2 \
238                 +$(PKG_NAME)-mod-commands \
239                 +$(PKG_NAME)-mod-dialplan-xml \
240                 +$(PKG_NAME)-mod-dptools \
241                 +$(PKG_NAME)-mod-event-socket \
242                 +$(PKG_NAME)-mod-hash \
243                 +$(PKG_NAME)-mod-local-stream \
244                 +$(PKG_NAME)-mod-sndfile \
245                 +$(PKG_NAME)-mod-sofia \
246                 +$(PKG_NAME)-mod-syslog \
247                 +$(PKG_NAME)-mod-tone-stream \
248                 +$(PKG_NAME)-tools
249 endef
250
251 define Package/$(PKG_NAME)-sounds-en
252 $(call Package/$(PKG_NAME)/Default)
253   TITLE:=FreeSWITCH english sounds
254   DEPENDS:= $(PKG_NAME)
255 endef
256
257
258 define Package/$(PKG_NAME)-sounds-moh
259 $(call Package/$(PKG_NAME)/Default)
260   TITLE:=FreeSWITCH music-on-hold sounds
261   DEPENDS:= $(PKG_NAME)
262 endef
263
264
265 define Package/$(PKG_NAME)-tools
266 $(call Package/$(PKG_NAME)/Default)
267   TITLE:=FreeSWITCH control tools
268   DEPENDS:= $(PKG_NAME)
269 endef
270
271
272 define Download/files
273  define Download/$(1)
274   FILE:=$(2)
275   URL:=http://files.$(PKG_NAME).org/$(4)
276   MD5SUM:=$(3)
277  endef
278  define Prepare/$(1)
279   $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(5)
280  endef
281  $$(eval $$(call Download,$(1)))
282 endef
283
284 MAKE_INSTALL_TARGETS:=install
285
286 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),)
287  $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,downloads/libs/,libs/))
288 endif
289
290 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
291  $(eval $(call Download/files,json-c,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,downloads/libs/,libs/))
292 endif
293
294 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
295  $(eval $(call Download/files,flite,flite-1.3.99-latest.tar.gz,365b60881715c5e13c0d8bc37d9be6ff,downloads/libs/,libs/))
296 endif
297
298 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en),)
299  $(eval $(call Download/files,sounds-en,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.15.tar.gz,a0e466fe48164ac802f851312fd3fc79,,))
300         MAKE_INSTALL_TARGETS+= sounds-install
301 endif
302
303 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh),)
304  $(eval $(call Download/files,sounds-moh,$(PKG_NAME)-sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,))
305         MAKE_INSTALL_TARGETS+= moh-install
306 endif
307
308 # XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
309 ifneq ($(CONFIG_avr32),)
310   TARGET_CFLAGS += -fgnu89-inline
311   TARGET_CXXFLAGS += -fgnu89-inline
312 endif
313
314 ifneq ($(CONFIG_USE_EGLIBC),)
315   ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
316     TARGET_CFLAGS += -DNO_GETLOGIN
317   endif
318 endif
319
320 FS_TARGET_CFLAGS:= ${TARGET_CFLAGS} -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format
321 FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
322 FS_TARGET_CPPFLAGS:= -I. -I./lua ${TARGET_CPPFLAGS}
323
324
325 CONFIGURE_ARGS+= \
326         --prefix="/usr/share/$(PKG_NAME)" \
327         --bindir="/usr/bin" \
328         --libdir="/usr/lib" \
329         --sysconfdir="/etc/$(PKG_NAME)" \
330         --with-modinstdir="/usr/lib/$(PKG_NAME)" \
331         --enable-ipv6 \
332         --enable-optimization \
333         --with-random="/dev/urandom" \
334         $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-iogg) \
335         $(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) \
336         $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-dingaling),--with-openssl="$(STAGING_DIR)/usr",--without-openssl) \
337         $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
338         $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp),--enable-builtin-tiff,) \
339
340
341 CONFIGURE_VARS+= \
342         config_TARGET_CC="${TARGET_CC}" \
343         config_TARGET_CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
344         config_TARGET_CXX="${TARGET_CXX}" \
345         config_TARGET_CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
346         config_TARGET_CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
347         config_BUILD_CC="${HOSTCC}" \
348         config_TARGET_READLINE_INC="${FS_TARGET_CPPFLAGS}" \
349         config_TARGET_READLINE_LIBS="${TARGET_LDFLAGS} -lreadline -lncurses" \
350         config_TARGET_LIBS="${TARGET_LDFLAGS} -lpthread" \
351         CC_FOR_BUILD="${HOSTCC}" \
352         LDFLAGS_FOR_BUILD="${HOST_LDFLAGS}" \
353         CC="${TARGET_CC}" \
354         CXX="${TARGET_CXX}" \
355         CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
356         CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
357         CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
358         LDFLAGS="${TARGET_LDFLAGS} -Wl,-rpath-link=\"${STAGING_DIR}/usr/lib\"" \
359         ac_cv_dev_urandom="yes" \
360         ac_cv_file_dbd_apr_dbd_mysql_c="no" \
361         ac_cv_file__dev_random="no" \
362         ac_cv_file__dev_urandom="yes" \
363         ac_cv_file___dev_urandom_="yes" \
364         ac_cv_func_mmap_fixed_mapped="yes" \
365         ac_cv_func_pthread_rwlock_init="yes" \
366         ac_cv_struct_rlimit="yes" \
367         apr_cv_mutex_recursive="yes" \
368         apr_cv_process_shared_works="no" \
369         apr_cv_tcp_nodelay_with_cork="yes" \
370         apr_cv_type_rwlock_t="yes" \
371         ac_cv_path_LIBGNUTLS_CONFIG="no" \
372
373
374 define Build/Prepare
375         $(call Build/Prepare/Default)
376         $(call Prepare/celt)
377         $(call Prepare/flite)
378         $(call Prepare/json-c)
379         $(call Prepare/sounds-en)
380         $(call Prepare/sounds-moh)
381         (cd $(PKG_BUILD_DIR); [ -h noreg ] || touch noreg)      # Just to shut up Cluecon reg. msg.
382         (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
383 endef
384
385 define Build/Configure
386         $(call Build/Configure/Default,)
387         $(foreach m,$(FS_MOD_AVAILABLE),
388                 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
389                         $(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
390                 ,
391                         $(SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR)/modules.conf
392                 )
393         )
394 endef
395
396 define Build/Compile
397         $(MAKE) -C $(PKG_BUILD_DIR) \
398                 AR="$(TARGET_CROSS)ar" \
399                 RANLIB="$(TARGET_CROSS)ranlib" \
400                 CC="$(TARGET_CC)" \
401                 CXX="$(TARGET_CXX)" \
402                 DESTDIR="$(PKG_INSTALL_DIR)" \
403                 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
404                 all $(MAKE_INSTALL_TARGETS)
405         $(SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
406         $(SED) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
407 endef
408
409 define Build/InstallDev
410         $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
411         $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/include/* $(1)/usr/include/$(PKG_NAME)/
412         $(INSTALL_DIR) $(1)/usr/lib
413         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).{a,so*} $(1)/usr/lib/
414 endef
415
416 define Package/$(PKG_NAME)/install
417         $(INSTALL_DIR) $(1)/usr/bin
418         $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
419         $(INSTALL_DIR) $(1)/usr/lib
420         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so.* $(1)/usr/lib/
421         $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)
422         $(INSTALL_DIR) $(1)/etc/default
423         $(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
424         $(INSTALL_DIR) $(1)/etc/init.d
425         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
426         $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
427         $(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME)
428         $(INSTALL_DIR) $(1)/etc/config
429         $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
430 endef
431
432 define Package/$(PKG_NAME)-collection-upstream-defaults/install
433         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
434 endef
435
436 define Package/$(PKG_NAME)-example-config/install
437         $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/examples/conf
438         $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/usr/share/$(PKG_NAME)/examples/conf/
439 endef
440
441 define Package/$(PKG_NAME)-config-upstream-defaults/install
442         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
443         $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/etc/$(PKG_NAME)/
444 endef
445
446 define Package/$(PKG_NAME)-collection-minimal/install
447         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
448 endef
449
450 define Package/$(PKG_NAME)-collection-uci-minimal/install
451         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
452 endef
453
454 define Package/$(PKG_NAME)-config-minimal/install
455         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
456         $(CP) ./files/etc.minimal/* $(1)/etc/$(PKG_NAME)/
457 endef
458
459 define Package/$(PKG_NAME)-sounds-en/install
460         $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
461         $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en $(1)/usr/share/$(PKG_NAME)/sounds/
462 endef
463
464 define Package/$(PKG_NAME)-sounds-moh/install
465         $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
466         $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music $(1)/usr/share/$(PKG_NAME)/sounds/
467 endef
468
469 define Package/$(PKG_NAME)-tools/install
470         $(INSTALL_DIR) $(1)/usr/bin
471         $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_cli $(1)/usr/bin/
472         $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_encode $(1)/usr/bin/
473         $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_ivrd $(1)/usr/bin/
474         $(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
475 endef
476
477 # 1. Name
478 # 2. Title
479 # 3. Files
480 # 4. Inter Depends
481 # 5. Extra Depends
482 define BuildPlugin
483   define Package/$(PKG_NAME)-mod-$(1)
484     $$(call Package/$(PKG_NAME)/Default)
485     TITLE:= FS $(2) module
486     DEPENDS:= $(PKG_NAME) $$(foreach m,$(4),+$(PKG_NAME)-mod-$$m) $(5)
487   endef
488
489   define Package/$(PKG_NAME)-mod-$(1)/install
490         [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)
491         for f in $(3); do \
492                 $(CP) \
493                         $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/$$$$$$$${f}.so \
494                         $$(1)/usr/lib/$(PKG_NAME)/ ; \
495         done
496         if [ -d "./files/etc.packages/$(1)" ]; then \
497                 $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME) ; \
498                 $(CP) \
499                         ./files/etc.packages/$(1)/* \
500                         $$(1)/etc/$(PKG_NAME)/ ; \
501         fi
502   endef
503
504   define Package/$(PKG_NAME)-mod-$(1)/postinst
505 #!/bin/sh
506 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
507   endef
508
509   define Package/$(PKG_NAME)-mod-$(1)/postrm
510 #!/bin/sh
511 sed -i -e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
512   endef
513
514   $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
515 endef
516
517 $(eval $(call BuildPackage,$(PKG_NAME)))
518 $(eval $(call BuildPackage,$(PKG_NAME)-collection-upstream-defaults))
519 $(eval $(call BuildPackage,$(PKG_NAME)-collection-minimal))
520 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en))
521 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh))
522 $(eval $(call BuildPackage,$(PKG_NAME)-tools))
523 $(eval $(call BuildPackage,$(PKG_NAME)-example-config))
524 $(eval $(call BuildPackage,$(PKG_NAME)-config-upstream-defaults))
525 $(eval $(call BuildPackage,$(PKG_NAME)-config-minimal))
526
527 #$(eval $(call BuildPlugin,Name,Title,Files,Depends))
528 $(eval $(call BuildPlugin,alsa,Alsa endpoint,mod_alsa,,))
529 $(eval $(call BuildPlugin,amr,GSM-AMR codec,mod_amr,,))
530 $(eval $(call BuildPlugin,amrwb,GSM-AMRWB,mod_amrwb,,))
531 $(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,mod_avmd,,))
532 $(eval $(call BuildPlugin,bv,codec mod_bv,mod_bv,,))
533 $(eval $(call BuildPlugin,callcenter,Call Center,mod_callcenter,,))
534 $(eval $(call BuildPlugin,cdr-csv,CSV-CDR handler,mod_cdr_csv,,))
535 $(eval $(call BuildPlugin,cdr-pg-csv,Postgress CDR handler,mod_cdr_pg_csv,,+postgresql))
536 $(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR handler,mod_cdr_sqlite,,+sqlite3))
537 $(eval $(call BuildPlugin,celt,CELT ultra-low delay codec,mod_celt,,+libogg))
538 $(eval $(call BuildPlugin,cepstral,Cepstral interface,mod_cepstral,,@BROKEN)) # needs <swift.h>
539 $(eval $(call BuildPlugin,cidlookup,applications mod_cidlookup,mod_cidlookup,,))
540 $(eval $(call BuildPlugin,cluechoo,Framework Demo,mod_cluechoo,,))
541 $(eval $(call BuildPlugin,codec2,CoDec 2,mod_codec2,,))
542 $(eval $(call BuildPlugin,commands,API commands,mod_commands,,))
543 $(eval $(call BuildPlugin,conference,Conference room,mod_conference,,))
544 $(eval $(call BuildPlugin,console,Console logger,mod_console,,))
545 $(eval $(call BuildPlugin,curl,HTTP request,mod_curl,,+libcurl))
546 $(eval $(call BuildPlugin,dahdi-codec,DAHDI codecs,mod_dahdi_codec,,))
547 $(eval $(call BuildPlugin,db,Dialplan & API to a database backend,mod_db,,))
548 $(eval $(call BuildPlugin,dialplan-asterisk,Asterisk dialplan parser,mod_dialplan_asterisk,,))
549 $(eval $(call BuildPlugin,dialplan-directory,Dialplan-Directory interface,mod_dialplan_directory,,))
550 $(eval $(call BuildPlugin,dialplan-xml,Dialplan-XML interface,mod_dialplan_xml,,))
551 $(eval $(call BuildPlugin,dingaling,Jabber interface,mod_dingaling,,+libgnutls-openssl)) 
552 $(eval $(call BuildPlugin,directory,application mod_directory,mod_directory,,))
553 $(eval $(call BuildPlugin,distributor,application mod_distributor,mod_distributor,,))
554 $(eval $(call BuildPlugin,dptools,Dialplan tools,mod_dptools,,))
555 $(eval $(call BuildPlugin,easyroute,DID routing,mod_easyroute,,))
556 $(eval $(call BuildPlugin,enum,ENUM routing,mod_enum,,))
557 $(eval $(call BuildPlugin,erlang-event,Erlang event handler,mod_erlang_event,,+erlang))
558 $(eval $(call BuildPlugin,esf,Extra SIP Functionality,mod_esf,,))
559 $(eval $(call BuildPlugin,event-multicast,Multicast event handler,mod_event_multicast,,))
560 $(eval $(call BuildPlugin,event-socket,Socket event handler,mod_event_socket,,))
561 $(eval $(call BuildPlugin,event-zmq,Socket event handler by Zero MQ,mod_event_zmq,,))
562 $(eval $(call BuildPlugin,expr,Expression evaluation,mod_expr,,))
563 $(eval $(call BuildPlugin,fifo,FIFO,mod_fifo,,))
564 $(eval $(call BuildPlugin,file-string,File streaming,mod_file_string,,@OBSOLETE)) # merged into dptools
565 $(eval $(call BuildPlugin,flite,Festival TTS,mod_flite,,@(!(armeb||avr32)||BROKEN)))
566 $(eval $(call BuildPlugin,fsv,Video,mod_fsv,,))
567 $(eval $(call BuildPlugin,g723-1,G.723.1 codec,mod_g723_1,,))
568 $(eval $(call BuildPlugin,g729,G.729 codec,mod_g729,,))
569 $(eval $(call BuildPlugin,h26x,H26X linear codec,mod_h26x,,))
570 $(eval $(call BuildPlugin,h323,h323 endpoint,mod_h323,,@BROKEN)) # missing header files (other packages needed)
571 $(eval $(call BuildPlugin,hash,API for manipulating a hash table,mod_hash,,))
572 $(eval $(call BuildPlugin,ilbc,ILBC codec,mod_ilbc,,))
573 $(eval $(call BuildPlugin,java,Java language interface,mod_java,,@BROKEN)) # needs java
574 $(eval $(call BuildPlugin,lcr,Least Cost Routing,mod_lcr,,))
575 $(eval $(call BuildPlugin,ldap,LDAP interface,mod_ldap,,@BROKEN)) # fails in openldap
576 $(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
577 $(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
578 $(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
579 $(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp))
580 $(eval $(call BuildPlugin,managed,language mod_managed,mod_managed,,@BROKEN)) # needs Mono
581 $(eval $(call BuildPlugin,memcache,MemCached interface,mod_memcache,,@BROKEN)) # fails in libmemcached
582 $(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
583 $(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
584 $(eval $(call BuildPlugin,opal,Multi-Protocol endpoint,mod_opal,,@BROKEN)) # needs Opal
585 $(eval $(call BuildPlugin,openzap,Zaptel hardware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_zt,,+libpcap))
586 $(eval $(call BuildPlugin,perl,Perl language interface,mod_perl,,+perl @BROKEN)) # needs Perl
587 $(eval $(call BuildPlugin,pocketsphinx,PocketSphinx SR,mod_pocketsphinx,,@BROKEN)) # fails in sphinxbase
588 $(eval $(call BuildPlugin,portaudio,Local audio endpoint,mod_portaudio,,+alsa-lib))
589 $(eval $(call BuildPlugin,portaudio-stream,format mod_portaudio_stream,mod_portaudio_stream,,))
590 $(eval $(call BuildPlugin,python,Python language interface,mod_python,,@BROKEN)) # needs Python
591 $(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,mod_radius_cdr,,@BROKEN)) # fails in freeradius-client
592 $(eval $(call BuildPlugin,rss,RRS feeds via TTS,mod_rss,,))
593 $(eval $(call BuildPlugin,say-de,German say,mod_say_de,,))
594 $(eval $(call BuildPlugin,say-en,English say,mod_say_en,,))
595 $(eval $(call BuildPlugin,say-es,Spanish say,mod_say_es,,))
596 $(eval $(call BuildPlugin,say-fr,French say,mod_say_fr,,))
597 $(eval $(call BuildPlugin,say-hu,Hungarian say,mod_say_hu,,))
598 $(eval $(call BuildPlugin,say-it,Italian say,mod_say_it,,))
599 $(eval $(call BuildPlugin,say-nl,Dutch say,mod_say_nl,,))
600 $(eval $(call BuildPlugin,say-pt,Portugeese say,mod_say_pt,,))
601 $(eval $(call BuildPlugin,say-ru,Russian say,mod_say_ru,,))
602 $(eval $(call BuildPlugin,say-th,Thai say,mod_say_th,,))
603 $(eval $(call BuildPlugin,say-zh,Chineese say,mod_say_zh,,))
604 $(eval $(call BuildPlugin,shell-stream,Shell stream,mod_shell_stream,,))
605 $(eval $(call BuildPlugin,shout,MP3 and Shoutcast stream,mod_shout,,@BROKEN)) # needs Ogg/Vorbis
606 $(eval $(call BuildPlugin,silk,codec mod_silk,mod_silk,,))
607 $(eval $(call BuildPlugin,siren,G.722.1 codec,mod_siren,,))
608 $(eval $(call BuildPlugin,skinny,endpoint mod_skinny,mod_skinny,,))
609 $(eval $(call BuildPlugin,skypopen,Skype compatible endpoint,mod_skypopen,,@BROKEN)) # needs <X11/Xlib.h>
610 $(eval $(call BuildPlugin,sangoma-codec,codec sangoma-codec,mod_sangoma_codec,,@BROKEN)) # Untested
611 $(eval $(call BuildPlugin,snapshot,application mod_snapshot,mod_snapshot,,))
612 $(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
613 $(eval $(call BuildPlugin,snipe-hunt,application mod_snipe_hunt,mod_snipe_hunt,,))
614 $(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
615 $(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
616 $(eval $(call BuildPlugin,spandsp,Span DSP,mod_spandsp,,+libjpeg))
617 $(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
618 $(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
619 $(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))
620 $(eval $(call BuildPlugin,spidermonkey-curl,JavaScript Curl,mod_spidermonkey_curl,,@BROKEN))
621 $(eval $(call BuildPlugin,spidermonkey-odbc,JavaScript ODBC,mod_spidermonkey_odbc,,@BROKEN))
622 $(eval $(call BuildPlugin,spidermonkey-socket,JavaScript socket,mod_spidermonkey_socket,,@BROKEN))
623 $(eval $(call BuildPlugin,spidermonkey-teletone,JavaScript teletone,mod_spidermonkey_teletone,,@BROKEN))
624 $(eval $(call BuildPlugin,spy,User spy,mod_spy,,))
625 $(eval $(call BuildPlugin,stress,application mod_stress,mod_stress,,))
626 $(eval $(call BuildPlugin,syslog,SysLog logger,mod_syslog,,))
627 $(eval $(call BuildPlugin,tone-stream,Tone generation stream,mod_tone_stream,,))
628 $(eval $(call BuildPlugin,tts-commandline,ASR TTS cli,mod_tts_commandline,,))
629 $(eval $(call BuildPlugin,unimrcp,MRCP interface,mod_unimrcp,,))
630 $(eval $(call BuildPlugin,valet-parking,application mod_valet_parking,mod_valet_parking,,))
631 $(eval $(call BuildPlugin,vmd,VoiceMail beep detection,mod_vmd,,))
632 $(eval $(call BuildPlugin,voicemail,VoiceMail,mod_voicemail,,))
633 $(eval $(call BuildPlugin,xml-cdr,XML-CDR handler,mod_xml_cdr,,+libcurl))
634 $(eval $(call BuildPlugin,xml-curl,XML-Curl gateway,mod_xml_curl,,+libcurl))
635 $(eval $(call BuildPlugin,xml-ldap,LDAP-XML gateway,mod_xml_ldap,,@BROKEN)) # fails in openldap
636 $(eval $(call BuildPlugin,xml-rpc,XML-RPC interface,mod_xml_rpc,,))
637 $(eval $(call BuildPlugin,yaml,YAML dialplans,mod_yaml,,))
638