define Package/freeswitch
$(call Package/freeswitch/Default)
TITLE:=FreeSWITCH open source telephony platform
- DEPENDS:=+libopenssl +libreadline +libncurses +libpthread
+ DEPENDS:=+libopenssl +libreadline +libncurses +libpthread +libstdcpp
MENU:=1
endef
endef
+define Download/lib
+ define Download/$(1)
+ FILE:=$(2)
+ URL:=http://files.freeswitch.org/downloads/libs/
+ MD5SUM:=$(3)
+ endef
+ define Prepare/$(1)
+ $(CP) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/libs/
+ endef
+ $$(eval $$(call Download,$(1)))
+endef
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-celt),)
+ $(eval $(call Download/lib,celt,celt-0.6.1.tar.gz,2961ffb6fadb5f905d20de9f0d86e44c))
+endif
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-curl),)
+ $(eval $(call Download/lib,json-c,json-c-0.8.tar.gz,9c7b90dff16eec3063084829c382ebac))
+endif
+
+ifneq ($(CONFIG_PACKAGE_freeswitch-mod-flite),)
+ $(eval $(call Download/lib,flite,flite-1.3.99-latest.tar.gz,f1b144c290893f074376520b447cc07f))
+endif
+
+
CONFIGURE_ARGS+= \
--prefix="/usr/freeswitch" \
--bindir="/usr/bin" \
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=\"$(STAGING_DIR)/usr/lib\"" \
+ ac_cv_dev_urandom="yes" \
ac_cv_file_dbd_apr_dbd_mysql_c="no" \
+ ac_cv_file__dev_random="no" \
+ ac_cv_file__dev_urandom="yes" \
+ ac_cv_file___dev_urandom_="yes" \
+ ac_cv_func_mmap_fixed_mapped="yes" \
+ ac_cv_func_pthread_rwlock_init="yes" \
+ ac_cv_struct_rlimit="yes" \
+ apr_cv_mutex_recursive="yes" \
apr_cv_process_shared_works="no" \
apr_cv_tcp_nodelay_with_cork="yes" \
+ apr_cv_type_rwlock_t="yes" \
+
+define Build/Prepare
+$(call Build/Prepare/Default)
+ $(call Prepare/celt)
+ $(call Prepare/flite)
+ $(call Prepare/json-c)
+endef
define Build/Configure
( cd $(PKG_BUILD_DIR); ./rebootstrap.sh; )
$(CP) $(PKG_INSTALL_DIR)/usr/freeswitch/include/* $(1)/usr/include/freeswitch/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreeswitch.{a,so*} $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/etc/default
- $(INSTALL_DATA) ./files/freeswitch.default $(1)/etc/default/freeswitch
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/freeswitch.init $(1)/etc/init.d/freeswitch
endef
define Package/freeswitch/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreeswitch.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/freeswitch
+ $(INSTALL_DIR) $(1)/etc/default
+ $(INSTALL_DATA) ./files/freeswitch.default $(1)/etc/default/freeswitch
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/freeswitch.init $(1)/etc/init.d/freeswitch
endef
define Package/freeswitch-default/install
$(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
$(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
$(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
-$(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,@BROKEN)) # needs C++
+$(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp)) # needs C++
$(eval $(call BuildPlugin,memcache,MemCached interface,mod_memcache,,@BROKEN)) # fails in libmemcached
$(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
$(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
$(eval $(call BuildPlugin,opal,Multi-Protocol endpoint,mod_opal,,@BROKEN)) # needs Opal
-$(eval $(call BuildPlugin,openzap,Zaptel harware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_ss7_boost ozmod_zt,,))
+$(eval $(call BuildPlugin,openzap,Zaptel harware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_ss7_boost ozmod_zt,,+libpcap))
$(eval $(call BuildPlugin,perl,Perl language interface,mod_perl,,+perl @BROKEN)) # needs Perl
$(eval $(call BuildPlugin,pocketsphinx,PocketSphinx SR,mod_pocketsphinx,,@BROKEN)) # fails in sphinxbase
$(eval $(call BuildPlugin,portaudio,Local audio endpoint,mod_portaudio,,+alsa-lib))
$(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
$(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
$(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
-$(eval $(call BuildPlugin,soundtouch,Sound effects,mod_soundtouch,,@BROKEN)) # needs C++
+$(eval $(call BuildPlugin,soundtouch,Sound effects,mod_soundtouch,,@BROKEN)) # fails in soundtouch
$(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
$(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
$(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))