2 # Copyright (C) 2009 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://files.freeswitch.org
/
16 PKG_MD5SUM
:=86e34bdd8cc027d71772cb0dc51388da
90 spidermonkey-core-db \
94 spidermonkey-teletone \
108 PKG_CONFIG_DEPENDS
:= \
109 $(patsubst %,CONFIG_PACKAGE_freeswitch-mod-
%,$(FS_MOD_AVAILABLE
)) \
111 include $(INCLUDE_DIR
)/package.mk
113 define Package
/freeswitch
/Default
116 URL
:=http
://www.freeswitch.org
/
120 define Package
/freeswitch
121 $(call Package
/freeswitch
/Default
)
122 TITLE
:=FreeSWITCH open source telephony platform
123 DEPENDS
:=+libopenssl
+libreadline
+libncurses
+libpthread
+libstdcpp
127 define Package
/freeswitch
/description
128 FreeSWITCH is an open source telephony platform designed to
129 facilitate the creation of voice and chat driven products scaling
130 from a soft-phone up to a soft-switch.
134 define Package
/freeswitch-default
135 $(call Package
/freeswitch
/Default
)
136 TITLE
:=FreeSWITCH default config
137 DEPENDS
:=freeswitch \
138 +freeswitch-mod-cdr-csv \
139 +freeswitch-mod-commands \
140 +freeswitch-mod-conference \
141 +freeswitch-mod-console \
142 +freeswitch-mod-dialplan-xml \
143 +freeswitch-mod-dptools \
144 +freeswitch-mod-enum \
145 +freeswitch-mod-event-socket \
146 +freeswitch-mod-expr \
147 +freeswitch-mod-fifo \
148 +freeswitch-mod-file-string \
149 +freeswitch-mod-esf \
150 +freeswitch-mod-fsv \
151 +freeswitch-mod-iax \
152 +freeswitch-mod-limit \
153 +freeswitch-mod-local-stream \
154 +freeswitch-mod-logfile \
155 +freeswitch-mod-loopback \
156 +freeswitch-mod-native-file \
157 +freeswitch-mod-rss \
158 +freeswitch-mod-say-en \
159 +freeswitch-mod-sndfile \
160 +freeswitch-mod-sofia \
161 +freeswitch-mod-syslog \
162 +freeswitch-mod-tone-stream \
163 +freeswitch-mod-voicemail \
164 +freeswitch-mod-voipcodecs \
165 +freeswitch-mod-xml-cdr \
166 +freeswitch-mod-xml-rpc
170 define Package
/freeswitch-minimal
171 $(call Package
/freeswitch
/Default
)
172 TITLE
:=FreeSWITCH minimal config
173 DEPENDS
:=freeswitch \
174 +freeswitch-mod-commands \
175 +freeswitch-mod-console \
176 +freeswitch-mod-dialplan-xml \
177 +freeswitch-mod-dptools \
178 +freeswitch-mod-sofia \
179 +freeswitch-mod-voipcodecs
183 define Package
/freeswitch-tools
184 $(call Package
/freeswitch
/Default
)
185 TITLE
:=FreeSWITCH control tools
193 URL
:=http
://files.freeswitch.org
/downloads
/libs
/
197 $(CP
) $(DL_DIR
)/$(2) $(PKG_BUILD_DIR
)/libs
/
199 $$(eval
$$(call Download
,$(1)))
202 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-celt
),)
203 $(eval
$(call Download
/lib
,celt
,celt-0.6
.1.
tar.gz
,2961ffb6fadb5f905d20de9f0d86e44c
))
206 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-curl
),)
207 $(eval
$(call Download
/lib
,json-c
,json-c-0.8.
tar.gz
,9c7b90dff16eec3063084829c382ebac
))
210 ifneq ($(CONFIG_PACKAGE_freeswitch-mod-flite
),)
211 $(eval
$(call Download
/lib
,flite
,flite-1.3
.99-latest.
tar.gz
,))
216 --prefix="/usr/freeswitch" \
217 --bindir="/usr/bin" \
218 --libdir="/usr/lib" \
219 --sysconfdir
="/etc/freeswitch" \
220 --with-modinstdir
="/usr/lib/freeswitch" \
223 --with-libcurl
="$(STAGING_DIR)/usr" \
224 --with-openssl
="$(STAGING_DIR)/usr" \
225 --with-random
="/dev/urandom" \
235 config_BUILD_CC
="$(HOSTCC)" \
236 config_BUILD_CFLAGS
="$(HOST_CFLAGS)" \
237 config_TARGET_CC
="$(TARGET_CC)" \
238 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
239 config_TARGET_READLINE_INC
="$(TARGET_CPPFLAGS)" \
240 config_TARGET_READLINE_LIBS
="$(TARGET_LDFLAGS) -lreadline -lncurses" \
241 config_TARGET_LIBS
="$(TARGET_LDFLAGS) -lpthread" \
242 CC_FOR_BUILD
="$(HOSTCC)" \
243 CFLAGS_FOR_BUILD
="$(HOST_CFLAGS)" \
244 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
245 LDFLAGS
="$(TARGET_LDFLAGS) -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib\"" \
246 ac_cv_dev_urandom
="yes" \
247 ac_cv_file_dbd_apr_dbd_mysql_c
="no" \
248 ac_cv_file__dev_random
="no" \
249 ac_cv_file__dev_urandom
="yes" \
250 ac_cv_file___dev_urandom_
="yes" \
251 ac_cv_func_mmap_fixed_mapped
="yes" \
252 ac_cv_func_pthread_rwlock_init
="yes" \
253 ac_cv_struct_rlimit
="yes" \
254 apr_cv_mutex_recursive
="yes" \
255 apr_cv_process_shared_works
="no" \
256 apr_cv_tcp_nodelay_with_cork
="yes" \
257 apr_cv_type_rwlock_t
="yes" \
260 $(call Build
/Prepare
/Default
)
262 $(call Prepare
/flite
)
263 $(call Prepare
/json-c
)
266 define Build
/Configure
267 ( cd
$(PKG_BUILD_DIR
); .
/rebootstrap.sh
; )
268 $(call Build
/Configure
/Default
)
269 $(foreach m
,$(FS_MOD_AVAILABLE
),
270 $(if
$(CONFIG_PACKAGE_freeswitch-mod-
$(m
)),
271 $(SED
) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR
)/modules.conf
273 $(SED
) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR
)/modules.conf
279 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
280 DESTDIR
="$(PKG_INSTALL_DIR)" \
281 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
285 define Build
/InstallDev
286 $(INSTALL_DIR
) $(1)/usr
/include/freeswitch
287 $(CP
) $(PKG_INSTALL_DIR
)/usr
/freeswitch
/include/* $(1)/usr
/include/freeswitch
/
288 $(INSTALL_DIR
) $(1)/usr
/lib
289 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfreeswitch.
{a
,so
*} $(1)/usr
/lib
/
292 define Package
/freeswitch
/install
293 $(INSTALL_DIR
) $(1)/usr
/bin
294 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/freeswitch
$(1)/usr
/bin
/
295 $(INSTALL_DIR
) $(1)/usr
/lib
296 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfreeswitch.so.
* $(1)/usr
/lib
/
297 $(INSTALL_DIR
) $(1)/usr
/lib
/freeswitch
298 $(INSTALL_DIR
) $(1)/etc
/default
299 $(INSTALL_DATA
) .
/files
/freeswitch.default
$(1)/etc
/default
/freeswitch
300 $(INSTALL_DIR
) $(1)/etc
/init.d
301 $(INSTALL_BIN
) .
/files
/freeswitch.init
$(1)/etc
/init.d
/freeswitch
304 define Package
/freeswitch-default
/install
305 $(INSTALL_DIR
) $(1)/etc
/freeswitch
306 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeswitch
/* $(1)/etc
/freeswitch
/
309 define Package
/freeswitch-minimal
/install
310 $(INSTALL_DIR
) $(1)/etc
/freeswitch
311 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeswitch
/* $(1)/etc
/freeswitch
/
314 define Package
/freeswitch-tools
/install
315 $(INSTALL_DIR
) $(1)/usr
/bin
316 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fs_cli
$(1)/usr
/bin
/
325 define Package
/freeswitch-mod-
$(1)
326 $$(call Package
/freeswitch
/Default
)
327 TITLE
:= FS
$(2) module
328 DEPENDS
:=freeswitch
$$(foreach m
,$(4),+freeswitch-mod-
$$m) $(5)
331 define Package
/freeswitch-mod-
$(1)/install
332 [ -z
"$(3)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/freeswitch
335 $(PKG_INSTALL_DIR
)/usr
/lib
/freeswitch
/$$$$$$$${f}.so \
336 $$(1)/usr
/lib
/freeswitch
/ ; \
340 $$(eval
$$(call BuildPackage
,freeswitch-mod-
$(1)))
343 $(eval
$(call BuildPackage
,freeswitch
))
344 $(eval
$(call BuildPackage
,freeswitch-default
))
345 $(eval
$(call BuildPackage
,freeswitch-minimal
))
346 $(eval
$(call BuildPackage
,freeswitch-tools
))
348 #$(eval $(call BuildPlugin,Name,Title,Files,Depends))
349 $(eval
$(call BuildPlugin
,alsa
,Alsa endpoint
,mod_alsa
,,+alsa-lib
))
350 $(eval
$(call BuildPlugin
,amr
,GSM-AMR codec
,mod_amr
,,))
351 $(eval
$(call BuildPlugin
,amrwb
,GSM-AMRWB
,mod_amrwb
,,))
352 $(eval
$(call BuildPlugin
,cdr-csv
,CSV-CDR handler
,mod_cdr_csv
,,))
353 $(eval
$(call BuildPlugin
,celt
,CELT ultra-low delay codec
,mod_celt
,,))
354 $(eval
$(call BuildPlugin
,cepstral
,Cepstral interface
,mod_cepstral
,,@BROKEN
)) # needs <swift.h>
355 $(eval
$(call BuildPlugin
,cluechoo
,Framework Demo
,mod_cluechoo
,,))
356 $(eval
$(call BuildPlugin
,commands
,API commands
,mod_commands
,,))
357 $(eval
$(call BuildPlugin
,conference
,Conference room
,mod_conference
,,))
358 $(eval
$(call BuildPlugin
,console
,Console logger
,mod_console
,,))
359 $(eval
$(call BuildPlugin
,curl
,HTTP request
,mod_curl
,,))
360 $(eval
$(call BuildPlugin
,dahdi-codec
,DAHDI codecs
,mod_dahdi_codec
,,))
361 $(eval
$(call BuildPlugin
,dialplan-asterisk
,Asterisk dialplan parser
,mod_dialplan_asterisk
,,))
362 $(eval
$(call BuildPlugin
,dialplan-directory
,Dialplan-Directory interface
,mod_dialplan_directory
,,))
363 $(eval
$(call BuildPlugin
,dialplan-xml
,Dialplan-XML interface
,mod_dialplan_xml
,,))
364 $(eval
$(call BuildPlugin
,dingaling
,Jabber interface
,mod_dingaling
,,))
365 $(eval
$(call BuildPlugin
,dptools
,Dialplan tools
,mod_dptools
,,))
366 $(eval
$(call BuildPlugin
,easyroute
,DID routing
,mod_easyroute
,,))
367 $(eval
$(call BuildPlugin
,enum
,ENUM routing
,mod_enum
,,))
368 $(eval
$(call BuildPlugin
,erlang-event
,Erlang event handler
,mod_erlang_event
,,@BROKEN
)) # needs <ei.h>
369 $(eval
$(call BuildPlugin
,esf
,Extra SIP Functionality
,mod_esf
,,))
370 $(eval
$(call BuildPlugin
,event-multicast
,Multicast event handler
,mod_event_multicast
,,))
371 $(eval
$(call BuildPlugin
,event-socket
,Socket event handler
,mod_event_socket
,,))
372 $(eval
$(call BuildPlugin
,expr
,Expression evaluation
,mod_expr
,,))
373 $(eval
$(call BuildPlugin
,fax
,Fax
,mod_fax
,,@BROKEN
)) # fails in spandsp
374 $(eval
$(call BuildPlugin
,fifo
,FIFO
,mod_fifo
,,))
375 $(eval
$(call BuildPlugin
,file-string
,File streaming
,mod_file_string
,,))
376 $(eval
$(call BuildPlugin
,flite
,Festival TTS
,mod_flite
,,))
377 $(eval
$(call BuildPlugin
,fsv
,Video
,mod_fsv
,,))
378 $(eval
$(call BuildPlugin
,g723-1
,G
.723.1 codec
,mod_g723_1
,,))
379 $(eval
$(call BuildPlugin
,g729
,G
.729 codec
,mod_g729
,,))
380 $(eval
$(call BuildPlugin
,h26x
,H26X linear codec
,mod_h26x
,,))
381 $(eval
$(call BuildPlugin
,iax
,IAX2 interface
,mod_iax
,,))
382 $(eval
$(call BuildPlugin
,ilbc
,ILBC codec
,mod_ilbc
,,))
383 $(eval
$(call BuildPlugin
,lcr
,Least Cost Routing
,mod_lcr
,,))
384 $(eval
$(call BuildPlugin
,ldap
,LDAP interface
,mod_ldap
,,@BROKEN
)) # fails in openldap
385 $(eval
$(call BuildPlugin
,limit
,Resource limitation
,mod_limit
,,))
386 $(eval
$(call BuildPlugin
,local-stream
,Local streaming
,mod_local_stream
,,))
387 $(eval
$(call BuildPlugin
,logfile
,File logger
,mod_logfile
,,))
388 $(eval
$(call BuildPlugin
,loopback
,Loopback endpoint
,mod_loopback
,,))
389 $(eval
$(call BuildPlugin
,lua
,Lua language interface
,mod_lua
,,+libstdcpp
)) # needs C++
390 $(eval
$(call BuildPlugin
,memcache
,MemCached interface
,mod_memcache
,,@BROKEN
)) # fails in libmemcached
391 $(eval
$(call BuildPlugin
,native-file
,Native files
,mod_native_file
,,))
392 $(eval
$(call BuildPlugin
,nibblebill
,Billing
,mod_nibblebill
,,))
393 $(eval
$(call BuildPlugin
,opal
,Multi-Protocol endpoint
,mod_opal
,,@BROKEN
)) # needs Opal
394 $(eval
$(call BuildPlugin
,openzap
,Zaptel hardware interface
,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_ss7_boost ozmod_zt
,,+libpcap
))
395 $(eval
$(call BuildPlugin
,perl
,Perl language interface
,mod_perl
,,+perl @BROKEN
)) # needs Perl
396 $(eval
$(call BuildPlugin
,pocketsphinx
,PocketSphinx SR
,mod_pocketsphinx
,,@BROKEN
)) # fails in sphinxbase
397 $(eval
$(call BuildPlugin
,portaudio
,Local audio endpoint
,mod_portaudio
,,+alsa-lib
))
398 $(eval
$(call BuildPlugin
,python
,Python language interface
,mod_python
,,+python @BROKEN
)) # needs Python
399 $(eval
$(call BuildPlugin
,radius-cdr
,Radius-CDR interface
,mod_radius_cdr
,,@BROKEN
)) # fails in freeradius-client
400 $(eval
$(call BuildPlugin
,rss
,RRS feeds via TTS
,mod_rss
,,))
401 $(eval
$(call BuildPlugin
,say-de
,German say
,mod_say_de
,,))
402 $(eval
$(call BuildPlugin
,say-en
,English say
,mod_say_en
,,))
403 $(eval
$(call BuildPlugin
,say-es
,Spanish say
,mod_say_es
,,))
404 $(eval
$(call BuildPlugin
,say-fr
,French say
,mod_say_fr
,,))
405 $(eval
$(call BuildPlugin
,say-it
,Italian say
,mod_say_it
,,))
406 $(eval
$(call BuildPlugin
,say-nl
,Dutch say
,mod_say_nl
,,))
407 $(eval
$(call BuildPlugin
,say-ru
,Russian say
,mod_say_ru
,,))
408 $(eval
$(call BuildPlugin
,say-zh
,Chineese say
,mod_say_zh
,,))
409 $(eval
$(call BuildPlugin
,shout
,MP3 and Shoutcast stream
,mod_shout
,,@BROKEN
)) # needs Ogg/Vorbis
410 $(eval
$(call BuildPlugin
,siren
,G
.722.1 codec
,mod_siren
,,@BROKEN
)) # fails in libg722_1
411 $(eval
$(call BuildPlugin
,skypiax
,Skype compatible endpoint
,mod_skypiax
,,@BROKEN
)) # needs <X11/Xlib.h>
412 $(eval
$(call BuildPlugin
,sndfile
,Multi-Format file transcoder
,mod_sndfile
,,))
413 $(eval
$(call BuildPlugin
,snom
,SNOM specific features
,mod_snom
,,))
414 $(eval
$(call BuildPlugin
,sofia
,SIP
,mod_sofia
,,))
415 $(eval
$(call BuildPlugin
,soundtouch
,Sound effects
,mod_soundtouch
,,@BROKEN
)) # fails in soundtouch
416 $(eval
$(call BuildPlugin
,speex
,Speex codec
,mod_speex
,,))
417 $(eval
$(call BuildPlugin
,spidermonkey
,JavaScript
,mod_spidermonkey
,,@BROKEN
)) # fails in js
418 $(eval
$(call BuildPlugin
,spidermonkey-core_db
,JavaScript DB
,mod_spidermonkey_core_db
,,@BROKEN
))
419 $(eval
$(call BuildPlugin
,spidermonkey-curl
,JavaScript Curl
,mod_spidermonkey_curl
,,@BROKEN
))
420 $(eval
$(call BuildPlugin
,spidermonkey-odbc
,JavaScript ODBC
,mod_spidermonkey_odbc
,,@BROKEN
))
421 $(eval
$(call BuildPlugin
,spidermonkey-socket
,JavaScript socket
,mod_spidermonkey_socket
,,@BROKEN
))
422 $(eval
$(call BuildPlugin
,spidermonkey-teletone
,JavaScript teletone
,mod_spidermonkey_teletone
,,@BROKEN
))
423 $(eval
$(call BuildPlugin
,spy
,User spy
,mod_spy
,,))
424 $(eval
$(call BuildPlugin
,syslog
,SysLog logger
,mod_syslog
,,))
425 $(eval
$(call BuildPlugin
,tone-stream
,Tone generation stream
,mod_tone_stream
,,))
426 $(eval
$(call BuildPlugin
,unimrcp
,MRCP interface
,mod_unimrcp
,,))
427 $(eval
$(call BuildPlugin
,vmd
,VoiceMail beep detection
,mod_vmd
,,))
428 $(eval
$(call BuildPlugin
,voicemail
,VoiceMail
,mod_voicemail
,,))
429 $(eval
$(call BuildPlugin
,voipcodecs
,VoIP codecs
,mod_voipcodecs
,,))
430 $(eval
$(call BuildPlugin
,xml-cdr
,XML-CDR handler
,mod_xml_cdr
,,+libcurl
))
431 $(eval
$(call BuildPlugin
,xml-curl
,XML-Curl gateway
,mod_xml_curl
,,+libcurl
))
432 $(eval
$(call BuildPlugin
,xml-ldap
,LDAP-XML gateway
,mod_xml_ldap
,,@BROKEN
)) # fails in openldap
433 $(eval
$(call BuildPlugin
,xml-rpc
,XML-RPC interface
,mod_xml_rpc
,,))
434 $(eval
$(call BuildPlugin
,yaml
,YAML dialplans
,mod_yaml
,,))