[packages] add preliminary freeswitch v1.0.4 package (closes: #4891)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@17984 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8eaa279a1a
commit
d908be5a60
121
net/freeswitch/Makefile
Normal file
121
net/freeswitch/Makefile
Normal file
@ -0,0 +1,121 @@
|
||||
#
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=freeswitch
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://files.freeswitch.org/
|
||||
PKG_MD5SUM:=86e34bdd8cc027d71772cb0dc51388da
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/freeswitch
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=FreeSWITCH open source telephony platform
|
||||
URL:=http://www.freeswitch.org/
|
||||
DEPENDS:=+libopenssl +libcurl +libreadline +libncurses +libpthread
|
||||
endef
|
||||
|
||||
define Package/freeswitch/description
|
||||
FreeSWITCH is an open source telephony platform designed to
|
||||
facilitate the creation of voice and chat driven products scaling
|
||||
from a soft-phone up to a soft-switch.
|
||||
endef
|
||||
|
||||
FS_MODULES_DISABLED:= \
|
||||
applications/mod_cluechoo \
|
||||
codecs/mod_amr \
|
||||
codecs/mod_ilbc \
|
||||
codecs/mod_siren \
|
||||
languages/mod_lua \
|
||||
languages/mod_spidermonkey \
|
||||
languages/mod_spidermonkey_curl \
|
||||
languages/mod_spidermonkey_teletone \
|
||||
languages/mod_spidermonkey_core_db \
|
||||
languages/mod_spidermonkey_socket \
|
||||
say/mod_say_ru \
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--sysconfdir="/etc/freeswitch" \
|
||||
--with-modinstdir="/usr/lib/freeswitch" \
|
||||
--enable-ipv6 \
|
||||
\
|
||||
--with-libcurl="$(STAGING_DIR)/usr" \
|
||||
--with-openssl="$(STAGING_DIR)/usr" \
|
||||
--with-random="/dev/urandom" \
|
||||
--without-erlang \
|
||||
--without-java \
|
||||
--without-odbc \
|
||||
--without-mysql \
|
||||
--without-pgsql \
|
||||
--without-python \
|
||||
--disable-zrtp \
|
||||
|
||||
CONFIGURE_VARS+= \
|
||||
config_BUILD_CC="$(HOSTCC)" \
|
||||
config_BUILD_CFLAGS="$(HOST_CFLAGS)" \
|
||||
config_TARGET_CC="$(TARGET_CC)" \
|
||||
config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
||||
config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
|
||||
config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
|
||||
config_TARGET_LIBS="$(TARGET_LDFLAGS) -lpthread" \
|
||||
CC_FOR_BUILD="$(HOSTCC)" \
|
||||
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
||||
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
||||
LIBS="-lpthread" \
|
||||
ac_cv_file_dbd_apr_dbd_mysql_c="no" \
|
||||
apr_cv_process_shared_works="no" \
|
||||
apr_cv_tcp_nodelay_with_cork="yes" \
|
||||
|
||||
# apr_cv_gai_addrconfig="yes"
|
||||
# apr_cv_mutex_recursive="no"
|
||||
# apr_cv_mutex_robust_shared="no"
|
||||
# apr_cv_pthreads_lib="-lpthread"
|
||||
|
||||
# SWITCH_CONF_DIR="/etc/freeswitch"
|
||||
# ac_cv_file_dbd_apr_dbd_mysql_c="no"
|
||||
# ac_cv_cflags_warn_all_ansi=no
|
||||
|
||||
define Build/Configure
|
||||
( cd $(PKG_BUILD_DIR); ./rebootstrap.sh; )
|
||||
$(call Build/Configure/Default)
|
||||
$(foreach m,$(FS_MODULES_DISABLED), \
|
||||
$(SED) 's|^\($(m)\)$$$$|# \1|g' $(PKG_BUILD_DIR)/modules.conf; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Package/freeswitch/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/db
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/log
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/log/* $(1)/usr/log/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/freeswitch
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeswitch/*.so $(1)/usr/lib/freeswitch/
|
||||
$(INSTALL_DIR) $(1)/etc/freeswitch
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/freeswitch/ $(1)/etc/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
|
||||
|
||||
$(eval $(call BuildPackage,freeswitch))
|
7
net/freeswitch/files/freeswitch.default
Normal file
7
net/freeswitch/files/freeswitch.default
Normal file
@ -0,0 +1,7 @@
|
||||
#FS_DIR="/opt"
|
||||
FS_DIR_ETC="$FS_DIR/etc/freeswitch"
|
||||
FS_DIR_MOD="$FS_DIR/usr/lib/freeswitch"
|
||||
FS_DIR_LOG="$FS_DIR/tmp/freeswitch/log"
|
||||
FS_DIR_DB="$FS_DIR/tmp/freeswitch/db"
|
||||
|
||||
OPTIONS="-conf $FS_DIR_ETC -log $FS_DIR_LOG -db $FS_DIR_DB -mod $FS_DIR_MOD"
|
18
net/freeswitch/files/freeswitch.init
Normal file
18
net/freeswitch/files/freeswitch.init
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
START=90
|
||||
|
||||
DEFAULT=/etc/default/freeswitch
|
||||
OPTIONS=""
|
||||
|
||||
start() {
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
mkdir -p $FS_DIR_LOG
|
||||
mkdir -p $FS_DIR_DB
|
||||
$FS_DIR/usr/bin/freeswitch $OPTIONS -c
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -f $DEFAULT ] && . $DEFAULT
|
||||
$FS_DIR/usr/bin/freeswitch $OPTIONS -stop
|
||||
}
|
10
net/freeswitch/patches/101-trim.patch
Normal file
10
net/freeswitch/patches/101-trim.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -107,7 +107,6 @@ src/switch_config.c\
|
||||
src/switch_time.c\
|
||||
src/switch_odbc.c \
|
||||
libs/stfu/stfu.c\
|
||||
-src/switch_cpp.cpp\
|
||||
src/g711.c\
|
||||
src/switch_pcm.c\
|
||||
libs/libteletone/src/libteletone_detect.c\
|
25
net/freeswitch/patches/201-odbc.patch
Normal file
25
net/freeswitch/patches/201-odbc.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- a/build/config/odbc.m4
|
||||
+++ b/build/config/odbc.m4
|
||||
@@ -112,12 +112,13 @@ AC_ARG_WITH(odbc-include,
|
||||
fi])
|
||||
|
||||
if test "X$with_odbc" != "X"; then
|
||||
- if test "$with_odbc" != "yes"; then
|
||||
- ac_cv_odbc_where_lib=$with_odbc
|
||||
+ if test "$with_odbc" != "yes" -o "$with_odbc" != "no"; then
|
||||
+ ac_cv_odbc_where_lib=$with_odbc/lib
|
||||
ac_cv_odbc_where_inc=$with_odbc/include
|
||||
fi
|
||||
fi
|
||||
|
||||
+ if test "$with_odbc" != "no"; then
|
||||
if test "X$with_odbc_include" != "X"; then
|
||||
ac_cv_odbc_where_inc=$with_odbc_include
|
||||
fi
|
||||
@@ -159,5 +160,6 @@ AC_ARG_WITH(odbc-include,
|
||||
AC_SUBST(ODBC_LIB_FLAGS)
|
||||
AC_DEFINE([HAVE_ODBC],[1],[libodbc])
|
||||
fi
|
||||
+ fi ## test "$with_odbc" != "no" ##
|
||||
])
|
||||
|
22
net/freeswitch/patches/202-pthread.patch
Normal file
22
net/freeswitch/patches/202-pthread.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -196,7 +196,7 @@ fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread
|
||||
fs_ivrd_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include
|
||||
fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
|
||||
freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
|
||||
-freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
|
||||
+freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
|
||||
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
|
||||
if ADD_LIBEDIT
|
||||
fs_cli_CFLAGS += -DHAVE_EDITLINE -Ilibs/libedit/src
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -578,7 +578,7 @@ fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread
|
||||
fs_ivrd_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include
|
||||
fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
|
||||
freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS) $(am__append_2)
|
||||
-freeswitch_LDFLAGS = $(AM_LDFLAGS) -rpath $(libdir)
|
||||
+freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
|
||||
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la \
|
||||
$(am__append_3)
|
||||
@ADD_LIBEDIT_TRUE@fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
|
Loading…
x
Reference in New Issue
Block a user