2 # Copyright (C) 2009-2013 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_SOURCE_VERSION can be obtained from http://fisheye.freeswitch.org
21 PKG_SOURCE_URL
:=git
://git.
$(PKG_NAME
).org
/$(PKG_NAME
).git
22 FS_DEFAULT_HEAD
:=af6ae011c70c32d6d7637f7befc0e614b4624527
23 FS_LATEST_HEAD
:=$(shell git ls-remote
$(PKG_SOURCE_URL
) HEAD | cut
-f1
)
24 PKG_SOURCE_VERSION
:=$(if
$(CONFIG_FS_SOFIA_WITH_PULL_CURRENT
),$(FS_LATEST_HEAD
),$(FS_DEFAULT_HEAD
))
25 PKG_SOURCE_SUBDIR
:=$(PKG_DISTNAME
)
26 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
)-$(shell echo
$(PKG_SOURCE_VERSION
)|cut
-b
-7).
tar.bz2
27 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
140 spidermonkey-core-db \
143 spidermonkey-socket \
144 spidermonkey-teletone \
162 PKG_CONFIG_DEPENDS
:= \
163 CONFIG_FS_SOFIA_WITH_IPV6 \
164 CONFIG_FS_SOFIA_WITH_MYSQL \
165 CONFIG_FS_SOFIA_WITH_ODBC \
166 CONFIG_FS_SOFIA_WITH_OPT \
167 CONFIG_FS_SOFIA_WITH_PULL_CURRENT \
168 CONFIG_FS_SOFIA_WITH_SCTP \
169 CONFIG_FS_SOFIA_WITH_ZRTP_GIT \
170 $(patsubst %,CONFIG_PACKAGE_
$(PKG_NAME
)-mod-
%,$(FS_MOD_AVAILABLE
)) \
173 include $(INCLUDE_DIR
)/package.mk
174 include $(INCLUDE_DIR
)/nls.mk
177 TAR_OPTIONS
+= --strip-components
=1 -C
$(PKG_BUILD_DIR
)
180 define Package
/$(PKG_NAME
)/Default
184 URL
:=http
://www.
$(PKG_NAME
).org
/
185 MAINTAINER
:=Mazilo
<OpenWRT@slickdeals.endjunk.com
>
189 define Package
/$(PKG_NAME
)
190 $(call Package
/$(PKG_NAME
)/Default
)
191 TITLE
:=FreeSWITCH open source telephony platform
($(shell echo
$(FS_DEFAULT_HEAD
)|cut
-b
-7))
192 DEPENDS
:=+libcurl
+libjpeg
+libncurses
+libpq
+libpthread
+librt
+libstdcpp
197 define Package
/$(PKG_NAME
)/description
198 FreeSWITCH is an open source telephony platform designed to
199 facilitate the creation of voice and chat driven products scaling
200 from a soft-phone up to a soft-switch. See http
://wiki.
$(PKG_NAME
).org
204 define Package
/$(PKG_NAME
)/config
205 config FS_SOFIA_WITH_PULL_CURRENT
207 depends on PACKAGE_
$(PKG_NAME
)
208 bool
"Pull the latest git HEAD - $(shell echo $(PKG_SOURCE_VERSION)|cut -b -7) (Press < Help > for more information)"
211 This existing git HEAD
($(FS_DEFAULT_HEAD
)) is probably outdated.
212 Enable this option for the latest git HEAD
($(FS_LATEST_HEAD
)).
213 Enable this option ONLY if you know what you are doing. It may and
/or may not be cleanly
214 compiled and may require some intervension to create new patches. If you take this route
215 and come up with some patches
, please contemplate to contribute to send in your patches.
217 config FS_SOFIA_WITH_IPV6
218 depends on PACKAGE_
$(PKG_NAME
)
219 bool
"Compile with IPV6 support"
222 Compile
$(PKG_NAME
) with IPV6 Support.
224 config FS_SOFIA_WITH_OPT
225 depends on PACKAGE_
$(PKG_NAME
)
226 bool
"Compile with optimization"
229 Compile
$(PKG_NAME
) with optimization enabled.
233 define Package
/$(PKG_NAME
)-mod-sofia
/config
234 config FS_SOFIA_WITH_MYSQL
235 depends on PACKAGE_
$(PKG_NAME
)-mod-sofia
236 bool
"Compile with MySQL"
238 select PACKAGE_libmysqlclient
240 Compile
$(PKG_NAME
) with MySQL.
242 config FS_SOFIA_WITH_ODBC
243 depends on PACKAGE_
$(PKG_NAME
)-mod-sofia
244 depends on PACKAGE_sqliteodbc
245 depends on PACKAGE_unixodbc_svn
246 bool
"Compile with ODBC support (Requires unixodbc_svn NOT YET AVAILABLE)"
249 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.
251 config FS_SOFIA_WITH_SCTP
252 depends on PACKAGE_
$(PKG_NAME
)-mod-sofia
253 depends on PACKAGE_sctp
254 bool
"Compile with SCTP (Stream Control Transfer Protocol) support"
257 Compile
$(PKG_NAME
)-mod-sofia with SCTP support.
259 config FS_SOFIA_WITH_ZRTP_GIT
260 depends on PACKAGE_
$(PKG_NAME
)-mod-sofia
261 depends on PACKAGE_libzrtpcpp
262 bool
"Compile with ZRTP support (Requires libzrtpcpp NOT YET AVAILABLE)"
264 #select PACKAGE_libzrtpcpp
266 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.
270 define Package
/$(PKG_NAME
)-example-config
271 $(call Package
/$(PKG_NAME
)/Default
)
272 TITLE
:=FreeSWITCH example config
(commented
)
273 DEPENDS
:= $(PKG_NAME
)
277 define Package
/$(PKG_NAME
)-example-config
/description
278 The default configuration included with FreeSWITCH. It is not intended to be
279 a final product
, and is thus moved to
/usr
/share
/$(PKG_NAME
)/examples
/conf to
280 be an example of how FreeSWITCH can be configured.
284 define Package
/$(PKG_NAME
)-config-upstream-defaults
285 $(call Package
/$(PKG_NAME
)/Default
)
286 TITLE
:=FreeSWITCH upstream config
287 DEPENDS
:= $(PKG_NAME
)
291 define Package
/$(PKG_NAME
)-config-upstream-defaults
/description
292 The default configuration included with FreeSWITCH. It is not intended to be
293 a final product
, and but is included for those who don
't want to use the
294 OpenWRT configuration and/or want to try things as prepared by upstream.
298 define Package/$(PKG_NAME)-config-minimal
299 $(call Package/$(PKG_NAME)/Default)
300 TITLE:=FreeSWITCH minimal config
301 DEPENDS:= $(PKG_NAME)
305 define Package/$(PKG_NAME)-config-minimal/description
306 A minimal configuration of FreeSWITCH for OpenWRT devices. Is what the UCI
307 configuration began with.
311 define Package/$(PKG_NAME)-collection-upstream-defaults
312 $(call Package/$(PKG_NAME)/Default)
313 TITLE:=FS upstream def sample conf
314 DEPENDS:= $(PKG_NAME) \
315 +$(PKG_NAME)-config-upstream-defaults \
316 +$(PKG_NAME)-mod-callcenter \
317 +$(PKG_NAME)-mod-codec2 \
318 +$(PKG_NAME)-mod-commands \
319 +$(PKG_NAME)-mod-conference \
320 +$(PKG_NAME)-mod-curl \
321 +$(PKG_NAME)-mod-dialplan-xml \
322 +$(PKG_NAME)-mod-dingaling \
323 +$(PKG_NAME)-mod-dptools \
324 +$(PKG_NAME)-mod-event-socket \
325 +$(PKG_NAME)-mod-g723-1 \
326 +$(PKG_NAME)-mod-g729 \
327 +$(PKG_NAME)-mod-hash \
328 +$(PKG_NAME)-mod-http-cache \
329 +$(PKG_NAME)-mod-ilbc \
330 +$(PKG_NAME)-mod-local-stream \
331 +$(PKG_NAME)-mod-lua \
332 +$(PKG_NAME)-mod-native-file \
333 +$(PKG_NAME)-mod-sndfile \
334 +$(PKG_NAME)-mod-sofia \
335 +$(PKG_NAME)-mod-spandsp \
336 +$(PKG_NAME)-mod-speex \
337 +$(PKG_NAME)-mod-syslog \
338 +$(PKG_NAME)-mod-tone-stream \
339 +$(PKG_NAME)-mod-xml-curl \
340 +$(PKG_NAME)-mod-xml-rpc \
345 define Package/$(PKG_NAME)-collection-minimal
346 $(call Package/$(PKG_NAME)/Default)
347 TITLE:=FreeSWITCH minimal package collection
349 DEPENDS:= $(PKG_NAME) \
350 +$(PKG_NAME)-config-minimal \
351 +$(PKG_NAME)-mod-codec2 \
352 +$(PKG_NAME)-mod-commands \
353 +$(PKG_NAME)-mod-dialplan-xml \
354 +$(PKG_NAME)-mod-dptools \
355 +$(PKG_NAME)-mod-event-socket \
356 +$(PKG_NAME)-mod-hash \
357 +$(PKG_NAME)-mod-local-stream \
358 +$(PKG_NAME)-mod-sndfile \
359 +$(PKG_NAME)-mod-sofia \
360 +$(PKG_NAME)-mod-syslog \
361 +$(PKG_NAME)-mod-tone-stream \
366 define Package/$(PKG_NAME)-sounds-en
367 $(call Package/$(PKG_NAME)/Default)
368 TITLE:=FreeSWITCH english sounds
369 DEPENDS:= $(PKG_NAME)
373 define Package/$(PKG_NAME)-sounds-moh
374 $(call Package/$(PKG_NAME)/Default)
375 TITLE:=FreeSWITCH music-on-hold sounds
376 DEPENDS:= $(PKG_NAME)
380 define Package/$(PKG_NAME)-tools
381 $(call Package/$(PKG_NAME)/Default)
382 TITLE:=FreeSWITCH control tools
383 DEPENDS:= $(PKG_NAME)
387 define Download/files
390 URL:=$(if $(4),$(4),http://files.$(PKG_NAME).org)/$(5)
394 $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(6)
396 $$(eval $$(call Download,$(1)))
400 MAKE_INSTALL_TARGETS:=install
403 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),)
404 $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,,downloads/libs/,libs/))
408 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
409 $(eval $(call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/))
413 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
414 $(eval $(call Download/files,event-zmq,zeromq-2.1.9.tar.gz,94c5e0262a79c5f82bc0b178c1f8a33d,http://download.zeromq.org http://download.zeromq.org/historic,,libs/))
418 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
419 $(eval $(call Download/files,flite,flite-1.5.4-current.tar.bz2,f3a2d88b1059f6f4ff3c20a8169bc0f4,,downloads/libs/,libs/))
423 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-opus),)
424 $(eval $(call Download/files,opus,opus-1.0.2.tar.gz,c503ad05a59ddb44deab96204401be03,,downloads/libs/,libs/))
428 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en),)
429 $(eval $(call Download/files,sounds-en,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.22.tar.gz,cff509d878708ce5e6e7fedac7f683ef,,,,))
430 MAKE_INSTALL_TARGETS+= sounds-install
434 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh),)
435 $(eval $(call Download/files,sounds-moh,$(PKG_NAME)-sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,,,))
436 MAKE_INSTALL_TARGETS+= moh-install
441 # XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
443 ifneq ($(CONFIG_avr32),)
444 TARGET_CFLAGS += -fgnu89-inline
445 TARGET_CXXFLAGS += -fgnu89-inline
449 ifneq ($(CONFIG_USE_EGLIBC),)
450 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
451 TARGET_CFLAGS += -DNO_GETLOGIN
456 FS_TARGET_CFLAGS:= ${TARGET_CFLAGS} -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format
457 FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
458 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}
462 --host=$(GNU_TARGET_NAME) \
463 --build=$(GNU_HOST_NAME) \
464 --prefix="/usr/share/$(PKG_NAME)" \
465 --bindir="/usr/bin" \
466 --libdir="/usr/lib" \
467 --srcdir="$(PKG_BUILD_DIR)" \
468 --sysconfdir="/etc/$(PKG_NAME)" \
469 --with-modinstdir="/usr/lib/$(PKG_NAME)" \
470 --with-random="/dev/urandom" \
471 $(if $(CONFIG_FS_SOFIA_WITH_MYSQL),--with-mysql,--without-mysql) \
472 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_IPV6,ipv6) \
473 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_OPT,optimization) \
474 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-iogg) \
475 $(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) \
476 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
477 $(call autoconf_bool,CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp,builtin-tiff) \
478 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ZRTP_GIT,zrtp) \
479 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ODBC,core-odbc-support) \
480 $(if $(CONFIG_FS_SOFIA_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
481 $(if $(CONFIG_FS_SOFIA_WITH_ODBC),--with-odbc-lib="$(STAGING_DIR)/usr/lib") \
485 config_TARGET_CC="$(TOOLCHAIN_DIR)/bin/${TARGET_CC}" \
486 config_TARGET_CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
487 config_TARGET_CXX="$(TOOLCHAIN_DIR)/bin/${TARGET_CXX}" \
488 config_TARGET_CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
489 config_TARGET_CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
490 config_TARGET_READLINE_INC="${FS_TARGET_CPPFLAGS}" \
491 config_TARGET_READLINE_LIBS="${TARGET_LDFLAGS} -lreadline -lncurses" \
492 config_TARGET_LIBS="${TARGET_LDFLAGS} -lpthread -ldl" \
493 config_BUILD_CC="${HOSTCC}" \
494 config_BUILD_CFLAGS="${HOST_CFLAGS}" \
495 CC_FOR_BUILD="${HOSTCC}" \
496 BUILDTOOL_CC="${HOSTCC}" \
497 BUILDTOOL_CCLD="${HOSTCC}" \
498 LDFLAGS="$$$$LDFLAGS" \
499 LDFLAGS_FOR_BUILD="${HOST_LDFLAGS}" \
500 CC="$(TOOLCHAIN_DIR)/bin/${TARGET_CC}" \
501 CXX="$(TOOLCHAIN_DIR)/bin/${TARGET_CXX}" \
502 CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
503 CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
504 CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
505 LDFLAGS="${TARGET_LDFLAGS} -Wl,-rpath-link=\"${STAGING_DIR}/usr/lib\"" \
506 PATH="${PATH}:${STAGING_DIR}" \
507 HOST_CC="/usr/bin/cc" \
508 HOST_CXX="/usr/bin/g++" \
510 PKG_CONFIG="$(STAGING_DIR_HOST)/bin/pkg-config" \
511 PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
512 ax_cv_c_compiler_vendor="gnu" \
513 ac_cv_dev_urandom="yes" \
514 ac_cv_file_dbd_apr_dbd_mysql_c="no" \
515 ac_cv_file__dev_random="no" \
516 ac_cv_file__dev_urandom="yes" \
517 ac_cv_file___dev_urandom_="yes" \
518 ac_cv_func_mmap_fixed_mapped="yes" \
519 ac_cv_func_pthread_rwlock_init="yes" \
520 ac_cv_struct_rlimit="yes" \
521 apr_cv_mutex_recursive="yes" \
522 apr_cv_process_shared_works="no" \
523 apr_cv_tcp_nodelay_with_cork="yes" \
524 apr_cv_type_rwlock_t="yes" \
525 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),ac_cv_path_PERL="yes",) \
526 libzmq_cv_cxx_werror_flag="" \
530 $(call Build/Prepare/Default)
532 $(call Prepare/event-zmq)
533 $(call Prepare/flite)
534 $(call Prepare/json-cdr)
536 $(call Prepare/sounds-en)
537 $(call Prepare/sounds-moh)
541 define Build/Configure
542 if [ -d $(PKG_BUILD_DIR)/libs/libcodec2/src ]; then \
543 (cd $(PKG_BUILD_DIR)/libs/libcodec2/src; $(HOSTCC) -c generate_codebook.c; $(HOSTCC) -o generate_codebook generate_codebook.o -lm) \
545 (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
546 $(call Build/Configure/Default,)
547 $(foreach m,$(FS_MOD_AVAILABLE),
548 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
549 $(SED) 's|^
[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
551 $(SED
) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR
)/modules.conf
558 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
559 AR
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ar" \
560 RANLIB
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)ranlib" \
561 CC
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CC)" \
562 CXX
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
563 DESTDIR
="$(PKG_INSTALL_DIR)" \
564 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
565 all $(MAKE_INSTALL_TARGETS
)
566 $(SED
) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $(PKG_INSTALL_DIR
)/etc
/$(PKG_NAME
)/autoload_configs
/modules.conf.xml
567 $(SED
) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR
)/etc
/$(PKG_NAME
)/autoload_configs
/modules.conf.xml
571 define Build
/InstallDev
572 $(INSTALL_DIR
) $(1)/usr
/include/$(PKG_NAME
)
573 $(INSTALL_DIR
) $(1)/usr
/lib
574 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/$(PKG_NAME
)/include/* $(1)/usr
/include/$(PKG_NAME
)/
575 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
$(PKG_NAME
).
{a
,so
*} $(1)/usr
/lib
/
579 define Package
/$(PKG_NAME
)/install
580 $(INSTALL_DIR
) $(1)/etc
/config
581 $(INSTALL_DIR
) $(1)/etc
/default
582 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
583 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)/scripts
584 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
585 $(INSTALL_DIR
) $(1)/etc
/init.d
586 $(INSTALL_DIR
) $(1)/usr
/bin
587 $(INSTALL_DIR
) $(1)/usr
/lib
588 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
589 $(INSTALL_BIN
) .
/files
/$(PKG_NAME
).init
$(1)/etc
/init.d
/$(PKG_NAME
)
590 $(INSTALL_DATA
) .
/files
/$(PKG_NAME
).config
$(1)/etc
/config
/$(PKG_NAME
)
591 $(INSTALL_DATA
) .
/files
/$(PKG_NAME
).default
$(1)/etc
/default
/$(PKG_NAME
)
592 $(INSTALL_DATA
) .
/files
/$(PKG_NAME
).hotplug
$(1)/etc
/hotplug.d
/iface
/90-$(PKG_NAME
)
593 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(PKG_NAME
) $(1)/usr
/bin
/
594 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
$(PKG_NAME
)* $(1)/usr
/lib
/
595 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/$(PKG_NAME
).
pc $(1)/usr
/lib
/pkgconfig
/
599 define Package
/$(PKG_NAME
)-collection-upstream-defaults
/install
600 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
604 define Package
/$(PKG_NAME
)-example-config
/install
605 $(INSTALL_DIR
) $(1)/usr
/share
/$(PKG_NAME
)/examples
/conf
606 $(CP
) $(PKG_INSTALL_DIR
)/etc
/$(PKG_NAME
)/* $(1)/usr
/share
/$(PKG_NAME
)/examples
/conf
/
610 define Package
/$(PKG_NAME
)-config-upstream-defaults
/install
611 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
612 $(CP
) $(PKG_INSTALL_DIR
)/etc
/$(PKG_NAME
)/* $(1)/etc
/$(PKG_NAME
)/
616 define Package
/$(PKG_NAME
)-collection-minimal
/install
617 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
621 define Package
/$(PKG_NAME
)-collection-uci-minimal
/install
622 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
626 define Package
/$(PKG_NAME
)-config-minimal
/install
627 $(INSTALL_DIR
) $(1)/etc
/$(PKG_NAME
)
628 $(CP
) .
/files
/etc.minimal
/* $(1)/etc
/$(PKG_NAME
)/
632 define Package
/$(PKG_NAME
)-sounds-en
/install
633 $(INSTALL_DIR
) $(1)/usr
/share
/$(PKG_NAME
)/sounds
634 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/$(PKG_NAME
)/sounds
/en
$(1)/usr
/share
/$(PKG_NAME
)/sounds
/
638 define Package
/$(PKG_NAME
)-sounds-moh
/install
639 $(INSTALL_DIR
) $(1)/usr
/share
/$(PKG_NAME
)/sounds
640 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/$(PKG_NAME
)/sounds
/music
$(1)/usr
/share
/$(PKG_NAME
)/sounds
/
644 define Package
/$(PKG_NAME
)-tools
/install
645 $(INSTALL_DIR
) $(1)/usr
/bin
646 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fs_cli
$(1)/usr
/bin
/
647 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fs_encode
$(1)/usr
/bin
/
648 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fs_ivrd
$(1)/usr
/bin
/
649 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fsxs
$(1)/usr
/bin
/
650 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gentls_cert
$(1)/usr
/bin
/
651 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/tone2wav
$(1)/usr
/bin
/
658 # 3. Package configuration files
659 # 4. Inter module depends
663 define Package
/$(PKG_NAME
)-$(1)
664 $$(call Package
/$(PKG_NAME
)/Default
)
665 TITLE
:= FS
$(2) library and pkgconfig files
666 DEPENDS
:= $(PKG_NAME
) $(foreach l
,$(4),+$(PKG_NAME
)-$(l
)) $(5)
669 define Package
/$(PKG_NAME
)-$(1)/install
670 [ -d
"$$(1)/usr/lib/pkgconfig" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/pkgconfig
672 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/$(patsubst lib
%,%,${3}).
pc $$(1)/usr
/lib
/pkgconfig
673 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/${1}* $$(1)/usr
/lib
/
676 $$(eval
$$(call BuildPackage
,$(PKG_NAME
)-$(1)))
683 # 3. Files (module files include different names)
684 # 4. Files (supporting files include different names)
685 # 5. Inter module depends
689 define Package
/$(PKG_NAME
)-mod-
$(1)
690 $$(call Package
/$(PKG_NAME
)/Default
)
691 TITLE
:= FS
$(2) module
692 DEPENDS
:= $(PKG_NAME
) $(foreach m
,$(5),+$(PKG_NAME
)-mod-
$(m
)) $(6)
695 define Package
/$(PKG_NAME
)-mod-
$(1)/install
696 [ -z
"mod_$(subst -,_,$(1))" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/$(PKG_NAME
)
698 for f in
$$$$(realpath
$$$$(wildcard $(PKG_INSTALL_DIR
)/usr
/lib
/$(PKG_NAME
)/mod_
$(subst -,_
,$(1)).
*)) $$$$(wildcard $(PKG_INSTALL_DIR
)/usr
/lib
/$(PKG_NAME
)/$(3)_
*); \
700 $(CP
) $$$$$$$${f} $$(1)/usr
/lib
/$(PKG_NAME
)/; \
705 [ -d
"$(dirname $$(1)/usr/${f})" ] ||
$(INSTALL_DIR
) $(dirname
$$(1)/usr
/${f}); \
706 $(CP
) $(PKG_INSTALL_DIR
)/usr
/${f} $$(1)/usr
/${f}; \
710 # XML configuration files (vanilla)
712 if
[ -f
${PKG_BUILD_DIR}/conf
/vanilla
/autoload_configs
/$(subst -,_
,$(1)).conf.xml
]; then \
713 [ -d
$$(1)/etc
/$(PKG_NAME
)/autoload_configs
] ||
$(INSTALL_DIR
) $$(1)/etc
/$(PKG_NAME
)/autoload_configs
; \
714 $(CP
) ${PKG_BUILD_DIR}/conf
/vanilla
/autoload_configs
/$(subst -,_
,$(1)).conf.xml
$$(1)/etc
/$(PKG_NAME
)/autoload_configs
/ ; \
715 if
[ -d
"./files/etc.packages/$(1)" ]; then \
716 $(CP
) .
/files
/etc.packages
/$(1)/* $$(1)/etc
/$(PKG_NAME
)/ ; \
721 # For mod_YAML configuration files (vanilla)
723 if
[ "mod_$(subst -,_,$(1))" == "mod_yaml" ] && [ -d
${PKG_BUILD_DIR}/conf
/vanilla
/yaml
]; then \
724 [ -d
$$(1)/etc
/$(PKG_NAME
)/yaml
] ||
$(INSTALL_DIR
) $$(1)/etc
/$(PKG_NAME
)/yaml
; \
725 $(CP
) $(wildcard ${PKG_BUILD_DIR}/conf
/vanilla
/yaml
/*) $$(1)/etc
/$(PKG_NAME
)/yaml
; \
731 if
[ "mod_$(subst -,_,$(1))" == "mod_openzap" ]; then \
732 [ -z
"$$(1)/etc/$(PKG_NAME)/autoload_configs" ] ||
$(INSTALL_DIR
) $$(1)/etc
/$(PKG_NAME
)/autoload_configs
; \
733 $(CP
) ${PKG_INSTALL_DIR}/etc
/$(PKG_NAME
)/autoload_configs
/$(1).conf.xml
$$(1)/etc
/$(PKG_NAME
)/autoload_configs
; \
737 define Package
/$(PKG_NAME
)-mod-
$(1)/postinst
739 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
742 define Package
/$(PKG_NAME
)-mod-
$(1)/postrm
744 sed
-i
-e
's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$$${IPKG_INSTROOT}/etc
/$(PKG_NAME
)/autoload_configs
/modules.conf.xml
747 $$(eval
$$(call BuildPackage
,$(PKG_NAME
)-mod-
$(1)))
751 $(eval
$(call BuildPackage
,$(PKG_NAME
)))
752 $(eval
$(call BuildPackage
,$(PKG_NAME
)-collection-upstream-defaults
))
753 $(eval
$(call BuildPackage
,$(PKG_NAME
)-collection-minimal
))
754 $(eval
$(call BuildPackage
,$(PKG_NAME
)-sounds-en
))
755 $(eval
$(call BuildPackage
,$(PKG_NAME
)-sounds-moh
))
756 $(eval
$(call BuildPackage
,$(PKG_NAME
)-tools
))
757 $(eval
$(call BuildPackage
,$(PKG_NAME
)-example-config
))
758 $(eval
$(call BuildPackage
,$(PKG_NAME
)-config-upstream-defaults
))
759 $(eval
$(call BuildPackage
,$(PKG_NAME
)-config-minimal
))
763 # $(eval $(call BuildLib,Name,Title,Package Configuration Files,Inter Depends,Extra Depends))
765 $(eval
$(call BuildLib
,libopenzap
,OpenZAP
,openzap
,,))
769 # $(eval $(call BuildPlugin,Name,Title,Files,Inter Depends,Extra Depends))
771 $(eval
$(call BuildPlugin
,abstraction
,An Abstraction To API Call
,,,,))
772 $(eval
$(call BuildPlugin
,alsa
,Alsa Endpoint
,,,,+alsa-lib
))
773 $(eval
$(call BuildPlugin
,amr
,Adaptive Multi-Rate On Bandwidth Codec
,,,,))
774 $(eval
$(call BuildPlugin
,amrwb
,Wide Band AMR
,,,,))
775 $(eval
$(call BuildPlugin
,avmd
,Advanced Voice Mail Detection
,,,,))
776 $(eval
$(call BuildPlugin
,blacklist
,Blacklist
,,,,))
777 $(eval
$(call BuildPlugin
,bv
,BroadVoice16 and BroadVoice32 Audio Codec
,,,,))
778 $(eval
$(call BuildPlugin
,callcenter
,Call Center
,,,,))
779 $(eval
$(call BuildPlugin
,cdr-csv
,CSV-CDR Handler
,,,,))
780 $(eval
$(call BuildPlugin
,cdr-pg-csv
,Postgress CDR Handler
,,,,+coreutils
+libpq
+postresql
))
781 $(eval
$(call BuildPlugin
,cdr-sqlite
,SQLite3 CDR Handler
,,,,+libsqlite3
))
782 $(eval
$(call BuildPlugin
,celt
,CELT Ultra-Low Delay Codec
,,,,+libogg
))
783 $(eval
$(call BuildPlugin
,cepstral
,Cepstral Interface
,,,,@BROKEN
)) # needs <swift.h>
784 $(eval
$(call BuildPlugin
,cidlookup
,Data Query For CID-
>NAME Services
,,,,+libcurl
))
785 $(eval
$(call BuildPlugin
,cluechoo
,Framework Demo
,,,,))
786 $(eval
$(call BuildPlugin
,codec2
,CoDec
2,,,,))
787 $(eval
$(call BuildPlugin
,commands
,API Commands
,,,,))
788 $(eval
$(call BuildPlugin
,conference
,Conference Room
,,,,))
789 $(eval
$(call BuildPlugin
,console
,Console Logger
,,,,))
790 $(eval
$(call BuildPlugin
,curl
,HTTP Request
,,,,+libcurl
))
791 $(eval
$(call BuildPlugin
,dahdi-codec
,DAHDI Codecs
,,,,))
792 $(eval
$(call BuildPlugin
,db
,Database Backend
,,,,))
793 $(eval
$(call BuildPlugin
,dialplan-asterisk
,Asterisk Dialplan Parser
,,,,))
794 $(eval
$(call BuildPlugin
,dialplan-directory
,Dialplan Directory
,,,,))
795 $(eval
$(call BuildPlugin
,dialplan-xml
,Dialplan-XML Interface
,,,,))
796 $(eval
$(call BuildPlugin
,dingaling
,Jabber Interface
,,,,+libgcrypt
+libopenssl
))
797 $(eval
$(call BuildPlugin
,directory
,Search By Name Directory IVR
,,,,))
798 $(eval
$(call BuildPlugin
,distributor
,Simple Robin-Round Load to Gateway
,,,,))
799 $(eval
$(call BuildPlugin
,dptools
,Dialplan Tools
,,,,))
800 $(eval
$(call BuildPlugin
,easyroute
,Simple DID Routing
,,,,))
801 $(eval
$(call BuildPlugin
,enum
,ENUM Routing
,,,,))
802 $(eval
$(call BuildPlugin
,erlang-event
,Erlang Event Handler
,,,,+erlang
))
803 $(eval
$(call BuildPlugin
,esf
,Extra SIP Functionality
,,,,))
804 $(eval
$(call BuildPlugin
,event-multicast
,Multicast Event Handler
,,,,))
805 $(eval
$(call BuildPlugin
,event-socket
,Socket Event Handler
,,,,))
806 $(eval
$(call BuildPlugin
,event-zmq
,Socket Event Handler By Zero MQ
,,,,+libuuid
))
807 $(eval
$(call BuildPlugin
,expr
,Expression Evaluation
,,,,))
808 $(eval
$(call BuildPlugin
,fifo
,FIFO
,,,,))
809 $(eval
$(call BuildPlugin
,file-string
,Streaming Multiple Sound Files Sequentially
,,,,@OBSOLETE
)) # merged into dptools
810 $(eval
$(call BuildPlugin
,flite
,Festival TTS
,,,,@
(!(armeb||avr32
)||BROKEN
)))
811 $(eval
$(call BuildPlugin
,fsk
,Bell-202
1200-baud FSK decoder
,,,,))
812 $(eval
$(call BuildPlugin
,fsv
,Video Player
/ Recorder
,,,,))
813 $(eval
$(call BuildPlugin
,g723-1
,G
.723.1 Codec
,,,,))
814 $(eval
$(call BuildPlugin
,g729
,G
.729 Codec
,,,,))
815 $(eval
$(call BuildPlugin
,gsmopen
,GSM Modem compatible Endpoint
,,,,+alsa-lib @BROKEN
)) # needs gsmlib
816 $(eval
$(call BuildPlugin
,h26x
,H26X Linear Codec
,,,,))
817 $(eval
$(call BuildPlugin
,h323
,H323 Endpoint
,,,,@BROKEN
)) # Req. H323Plus v1.24.x or newer
818 $(eval
$(call BuildPlugin
,hash
,API For Manipulating A Hash Table
,,,,))
819 $(eval
$(call BuildPlugin
,html5
,HTML5 Endpoint Module
,,,,))
820 $(eval
$(call BuildPlugin
,httapi
,HT Telephony API And HTTP Caching
,,,,))
821 $(eval
$(call BuildPlugin
,http-cache
,HTTP GET With Caching
,,,,+libcurl
))
822 $(eval
$(call BuildPlugin
,ilbc
,ILBC Codec
,,,,))
823 $(eval
$(call BuildPlugin
,isac
,iSAC Codec
,,,,))
824 $(eval
$(call BuildPlugin
,java
,Java Language Interface
,,,,@BROKEN
)) # needs java
825 $(eval
$(call BuildPlugin
,json-cdr
,JSon-CDR Interface
,,,,+libcurl
))
826 $(eval
$(call BuildPlugin
,lcr
,Least Cost Routing
,,,,))
827 $(eval
$(call BuildPlugin
,local-stream
,Multi-Channel On Same Stream
,,,,))
828 $(eval
$(call BuildPlugin
,logfile
,File Logger
,,,,))
829 $(eval
$(call BuildPlugin
,loopback
,Loopback to Dialplan Endpoint
,,,,))
830 $(eval
$(call BuildPlugin
,lua
,LUA Language Interface
,,,,))
831 $(eval
$(call BuildPlugin
,managed
,Media Switching Software Library
,,,,+glib2 @BROKEN
)) # needs Mono
832 $(eval
$(call BuildPlugin
,mp4
,MP4 File Format support for video apps
,,,,@BROKEN
)) # needs libmp4v2
833 $(eval
$(call BuildPlugin
,mp4v
,MP4 CoDec Support For Video
,,,,))
834 $(eval
$(call BuildPlugin
,native-file
,WAV Format Sound Player
,,,,))
835 $(eval
$(call BuildPlugin
,nibblebill
,Credit
/ Debit Billing
,,,,))
836 $(eval
$(call BuildPlugin
,oreka
,Media Recording with Oreka
,,,,))
837 $(eval
$(call BuildPlugin
,openzap
,Zaptel
(Superseded by FreeTDM
),ozmod
,,,+$(PKG_NAME
)-libopenzap
+libpcap
))
838 $(eval
$(call BuildPlugin
,opus
,Opus CoDec
,,,,))
839 $(eval
$(call BuildPlugin
,portaudio
,Portaudio To Sound Card Interface
,,,,+alsa-lib
))
840 $(eval
$(call BuildPlugin
,portaudio-stream
,Portaudio Streaming Interface
,,,,+alsa-lib
))
841 $(eval
$(call BuildPlugin
,posix-timer
,POSIX Compliant Soft Timer
,,,,))
842 $(eval
$(call BuildPlugin
,radius-cdr
,Radius-CDR interface
,,,,+freeradius2 @BROKEN
)) # fails in freeradius-client
843 $(eval
$(call BuildPlugin
,redis
,Redis Limited Backend
,,,,))
844 $(eval
$(call BuildPlugin
,rss
,RRS Feeds via TTS
,,,,))
845 $(eval
$(call BuildPlugin
,rtmp
,RTMP Protocol Handler
,,,,))
846 $(eval
$(call BuildPlugin
,sangoma-codec
,codec sangoma-codec
,,,,@BROKEN
)) # Req. Sangoma CoDec source
847 $(eval
$(call BuildPlugin
,say-de
,German Say
,,,,))
848 $(eval
$(call BuildPlugin
,say-en
,English Say
,,,,))
849 $(eval
$(call BuildPlugin
,say-es
,Spanish Say
,,,,))
850 $(eval
$(call BuildPlugin
,say-fa
,Persian Say
,,,,))
851 $(eval
$(call BuildPlugin
,say-fr
,French Say
,,,,))
852 $(eval
$(call BuildPlugin
,say-hu
,Hungarian Say
,,,,))
853 $(eval
$(call BuildPlugin
,say-it
,Italian Say
,,,,))
854 $(eval
$(call BuildPlugin
,say-nl
,Dutch Say
,,,,))
855 $(eval
$(call BuildPlugin
,say-pt
,Portugeese Say
,,,,))
856 $(eval
$(call BuildPlugin
,say-ru
,Russian Say
,,,,))
857 $(eval
$(call BuildPlugin
,say-th
,Thai Say
,,,,))
858 $(eval
$(call BuildPlugin
,say-zh
,Chineese Say
,,,,))
859 $(eval
$(call BuildPlugin
,shell-stream
,Streaming Audio Through CLI
,,,,))
860 $(eval
$(call BuildPlugin
,silk
,Skype
(TM
) SILK Codec Module
,,,,))
861 $(eval
$(call BuildPlugin
,siren
,G
.722.1 Codec
,,,,))
862 $(eval
$(call BuildPlugin
,skel
,Template For New Module
,,,,))
863 $(eval
$(call BuildPlugin
,skinny
,Skinny Call Control Protocol
(SCCP
),,,,))
864 $(eval
$(call BuildPlugin
,skypopen
,Skype Compatible Endpoint
,,,,@FEATURE_drawing-backend_libX11
))
865 $(eval
$(call BuildPlugin
,sms
,SMS
,,,,))
866 $(eval
$(call BuildPlugin
,snapshot
,Record Audio Snapshot to File
,,,,))
867 $(eval
$(call BuildPlugin
,sndfile
,Multi-Format Sound File
,,,,))
868 $(eval
$(call BuildPlugin
,snipe-hunt
,Snipe Hunt
(Simple Example Module
),,,,))
869 $(eval
$(call BuildPlugin
,snmp
,SNMP AgentX Subagent
,,,,+libnetsnmp
))
870 $(eval
$(call BuildPlugin
,snom
,SNOM specific features
,,,,))
871 $(eval
$(call BuildPlugin
,sofia
,SOFIA SIP
,,,,))
872 $(eval
$(call BuildPlugin
,sonar
,Sonar Ping Timer
,,,,))
873 $(eval
$(call BuildPlugin
,spandsp
,Span DSP
,,,,+libjpeg
))
874 $(eval
$(call BuildPlugin
,speex
,Speex codec
,,,,))
875 $(eval
$(call BuildPlugin
,spidermonkey
,JavaScript
,,,,@BROKEN
)) # fails in js
876 $(eval
$(call BuildPlugin
,spidermonkey-core_db
,JavaScript DB
,,,,@BROKEN
))
877 $(eval
$(call BuildPlugin
,spidermonkey-curl
,JavaScript Curl
,,,,@BROKEN
))
878 $(eval
$(call BuildPlugin
,spidermonkey-odbc
,JavaScript ODBC
,,,,@BROKEN
))
879 $(eval
$(call BuildPlugin
,spidermonkey-socket
,JavaScript socket
,,,,@BROKEN
))
880 $(eval
$(call BuildPlugin
,spidermonkey-teletone
,JavaScript teletone
,,,,@BROKEN
))
881 $(eval
$(call BuildPlugin
,spy
,User Spy
,,,,))
882 $(eval
$(call BuildPlugin
,stress
,Voice Stress Detection
,,,,))
883 $(eval
$(call BuildPlugin
,syslog
,SysLog logger
,,,,))
884 $(eval
$(call BuildPlugin
,tone-stream
,Tone Generation Stream
,,,,))
885 $(eval
$(call BuildPlugin
,tts-commandline
,ASR TTS Command Interface
,,,,))
886 $(eval
$(call BuildPlugin
,unimrcp
,UniMRCP
(MRCP client
),,,,@BROKEN
))
887 $(eval
$(call BuildPlugin
,valet-parking
,Valet Parking Application
,,,,))
888 $(eval
$(call BuildPlugin
,vmd
,VoiceMail Beep Detection
,,,,))
889 $(eval
$(call BuildPlugin
,voicemail
,VoiceMail
,,,,))
890 $(eval
$(call BuildPlugin
,voicemail-ivr
,VoiceMail IVR
,,,,))
891 $(eval
$(call BuildPlugin
,xml-cdr
,XML-CDR Handler
,,,,+libcurl
))
892 $(eval
$(call BuildPlugin
,xml-curl
,XML-Curl Gateway
,,,,+libcurl
))
893 $(eval
$(call BuildPlugin
,xml-rpc
,XML-RPC Interface
,,,,))
894 $(eval
$(call BuildPlugin
,xml-scgi
,SCGI XML Gateway
,,,,))
895 $(eval
$(call BuildPlugin
,yaml
,YAML langunage
,,,,))