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