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
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
191 --prefix="/usr/freeswitch" \
192 --bindir="/usr/bin" \
193 --libdir="/usr/lib" \
194 --sysconfdir
="/etc/freeswitch" \
195 --with-modinstdir
="/usr/lib/freeswitch" \
198 --with-libcurl
="$(STAGING_DIR)/usr" \
199 --with-openssl
="$(STAGING_DIR)/usr" \
200 --with-random
="/dev/urandom" \
210 config_BUILD_CC
="$(HOSTCC)" \
211 config_BUILD_CFLAGS
="$(HOST_CFLAGS)" \
212 config_TARGET_CC
="$(TARGET_CC)" \
213 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
214 config_TARGET_READLINE_INC
="$(TARGET_CPPFLAGS)" \
215 config_TARGET_READLINE_LIBS
="$(TARGET_LDFLAGS) -lreadline -lncurses" \
216 config_TARGET_LIBS
="$(TARGET_LDFLAGS) -lpthread" \
217 CC_FOR_BUILD
="$(HOSTCC)" \
218 CFLAGS_FOR_BUILD
="$(HOST_CFLAGS)" \
219 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
220 LDFLAGS
="$(TARGET_LDFLAGS) -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib\"" \
221 ac_cv_dev_urandom
="yes" \
222 ac_cv_file_dbd_apr_dbd_mysql_c
="no" \
223 ac_cv_file__dev_random
="no" \
224 ac_cv_file__dev_urandom
="yes" \
225 ac_cv_file___dev_urandom_
="yes" \
226 ac_cv_func_mmap_fixed_mapped
="yes" \
227 ac_cv_func_pthread_rwlock_init
="yes" \
228 ac_cv_struct_rlimit
="yes" \
229 apr_cv_mutex_recursive
="yes" \
230 apr_cv_process_shared_works
="no" \
231 apr_cv_tcp_nodelay_with_cork
="yes" \
232 apr_cv_type_rwlock_t
="yes" \
234 define Build
/Configure
235 ( cd
$(PKG_BUILD_DIR
); .
/rebootstrap.sh
; )
236 $(call Build
/Configure
/Default
)
237 $(foreach m
,$(FS_MOD_AVAILABLE
),
238 $(if
$(CONFIG_PACKAGE_freeswitch-mod-
$(m
)),
239 $(SED
) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR
)/modules.conf
241 $(SED
) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR
)/modules.conf
247 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
248 DESTDIR
="$(PKG_INSTALL_DIR)" \
249 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
253 define Build
/InstallDev
254 $(INSTALL_DIR
) $(1)/usr
/include/freeswitch
255 $(CP
) $(PKG_INSTALL_DIR
)/usr
/freeswitch
/include/* $(1)/usr
/include/freeswitch
/
256 $(INSTALL_DIR
) $(1)/usr
/lib
257 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfreeswitch.
{a
,so
*} $(1)/usr
/lib
/
260 define Package
/freeswitch
/install
261 $(INSTALL_DIR
) $(1)/usr
/bin
262 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/freeswitch
$(1)/usr
/bin
/
263 $(INSTALL_DIR
) $(1)/usr
/lib
264 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libfreeswitch.so.
* $(1)/usr
/lib
/
265 $(INSTALL_DIR
) $(1)/usr
/lib
/freeswitch
266 $(INSTALL_DIR
) $(1)/etc
/default
267 $(INSTALL_DATA
) .
/files
/freeswitch.default
$(1)/etc
/default
/freeswitch
268 $(INSTALL_DIR
) $(1)/etc
/init.d
269 $(INSTALL_BIN
) .
/files
/freeswitch.init
$(1)/etc
/init.d
/freeswitch
272 define Package
/freeswitch-default
/install
273 $(INSTALL_DIR
) $(1)/etc
/freeswitch
274 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeswitch
/* $(1)/etc
/freeswitch
/
277 define Package
/freeswitch-minimal
/install
278 $(INSTALL_DIR
) $(1)/etc
/freeswitch
279 $(CP
) $(PKG_INSTALL_DIR
)/etc
/freeswitch
/* $(1)/etc
/freeswitch
/
282 define Package
/freeswitch-tools
/install
283 $(INSTALL_DIR
) $(1)/usr
/bin
284 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/fs_cli
$(1)/usr
/bin
/
293 define Package
/freeswitch-mod-
$(1)
294 $$(call Package
/freeswitch
/Default
)
295 TITLE
:= FS
$(2) module
296 DEPENDS
:=freeswitch
$$(foreach m
,$(4),+freeswitch-mod-
$$m) $(5)
299 define Package
/freeswitch-mod-
$(1)/install
300 [ -z
"$(3)" ] ||
$(INSTALL_DIR
) $$(1)/usr
/lib
/freeswitch
303 $(PKG_INSTALL_DIR
)/usr
/lib
/freeswitch
/$$$$$$$${f}.so \
304 $$(1)/usr
/lib
/freeswitch
/ ; \
308 $$(eval
$$(call BuildPackage
,freeswitch-mod-
$(1)))
311 $(eval
$(call BuildPackage
,freeswitch
))
312 $(eval
$(call BuildPackage
,freeswitch-default
))
313 $(eval
$(call BuildPackage
,freeswitch-minimal
))
314 $(eval
$(call BuildPackage
,freeswitch-tools
))
316 #$(eval $(call BuildPlugin,Name,Title,Files,Depends))
317 $(eval
$(call BuildPlugin
,alsa
,Alsa endpoint
,mod_alsa
,,+alsa-lib
))
318 $(eval
$(call BuildPlugin
,amr
,GSM-AMR codec
,mod_amr
,,))
319 $(eval
$(call BuildPlugin
,amrwb
,GSM-AMRWB
,mod_amrwb
,,))
320 $(eval
$(call BuildPlugin
,cdr-csv
,CSV-CDR handler
,mod_cdr_csv
,,))
321 $(eval
$(call BuildPlugin
,celt
,CELT ultra-low delay codec
,mod_celt
,,))
322 $(eval
$(call BuildPlugin
,cepstral
,Cepstral interface
,mod_cepstral
,,@BROKEN
)) # needs <swift.h>
323 $(eval
$(call BuildPlugin
,cluechoo
,Framework Demo
,mod_cluechoo
,,))
324 $(eval
$(call BuildPlugin
,commands
,API commands
,mod_commands
,,))
325 $(eval
$(call BuildPlugin
,conference
,Conference room
,mod_conference
,,))
326 $(eval
$(call BuildPlugin
,console
,Console logger
,mod_console
,,))
327 $(eval
$(call BuildPlugin
,curl
,HTTP request
,mod_curl
,,))
328 $(eval
$(call BuildPlugin
,dahdi-codec
,DAHDI codecs
,mod_dahdi_codec
,,))
329 $(eval
$(call BuildPlugin
,dialplan-asterisk
,Asterisk dialplan parser
,mod_dialplan_asterisk
,,))
330 $(eval
$(call BuildPlugin
,dialplan-directory
,Dialplan-Directory interface
,mod_dialplan_directory
,,))
331 $(eval
$(call BuildPlugin
,dialplan-xml
,Dialplan-XML interface
,mod_dialplan_xml
,,))
332 $(eval
$(call BuildPlugin
,dingaling
,Jabber interface
,mod_dingaling
,,))
333 $(eval
$(call BuildPlugin
,dptools
,Dialplan tools
,mod_dptools
,,))
334 $(eval
$(call BuildPlugin
,easyroute
,DID routing
,mod_easyroute
,,))
335 $(eval
$(call BuildPlugin
,enum
,ENUM routing
,mod_enum
,,))
336 $(eval
$(call BuildPlugin
,erlang-event
,Erlang event handler
,mod_erlang_event
,,@BROKEN
)) # needs <ei.h>
337 $(eval
$(call BuildPlugin
,esf
,Extra SIP Functionality
,mod_esf
,,))
338 $(eval
$(call BuildPlugin
,event-multicast
,Multicast event handler
,mod_event_multicast
,,))
339 $(eval
$(call BuildPlugin
,event-socket
,Socket event handler
,mod_event_socket
,,))
340 $(eval
$(call BuildPlugin
,expr
,Expression evaluation
,mod_expr
,,))
341 $(eval
$(call BuildPlugin
,fax
,Fax
,mod_fax
,,@BROKEN
)) # fails in spandsp
342 $(eval
$(call BuildPlugin
,fifo
,FIFO
,mod_fifo
,,))
343 $(eval
$(call BuildPlugin
,file-string
,File streaming
,mod_file_string
,,))
344 $(eval
$(call BuildPlugin
,flite
,Festival TTS
,mod_flite
,,))
345 $(eval
$(call BuildPlugin
,fsv
,Video
,mod_fsv
,,))
346 $(eval
$(call BuildPlugin
,g723-1
,G
.723.1 codec
,mod_g723_1
,,))
347 $(eval
$(call BuildPlugin
,g729
,G
.729 codec
,mod_g729
,,))
348 $(eval
$(call BuildPlugin
,h26x
,H26X linear codec
,mod_h26x
,,))
349 $(eval
$(call BuildPlugin
,iax
,IAX2 interface
,mod_iax
,,))
350 $(eval
$(call BuildPlugin
,ilbc
,ILBC codec
,mod_ilbc
,,))
351 $(eval
$(call BuildPlugin
,lcr
,Least Cost Routing
,mod_lcr
,,))
352 $(eval
$(call BuildPlugin
,ldap
,LDAP interface
,mod_ldap
,,@BROKEN
)) # fails in openldap
353 $(eval
$(call BuildPlugin
,limit
,Resource limitation
,mod_limit
,,))
354 $(eval
$(call BuildPlugin
,local-stream
,Local streaming
,mod_local_stream
,,))
355 $(eval
$(call BuildPlugin
,logfile
,File logger
,mod_logfile
,,))
356 $(eval
$(call BuildPlugin
,loopback
,Loopback endpoint
,mod_loopback
,,))
357 $(eval
$(call BuildPlugin
,lua
,Lua language interface
,mod_lua
,,@BROKEN
)) # needs C++
358 $(eval
$(call BuildPlugin
,memcache
,MemCached interface
,mod_memcache
,,@BROKEN
)) # fails in libmemcached
359 $(eval
$(call BuildPlugin
,native-file
,Native files
,mod_native_file
,,))
360 $(eval
$(call BuildPlugin
,nibblebill
,Billing
,mod_nibblebill
,,))
361 $(eval
$(call BuildPlugin
,opal
,Multi-Protocol endpoint
,mod_opal
,,@BROKEN
)) # needs Opal
362 $(eval
$(call BuildPlugin
,openzap
,Zaptel harware interface
,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_ss7_boost ozmod_zt
,,))
363 $(eval
$(call BuildPlugin
,perl
,Perl language interface
,mod_perl
,,+perl @BROKEN
)) # needs Perl
364 $(eval
$(call BuildPlugin
,pocketsphinx
,PocketSphinx SR
,mod_pocketsphinx
,,@BROKEN
)) # fails in sphinxbase
365 $(eval
$(call BuildPlugin
,portaudio
,Local audio endpoint
,mod_portaudio
,,+alsa-lib
))
366 $(eval
$(call BuildPlugin
,python
,Python language interface
,mod_python
,,+python @BROKEN
)) # needs Python
367 $(eval
$(call BuildPlugin
,radius-cdr
,Radius-CDR interface
,mod_radius_cdr
,,@BROKEN
)) # fails in freeradius-client
368 $(eval
$(call BuildPlugin
,rss
,RRS feeds via TTS
,mod_rss
,,))
369 $(eval
$(call BuildPlugin
,say-de
,German say
,mod_say_de
,,))
370 $(eval
$(call BuildPlugin
,say-en
,English say
,mod_say_en
,,))
371 $(eval
$(call BuildPlugin
,say-es
,Spanish say
,mod_say_es
,,))
372 $(eval
$(call BuildPlugin
,say-fr
,French say
,mod_say_fr
,,))
373 $(eval
$(call BuildPlugin
,say-it
,Italian say
,mod_say_it
,,))
374 $(eval
$(call BuildPlugin
,say-nl
,Dutch say
,mod_say_nl
,,))
375 $(eval
$(call BuildPlugin
,say-ru
,Russian say
,mod_say_ru
,,))
376 $(eval
$(call BuildPlugin
,say-zh
,Chineese say
,mod_say_zh
,,))
377 $(eval
$(call BuildPlugin
,shout
,MP3 and Shoutcast stream
,mod_shout
,,@BROKEN
)) # needs Ogg/Vorbis
378 $(eval
$(call BuildPlugin
,siren
,G
.722.1 codec
,mod_siren
,,@BROKEN
)) # fails in libg722_1
379 $(eval
$(call BuildPlugin
,skypiax
,Skype compatible endpoint
,mod_skypiax
,,@BROKEN
)) # needs <X11/Xlib.h>
380 $(eval
$(call BuildPlugin
,sndfile
,Multi-Format file transcoder
,mod_sndfile
,,))
381 $(eval
$(call BuildPlugin
,snom
,SNOM specific features
,mod_snom
,,))
382 $(eval
$(call BuildPlugin
,sofia
,SIP
,mod_sofia
,,))
383 $(eval
$(call BuildPlugin
,soundtouch
,Sound effects
,mod_soundtouch
,,@BROKEN
)) # needs C++
384 $(eval
$(call BuildPlugin
,speex
,Speex codec
,mod_speex
,,))
385 $(eval
$(call BuildPlugin
,spidermonkey
,JavaScript
,mod_spidermonkey
,,@BROKEN
)) # fails in js
386 $(eval
$(call BuildPlugin
,spidermonkey-core_db
,JavaScript DB
,mod_spidermonkey_core_db
,,@BROKEN
))
387 $(eval
$(call BuildPlugin
,spidermonkey-curl
,JavaScript Curl
,mod_spidermonkey_curl
,,@BROKEN
))
388 $(eval
$(call BuildPlugin
,spidermonkey-odbc
,JavaScript ODBC
,mod_spidermonkey_odbc
,,@BROKEN
))
389 $(eval
$(call BuildPlugin
,spidermonkey-socket
,JavaScript socket
,mod_spidermonkey_socket
,,@BROKEN
))
390 $(eval
$(call BuildPlugin
,spidermonkey-teletone
,JavaScript teletone
,mod_spidermonkey_teletone
,,@BROKEN
))
391 $(eval
$(call BuildPlugin
,spy
,User spy
,mod_spy
,,))
392 $(eval
$(call BuildPlugin
,syslog
,SysLog logger
,mod_syslog
,,))
393 $(eval
$(call BuildPlugin
,tone-stream
,Tone generation stream
,mod_tone_stream
,,))
394 $(eval
$(call BuildPlugin
,unimrcp
,MRCP interface
,mod_unimrcp
,,))
395 $(eval
$(call BuildPlugin
,vmd
,VoiceMail beep detection
,mod_vmd
,,))
396 $(eval
$(call BuildPlugin
,voicemail
,VoiceMail
,mod_voicemail
,,))
397 $(eval
$(call BuildPlugin
,voipcodecs
,VoIP codecs
,mod_voipcodecs
,,))
398 $(eval
$(call BuildPlugin
,xml-cdr
,XML-CDR handler
,mod_xml_cdr
,,+libcurl
))
399 $(eval
$(call BuildPlugin
,xml-curl
,XML-Curl gateway
,mod_xml_curl
,,+libcurl
))
400 $(eval
$(call BuildPlugin
,xml-ldap
,LDAP-XML gateway
,mod_xml_ldap
,,@BROKEN
)) # fails in openldap
401 $(eval
$(call BuildPlugin
,xml-rpc
,XML-RPC interface
,mod_xml_rpc
,,))
402 $(eval
$(call BuildPlugin
,yaml
,YAML dialplans
,mod_yaml
,,))