2 # Copyright (C) 2009-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
12 PKG_DISTNAME:=$(PKG_NAME)_git
18 # The latest FS git hash in PKG_REV can be obtained from http://fisheye.freeswitch.org
20 PKG_REV:=54b4b088d911d4c80f224ed561d8e278229a75ff
21 PKG_SOURCE_VERSION:=$(PKG_REV)
23 PKG_SOURCE_URL:=git://git.$(PKG_NAME).org/$(PKG_NAME).git
24 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)
25 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(shell echo $(PKG_REV)|cut -b -9).tar.bz2
26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
127 spidermonkey-core-db \
130 spidermonkey-socket \
131 spidermonkey-teletone \
147 PKG_CONFIG_DEPENDS:= \
148 CONFIG_FS_SOFIA_WITH_IPV6 \
149 CONFIG_FS_SOFIA_WITH_MYSQL \
150 CONFIG_FS_SOFIA_WITH_ODBC \
151 CONFIG_FS_SOFIA_WITH_OPT \
152 CONFIG_FS_SOFIA_WITH_SCTP \
153 CONFIG_FS_SOFIA_WITH_ZRTP_GIT \
154 $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_MOD_AVAILABLE)) \
157 include $(INCLUDE_DIR)/package.mk
158 include $(INCLUDE_DIR)/nls.mk
161 TAR_OPTIONS+= --strip-components=1 -C $(PKG_BUILD_DIR)
164 define Package/$(PKG_NAME)/Default
168 URL:=http://www.$(PKG_NAME).org/
169 MAINTAINER:=Mazilo <OpenWRT@slickdeals.endjunk.com>
173 define Package/$(PKG_NAME)
174 $(call Package/$(PKG_NAME)/Default)
175 TITLE:=FreeSWITCH open source telephony platform
176 DEPENDS:= +libreadline +libncurses +libpthread +libstdcpp +libopenssl +libpq +librt +zlib
181 define Package/$(PKG_NAME)/description
182 FreeSWITCH is an open source telephony platform designed to
183 facilitate the creation of voice and chat driven products scaling
184 from a soft-phone up to a soft-switch. See http://wiki.$(PKG_NAME).org
188 define Package/$(PKG_NAME)/config
189 config FS_SOFIA_WITH_IPV6
190 depends on PACKAGE_$(PKG_NAME)
191 bool "Compile with IPV6 support"
194 Compile $(PKG_NAME) with IPV6 Support.
196 config FS_SOFIA_WITH_OPT
197 depends on PACKAGE_$(PKG_NAME)
198 bool "Compile with optimization"
201 Compile $(PKG_NAME) with optimization enabled.
205 define Package/$(PKG_NAME)-mod-sofia/config
206 config FS_SOFIA_WITH_MYSQL
207 depends on PACKAGE_$(PKG_NAME)-mod-sofia
208 bool "Compile with MySQL"
210 select PACKAGE_libmysqlclient
212 Compile $(PKG_NAME) with MySQL.
214 config FS_SOFIA_WITH_ODBC
215 depends on PACKAGE_$(PKG_NAME)-mod-sofia
216 depends on PACKAGE_sqliteodbc
217 depends on PACKAGE_unixodbc_svn
218 bool "Compile with ODBC support (Requires unixodbc_svn NOT YET AVAILABLE)"
221 Compile $(PKG_NAME)-mod-sofia with ODBC Support. Since both sqliteodbc and unixodbc_svn packages are not yet available on OpenWRT, $(PKG_NAME)-mod-sofia CAN NOT be compiled with ODBC support.
223 config FS_SOFIA_WITH_SCTP
224 depends on PACKAGE_$(PKG_NAME)-mod-sofia
225 depends on PACKAGE_sctp
226 bool "Compile with SCTP (Stream Control Transfer Protocol) support"
229 Compile $(PKG_NAME)-mod-sofia with SCTP support.
231 config FS_SOFIA_WITH_ZRTP_GIT
232 depends on PACKAGE_$(PKG_NAME)-mod-sofia
233 depends on PACKAGE_libzrtpcpp
234 bool "Compile with ZRTP support (Requires libzrtpcpp NOT YET AVAILABLE)"
236 #select PACKAGE_libzrtpcpp
238 Compile $(PKG_NAME)-mod-sofia with ZRTP Support. Since libzrtpcpp package is not yet available on OpenWRT, $(PKG_NAME)-mod-sofia CAN NOT be compiled with ZRTP support.
242 define Package/$(PKG_NAME)-example-config
243 $(call Package/$(PKG_NAME)/Default)
244 TITLE:=FreeSWITCH example config (commented)
245 DEPENDS:= $(PKG_NAME)
249 define Package/$(PKG_NAME)-example-config/description
250 The default configuration included with FreeSWITCH. It is not intended to be
251 a final product, and is thus moved to /usr/share/$(PKG_NAME)/examples/conf to
252 be an example of how FreeSWITCH can be configured.
256 define Package/$(PKG_NAME)-config-upstream-defaults
257 $(call Package/$(PKG_NAME)/Default)
258 TITLE:=FreeSWITCH upstream config
259 DEPENDS:= $(PKG_NAME)
263 define Package/$(PKG_NAME)-config-upstream-defaults/description
264 The default configuration included with FreeSWITCH. It is not intended to be
265 a final product, and but is included for those who don't want to use the
266 OpenWRT configuration and/or want to try things as prepared by upstream.
270 define Package/$(PKG_NAME)-config-minimal
271 $(call Package/$(PKG_NAME)/Default)
272 TITLE:=FreeSWITCH minimal config
273 DEPENDS:= $(PKG_NAME)
277 define Package/$(PKG_NAME)-config-minimal/description
278 A minimal configuration of FreeSWITCH for OpenWRT devices. Is what the UCI
279 configuration began with.
283 define Package/$(PKG_NAME)-collection-upstream-defaults
284 $(call Package/$(PKG_NAME)/Default)
285 TITLE:=FS upstream def sample conf
286 DEPENDS:= $(PKG_NAME) \
287 +$(PKG_NAME)-config-upstream-defaults \
288 +$(PKG_NAME)-mod-callcenter \
289 +$(PKG_NAME)-mod-codec2 \
290 +$(PKG_NAME)-mod-commands \
291 +$(PKG_NAME)-mod-conference \
292 +$(PKG_NAME)-mod-curl \
293 +$(PKG_NAME)-mod-dialplan-xml \
294 +$(PKG_NAME)-mod-dingaling \
295 +$(PKG_NAME)-mod-dptools \
296 +$(PKG_NAME)-mod-event-socket \
297 +$(PKG_NAME)-mod-g723-1 \
298 +$(PKG_NAME)-mod-g729 \
299 +$(PKG_NAME)-mod-hash \
300 +$(PKG_NAME)-mod-http-cache \
301 +$(PKG_NAME)-mod-ilbc \
302 +$(PKG_NAME)-mod-local-stream \
303 +$(PKG_NAME)-mod-lua \
304 +$(PKG_NAME)-mod-native-file \
305 +$(PKG_NAME)-mod-sndfile \
306 +$(PKG_NAME)-mod-sofia \
307 +$(PKG_NAME)-mod-spandsp \
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 \
317 define Package/$(PKG_NAME)-collection-minimal
318 $(call Package/$(PKG_NAME)/Default)
319 TITLE:=FreeSWITCH minimal package collection
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 \
338 define Package/$(PKG_NAME)-sounds-en
339 $(call Package/$(PKG_NAME)/Default)
340 TITLE:=FreeSWITCH english sounds
341 DEPENDS:= $(PKG_NAME)
345 define Package/$(PKG_NAME)-sounds-moh
346 $(call Package/$(PKG_NAME)/Default)
347 TITLE:=FreeSWITCH music-on-hold sounds
348 DEPENDS:= $(PKG_NAME)
352 define Package/$(PKG_NAME)-tools
353 $(call Package/$(PKG_NAME)/Default)
354 TITLE:=FreeSWITCH control tools
355 DEPENDS:= $(PKG_NAME)
358 define Package/libopenzap
359 $(call Package/$(PKG_NAME)/Default)
360 TITLE:=FreeSWITCH openzap library
365 define Download/files
368 URL:=$(if $(4),$(4),http://files.$(PKG_NAME).org)/$(5)
372 $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(6)
374 $$(eval $$(call Download,$(1)))
378 MAKE_INSTALL_TARGETS:=install
381 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),)
382 $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,,downloads/libs/,libs/))
386 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
387 $(eval $(call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/))
391 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
392 $(eval $(call Download/files,event-zmq,zeromq-2.1.9.tar.gz,94c5e0262a79c5f82bc0b178c1f8a33d,http://download.zeromq.org http://download.zeromq.org/historic,,libs/))
396 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
397 $(eval $(call Download/files,flite,flite-1.5.1-current.tar.bz2,36e5d1c1307161211c8ffe9a75a623ae,,downloads/libs/,libs/))
401 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-opus),)
402 $(eval $(call Download/files,opus,opus-0.9.0.tar.gz,8a729db587430392e64280a499e9d061,,downloads/libs/,libs/))
406 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en),)
407 $(eval $(call Download/files,sounds-en,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.16.tar.gz,bde0883eb75fe06f39bde11f50a1f858,,,))
408 MAKE_INSTALL_TARGETS+= sounds-install
412 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh),)
413 $(eval $(call Download/files,sounds-moh,$(PKG_NAME)-sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,,))
414 MAKE_INSTALL_TARGETS+= moh-install
419 # XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
421 ifneq ($(CONFIG_avr32),)
422 TARGET_CFLAGS += -fgnu89-inline
423 TARGET_CXXFLAGS += -fgnu89-inline
427 ifneq ($(CONFIG_USE_EGLIBC),)
428 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
429 TARGET_CFLAGS += -DNO_GETLOGIN
434 FS_TARGET_CFLAGS:= ${TARGET_CFLAGS} -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format
435 FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
436 FS_TARGET_CPPFLAGS:= -I. -I./lua $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event),-I$(STAGING_DIR_HOST)/lib/erlang/lib/erl_interface-3.6/include) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-json-cdr),-Wno-error) ${TARGET_CPPFLAGS}
440 --host=$(GNU_TARGET_NAME) \
441 --build=$(GNU_HOST_NAME) \
442 --prefix="/usr/share/$(PKG_NAME)" \
443 --bindir="/usr/bin" \
444 --libdir="/usr/lib" \
445 --srcdir="$(PKG_BUILD_DIR)" \
446 --sysconfdir="/etc/$(PKG_NAME)" \
447 --with-modinstdir="/usr/lib/$(PKG_NAME)" \
448 --with-random="/dev/urandom" \
449 $(if $(CONFIG_FS_SOFIA_WITH_MYSQL),--with-mysql,--without-mysql) \
450 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_IPV6,ipv6) \
451 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_OPT,optimization) \
452 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-iogg) \
453 $(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) \
454 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
455 $(call autoconf_bool,CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp,builtin-tiff) \
456 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ZRTP_GIT,zrtp) \
457 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ODBC,core-odbc-support) \
458 $(if $(CONFIG_FS_SOFIA_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
459 $(if $(CONFIG_FS_SOFIA_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
463 config_TARGET_CC="${TARGET_CC}" \
464 config_TARGET_CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
465 config_TARGET_CXX="${TARGET_CXX}" \
466 config_TARGET_CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
467 config_TARGET_CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
468 config_TARGET_READLINE_INC="${FS_TARGET_CPPFLAGS}" \
469 config_TARGET_READLINE_LIBS="${TARGET_LDFLAGS} -lreadline -lncurses" \
470 config_TARGET_LIBS="${TARGET_LDFLAGS} -lpthread" \
471 config_BUILD_CC="${HOSTCC}" \
472 config_BUILD_CFLAGS="${HOST_CFLAGS}" \
473 CC_FOR_BUILD="${HOSTCC}" \
474 LDFLAGS="$$$$LDFLAGS" \
475 LDFLAGS_FOR_BUILD="${HOST_LDFLAGS}" \
477 CXX="${TARGET_CXX}" \
478 CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
479 CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
480 CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
481 LDFLAGS="${TARGET_LDFLAGS} -Wl,-rpath-link=\"${STAGING_DIR}/usr/lib\"" \
482 PATH="${PATH}:${STAGING_DIR}" \
483 HOST_CC="/usr/bin/cc" \
484 HOST_CXX="/usr/bin/g++" \
486 ax_cv_c_compiler_vendor="gnu" \
487 ac_cv_dev_urandom="yes" \
488 ac_cv_file_dbd_apr_dbd_mysql_c="no" \
489 ac_cv_file__dev_random="no" \
490 ac_cv_file__dev_urandom="yes" \
491 ac_cv_file___dev_urandom_="yes" \
492 ac_cv_func_mmap_fixed_mapped="yes" \
493 ac_cv_func_pthread_rwlock_init="yes" \
494 ac_cv_struct_rlimit="yes" \
495 apr_cv_mutex_recursive="yes" \
496 apr_cv_process_shared_works="no" \
497 apr_cv_tcp_nodelay_with_cork="yes" \
498 apr_cv_type_rwlock_t="yes" \
499 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),ac_cv_path_PERL="yes",) \
500 libzmq_cv_cxx_werror_flag="" \
501 ac_cv_path_PKG_CONFIG=no \
502 ac_cv_path_LIBGNUTLS_CONFIG=no
506 $(call Build/Prepare/Default)
508 $(call Prepare/event-zmq)
509 $(call Prepare/flite)
510 $(call Prepare/json-cdr)
512 $(call Prepare/sounds-en)
513 $(call Prepare/sounds-moh)
517 define Build/Configure
518 (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
519 $(call Build/Configure/Default,)
520 $(foreach m,$(FS_MOD_AVAILABLE),
521 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
522 $(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
524 $(SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR)/modules.conf
531 $(MAKE) -C $(PKG_BUILD_DIR) \
532 AR="$(TARGET_CROSS)ar" \
533 RANLIB="$(TARGET_CROSS)ranlib" \
535 CXX="$(TARGET_CXX)" \
536 DESTDIR="$(PKG_INSTALL_DIR)" \
537 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
538 all $(MAKE_INSTALL_TARGETS)
539 $(SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
540 $(SED) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
544 define Build/InstallDev
545 $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
546 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/include/* $(1)/usr/include/$(PKG_NAME)/
547 $(INSTALL_DIR) $(1)/usr/lib
548 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).{a,so*} $(1)/usr/lib/
552 define Package/$(PKG_NAME)/install
553 $(INSTALL_DIR) $(1)/usr/bin
554 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
555 $(INSTALL_DIR) $(1)/usr/lib
556 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so.* $(1)/usr/lib/
557 $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)
558 $(INSTALL_DIR) $(1)/etc/default
559 $(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
560 $(INSTALL_DIR) $(1)/etc/init.d
561 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
562 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
563 $(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME)
564 $(INSTALL_DIR) $(1)/etc/config
565 $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
569 define Package/$(PKG_NAME)-collection-upstream-defaults/install
570 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
574 define Package/$(PKG_NAME)-example-config/install
575 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/examples/conf
576 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/usr/share/$(PKG_NAME)/examples/conf/
580 define Package/$(PKG_NAME)-config-upstream-defaults/install
581 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
582 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/etc/$(PKG_NAME)/
586 define Package/$(PKG_NAME)-collection-minimal/install
587 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
591 define Package/$(PKG_NAME)-collection-uci-minimal/install
592 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
596 define Package/$(PKG_NAME)-config-minimal/install
597 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
598 $(CP) ./files/etc.minimal/* $(1)/etc/$(PKG_NAME)/
602 define Package/$(PKG_NAME)-sounds-en/install
603 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
604 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en $(1)/usr/share/$(PKG_NAME)/sounds/
608 define Package/$(PKG_NAME)-sounds-moh/install
609 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
610 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music $(1)/usr/share/$(PKG_NAME)/sounds/
613 define Package/libopenzap/install
614 $(INSTALL_DIR) $(1)/usr/lib
615 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenzap.so* $(1)/usr/lib/
618 define Package/$(PKG_NAME)-tools/install
619 $(INSTALL_DIR) $(1)/usr/bin
620 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_cli $(1)/usr/bin/
621 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_encode $(1)/usr/bin/
622 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_ivrd $(1)/usr/bin/
623 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/
624 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/
625 $(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
637 define Package/$(PKG_NAME)-mod-$(1)
638 $$(call Package/$(PKG_NAME)/Default)
639 TITLE:= FS $(2) module
640 DEPENDS:= $(PKG_NAME) $(foreach m,$(4),+$(PKG_NAME)-mod-$(m)) $(5)
643 define Package/$(PKG_NAME)-mod-$(1)/install
644 [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)
647 $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/$$$$$$$${f}.so \
648 $$(1)/usr/lib/$(PKG_NAME)/ ; \
650 if [ -d "./files/etc.packages/$(1)" ]; then \
651 $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME) ; \
653 ./files/etc.packages/$(1)/* \
654 $$(1)/etc/$(PKG_NAME)/ ; \
658 define Package/$(PKG_NAME)-mod-$(1)/postinst
660 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
663 define Package/$(PKG_NAME)-mod-$(1)/postrm
665 sed -i -e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
668 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
672 $(eval $(call BuildPackage,$(PKG_NAME)))
673 $(eval $(call BuildPackage,$(PKG_NAME)-collection-upstream-defaults))
674 $(eval $(call BuildPackage,$(PKG_NAME)-collection-minimal))
675 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en))
676 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh))
677 $(eval $(call BuildPackage,$(PKG_NAME)-tools))
678 $(eval $(call BuildPackage,$(PKG_NAME)-example-config))
679 $(eval $(call BuildPackage,$(PKG_NAME)-config-upstream-defaults))
680 $(eval $(call BuildPackage,$(PKG_NAME)-config-minimal))
681 $(eval $(call BuildPackage,libopenzap))
685 # $(eval $(call BuildPlugin,Name,Title,Files,Inter Depends,Extra Depends))
687 $(eval $(call BuildPlugin,alsa,Alsa endpoint,mod_alsa,,+alsa-lib))
688 $(eval $(call BuildPlugin,amr,GSM-AMR codec,mod_amr,,))
689 $(eval $(call BuildPlugin,amrwb,GSM-AMRWB,mod_amrwb,,))
690 $(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,mod_avmd,,))
691 $(eval $(call BuildPlugin,bv,codec mod_bv,mod_bv,,))
692 $(eval $(call BuildPlugin,blacklist,application blacklist,mod_blacklist,,))
693 $(eval $(call BuildPlugin,callcenter,Call Center,mod_callcenter,,))
694 $(eval $(call BuildPlugin,cdr-csv,CSV-CDR handler,mod_cdr_csv,,))
695 $(eval $(call BuildPlugin,cdr-pg-csv,Postgress CDR handler,mod_cdr_pg_csv,,+coreutils +libpq))
696 $(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR handler,mod_cdr_sqlite,,+libsqlite3))
697 $(eval $(call BuildPlugin,celt,CELT ultra-low delay codec,mod_celt,,+libogg))
698 $(eval $(call BuildPlugin,cepstral,Cepstral interface,mod_cepstral,,@BROKEN)) # needs <swift.h>
699 $(eval $(call BuildPlugin,cidlookup,applications mod_cidlookup,mod_cidlookup,,+libcurl))
700 $(eval $(call BuildPlugin,cluechoo,Framework Demo,mod_cluechoo,,))
701 $(eval $(call BuildPlugin,codec2,CoDec 2,mod_codec2,,))
702 $(eval $(call BuildPlugin,commands,API commands,mod_commands,,))
703 $(eval $(call BuildPlugin,conference,Conference room,mod_conference,,))
704 $(eval $(call BuildPlugin,console,Console logger,mod_console,,))
705 $(eval $(call BuildPlugin,curl,HTTP request,mod_curl,,+libcurl))
706 $(eval $(call BuildPlugin,dahdi-codec,DAHDI codecs,mod_dahdi_codec,,))
707 $(eval $(call BuildPlugin,db,Database backend,mod_db,,))
708 $(eval $(call BuildPlugin,dialplan-asterisk,Asterisk dialplan parser,mod_dialplan_asterisk,,))
709 $(eval $(call BuildPlugin,dialplan-directory,Dialplan directory,mod_dialplan_directory,,))
710 $(eval $(call BuildPlugin,dialplan-xml,Dialplan-XML interface,mod_dialplan_xml,,))
711 $(eval $(call BuildPlugin,dingaling,Jabber interface,mod_dingaling,,))
712 $(eval $(call BuildPlugin,directory,application mod_directory,mod_directory,,))
713 $(eval $(call BuildPlugin,distributor,application mod_distributor,mod_distributor,,))
714 $(eval $(call BuildPlugin,dptools,Dialplan tools,mod_dptools,,))
715 $(eval $(call BuildPlugin,easyroute,DID routing,mod_easyroute,,))
716 $(eval $(call BuildPlugin,enum,ENUM routing,mod_enum,,))
717 $(eval $(call BuildPlugin,erlang-event,Erlang event handler,mod_erlang_event,,+erlang))
718 $(eval $(call BuildPlugin,esf,Extra SIP Functionality,mod_esf,,))
719 $(eval $(call BuildPlugin,event-multicast,Multicast event handler,mod_event_multicast,,))
720 $(eval $(call BuildPlugin,event-socket,Socket event handler,mod_event_socket,,))
721 $(eval $(call BuildPlugin,event-zmq,Socket event handler by Zero MQ,mod_event_zmq,,))
722 $(eval $(call BuildPlugin,expr,Expression evaluation,mod_expr,,))
723 $(eval $(call BuildPlugin,fifo,FIFO,mod_fifo,,))
724 $(eval $(call BuildPlugin,file-string,File streaming,mod_file_string,,@OBSOLETE)) # merged into dptools
725 $(eval $(call BuildPlugin,flite,Festival TTS,mod_flite,,@(!(armeb||avr32)||BROKEN)))
726 $(eval $(call BuildPlugin,fsk,Bell-202 1200-baud FSK decoder,mod_fsk,,))
727 $(eval $(call BuildPlugin,fsv,Video,mod_fsv,,))
728 $(eval $(call BuildPlugin,g723-1,G.723.1 codec,mod_g723_1,,))
729 $(eval $(call BuildPlugin,g729,G.729 codec,mod_g729,,))
730 $(eval $(call BuildPlugin,gsmopen,Short Message Service (SMS),mod_gsmopen,spandsp,+alsa-lib @BROKEN)) # needs gsmlib
731 $(eval $(call BuildPlugin,h26x,H26X linear codec,mod_h26x,,))
732 $(eval $(call BuildPlugin,h323,h323 endpoint,mod_h323,,@BROKEN)) # missing header files (other packages needed)
733 $(eval $(call BuildPlugin,hash,API for manipulating a hash table,mod_hash,,))
734 $(eval $(call BuildPlugin,http-cache,HTTP GET with caching,mod_http_cache,,+libcurl))
735 $(eval $(call BuildPlugin,ilbc,ILBC codec,mod_ilbc,,))
736 $(eval $(call BuildPlugin,java,Java language interface,mod_java,,@BROKEN)) # needs java
737 $(eval $(call BuildPlugin,json-cdr,JSon-CDR interface,mod_json_cdr,,+libcurl))
738 $(eval $(call BuildPlugin,lcr,Least Cost Routing,mod_lcr,,))
739 $(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
740 $(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
741 $(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
742 $(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp))
743 $(eval $(call BuildPlugin,managed,language mod_managed,mod_managed,,+glib2 @BROKEN)) # needs Mono
744 $(eval $(call BuildPlugin,mp4,MP4 File Format support for video apps.,mod_mp4,,@BROKEN)) # needs libmp4v2
745 $(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
746 $(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
747 $(eval $(call BuildPlugin,openzap,Zaptel hardware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_zt,,+libpcap +libopenzap))
748 $(eval $(call BuildPlugin,opus,Opus CoDec,mod_opus,,))
749 $(eval $(call BuildPlugin,portaudio,Local audio endpoint,mod_portaudio,,+alsa-lib))
750 $(eval $(call BuildPlugin,portaudio-stream,portaudio stream format,mod_portaudio_stream,,+alsa-lib))
751 $(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,mod_radius_cdr,,+freeradius2 @BROKEN)) # fails in freeradius-client
752 $(eval $(call BuildPlugin,rss,RRS feeds via TTS,mod_rss,,))
753 $(eval $(call BuildPlugin,rtmp,RTMP Protocol Handler,mod_rtmp,,))
754 $(eval $(call BuildPlugin,say-de,German say,mod_say_de,,))
755 $(eval $(call BuildPlugin,say-en,English say,mod_say_en,,))
756 $(eval $(call BuildPlugin,say-es,Spanish say,mod_say_es,,))
757 $(eval $(call BuildPlugin,say-fr,French say,mod_say_fr,,))
758 $(eval $(call BuildPlugin,say-hu,Hungarian say,mod_say_hu,,))
759 $(eval $(call BuildPlugin,say-it,Italian say,mod_say_it,,))
760 $(eval $(call BuildPlugin,say-nl,Dutch say,mod_say_nl,,))
761 $(eval $(call BuildPlugin,say-pt,Portugeese say,mod_say_pt,,))
762 $(eval $(call BuildPlugin,say-ru,Russian say,mod_say_ru,,))
763 $(eval $(call BuildPlugin,say-th,Thai say,mod_say_th,,))
764 $(eval $(call BuildPlugin,say-zh,Chineese say,mod_say_zh,,))
765 $(eval $(call BuildPlugin,shell-stream,Shell stream,mod_shell_stream,,))
766 $(eval $(call BuildPlugin,silk,codec mod_silk,mod_silk,,))
767 $(eval $(call BuildPlugin,siren,G.722.1 codec,mod_siren,,))
768 $(eval $(call BuildPlugin,skinny,endpoint mod_skinny,mod_skinny,,))
769 $(eval $(call BuildPlugin,skypopen,Skype compatible endpoint,mod_skypopen,,@FEATURE_drawing-backend_libX11))
770 $(eval $(call BuildPlugin,sms,SMS application,mod_sms,,))
771 $(eval $(call BuildPlugin,snapshot,application mod_snapshot,mod_snapshot,,))
772 $(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
773 $(eval $(call BuildPlugin,snipe-hunt,application mod_snipe_hunt,mod_snipe_hunt,,))
774 $(eval $(call BuildPlugin,snmp,Simple Network Management Protocol,mod_snmp,,+libnetsnmp))
775 $(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
776 $(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
777 $(eval $(call BuildPlugin,spandsp,Span DSP,mod_spandsp,,+libjpeg))
778 $(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
779 $(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
780 $(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))
781 $(eval $(call BuildPlugin,spidermonkey-curl,JavaScript Curl,mod_spidermonkey_curl,,@BROKEN))
782 $(eval $(call BuildPlugin,spidermonkey-odbc,JavaScript ODBC,mod_spidermonkey_odbc,,@BROKEN))
783 $(eval $(call BuildPlugin,spidermonkey-socket,JavaScript socket,mod_spidermonkey_socket,,@BROKEN))
784 $(eval $(call BuildPlugin,spidermonkey-teletone,JavaScript teletone,mod_spidermonkey_teletone,,@BROKEN))
785 $(eval $(call BuildPlugin,spy,User spy,mod_spy,,))
786 $(eval $(call BuildPlugin,stress,application mod_stress,mod_stress,,))
787 $(eval $(call BuildPlugin,syslog,SysLog logger,mod_syslog,,))
788 $(eval $(call BuildPlugin,tone-stream,Tone generation stream,mod_tone_stream,,))
789 $(eval $(call BuildPlugin,tts-commandline,ASR TTS cli,mod_tts_commandline,,))
790 $(eval $(call BuildPlugin,unimrcp,MRCP interface,mod_unimrcp,,@BROKEN))
791 $(eval $(call BuildPlugin,valet-parking,application mod_valet_parking,mod_valet_parking,,))
792 $(eval $(call BuildPlugin,vmd,VoiceMail beep detection,mod_vmd,,))
793 $(eval $(call BuildPlugin,voicemail,VoiceMail,mod_voicemail,,))
794 $(eval $(call BuildPlugin,xml-cdr,XML-CDR handler,mod_xml_cdr,,+libcurl))
795 $(eval $(call BuildPlugin,xml-curl,XML-Curl gateway,mod_xml_curl,,+libcurl))
796 $(eval $(call BuildPlugin,xml-rpc,XML-RPC interface,mod_xml_rpc,,))
797 $(eval $(call BuildPlugin,yaml,YAML dialplans,mod_yaml,,))