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