2010-08-04 14:06:07 +00:00
#
2013-01-07 14:25:52 +00:00
# Copyright (C) 2009-2013 OpenWrt.org
2009-10-07 16:17:09 +00:00
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
2011-08-08 02:20:17 +00:00
#
2009-10-07 16:17:09 +00:00
i n c l u d e $( TOPDIR ) / r u l e s . m k
2011-08-08 02:20:17 +00:00
2009-10-07 16:17:09 +00:00
PKG_NAME := freeswitch
2011-10-29 12:45:28 +00:00
PKG_DISTNAME := $( PKG_NAME) _git
2013-01-07 14:25:52 +00:00
PKG_VERSION := 1.3.13b
PKG_RELEASE := 1
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
2011-07-15 19:03:13 +00:00
#
2013-01-14 00:15:24 +00:00
# The latest FS git hash in PKG_SOURCE_VERSION can be obtained from http://fisheye.freeswitch.org
2011-07-15 19:03:13 +00:00
#
2011-05-18 12:32:00 +00:00
PKG_SOURCE_PROTO := git
PKG_SOURCE_URL := git://git.$( PKG_NAME) .org/$( PKG_NAME) .git
2013-01-14 00:15:24 +00:00
FS_DEFAULT_HEAD := af6ae011c70c32d6d7637f7befc0e614b4624527
FS_LATEST_HEAD := $( shell git ls-remote $( PKG_SOURCE_URL) HEAD | cut -f1)
PKG_SOURCE_VERSION := $( if $( CONFIG_FS_SOFIA_WITH_PULL_CURRENT) ,$( FS_LATEST_HEAD) ,$( FS_DEFAULT_HEAD) )
2011-10-29 12:45:28 +00:00
PKG_SOURCE_SUBDIR := $( PKG_DISTNAME)
2013-01-14 00:15:24 +00:00
PKG_SOURCE := $( PKG_SOURCE_SUBDIR) -$( shell echo $( PKG_SOURCE_VERSION) | cut -b -7) .tar.bz2
2010-04-13 10:23:46 +00:00
PKG_BUILD_DIR := $( BUILD_DIR) /$( PKG_NAME) -$( PKG_VERSION)
2009-10-07 16:17:09 +00:00
2011-07-15 19:03:13 +00:00
2012-06-11 21:18:33 +00:00
PKG_FIXUP := autoreconf
2011-07-15 19:03:13 +00:00
PKG_BUILD_PARALLEL := 1
2009-10-13 07:20:19 +00:00
FS_MOD_AVAILABLE := \
2013-01-07 14:25:52 +00:00
abstraction \
2009-10-13 07:20:19 +00:00
alsa \
amr \
amrwb \
2011-05-21 14:21:16 +00:00
avmd \
2011-09-17 03:03:11 +00:00
blacklist \
2011-10-29 12:45:28 +00:00
bv \
2011-05-21 14:21:16 +00:00
callcenter \
2009-10-13 07:20:19 +00:00
cdr-csv \
2011-05-21 14:21:16 +00:00
cdr-pg-csv \
cdr-sqlite \
2009-10-13 07:20:19 +00:00
celt \
cepstral \
2010-04-13 10:23:46 +00:00
cidlookup \
2009-10-13 07:20:19 +00:00
cluechoo \
2011-05-18 12:32:00 +00:00
codec2 \
2009-10-13 07:20:19 +00:00
commands \
conference \
console \
curl \
dahdi-codec \
2011-05-21 14:21:16 +00:00
db \
2009-10-13 07:20:19 +00:00
dialplan-asterisk \
dialplan-directory \
dialplan-xml \
dingaling \
2010-04-13 10:23:46 +00:00
directory \
distributor \
2009-10-13 07:20:19 +00:00
dptools \
easyroute \
enum \
erlang-event \
esf \
event-multicast \
event-socket \
2011-05-21 14:21:16 +00:00
event-zmq \
2009-10-13 07:20:19 +00:00
expr \
fifo \
file-string \
flite \
2011-07-15 19:03:13 +00:00
fsk \
2009-10-13 07:20:19 +00:00
fsv \
g723-1 \
g729 \
2011-07-15 19:03:13 +00:00
gsmopen \
2009-10-13 07:20:19 +00:00
h26x \
2010-04-13 10:23:46 +00:00
h323 \
2011-05-18 12:32:00 +00:00
hash \
2013-01-07 14:25:52 +00:00
html5 \
httapi \
2011-11-11 18:06:57 +00:00
http-cache \
2009-10-13 07:20:19 +00:00
ilbc \
2013-01-07 14:25:52 +00:00
isac \
2011-05-21 14:21:16 +00:00
java \
2011-07-15 19:03:13 +00:00
json-cdr \
2009-10-13 07:20:19 +00:00
lcr \
local-stream \
logfile \
loopback \
lua \
2010-04-13 10:23:46 +00:00
managed \
2011-06-15 01:56:23 +00:00
mp4 \
2013-01-07 14:25:52 +00:00
mp4v \
2009-10-13 07:20:19 +00:00
native-file \
nibblebill \
openzap \
2011-07-15 19:03:13 +00:00
opus \
2013-01-07 14:25:52 +00:00
oreka \
2009-10-13 07:20:19 +00:00
portaudio \
2010-04-13 10:23:46 +00:00
portaudio-stream \
2013-01-07 14:25:52 +00:00
posix-timer \
2009-10-13 07:20:19 +00:00
radius-cdr \
2013-01-07 14:25:52 +00:00
redis \
2009-10-13 07:20:19 +00:00
rss \
2011-06-18 00:57:22 +00:00
rtmp \
2013-01-07 14:25:52 +00:00
sangoma-codec \
2009-10-13 07:20:19 +00:00
say-de \
say-en \
say-es \
2013-01-07 14:25:52 +00:00
say-fa \
2009-10-13 07:20:19 +00:00
say-fr \
2011-05-21 14:21:16 +00:00
say-hu \
2009-10-13 07:20:19 +00:00
say-it \
say-nl \
2011-05-21 14:21:16 +00:00
say-pt \
2009-10-13 07:20:19 +00:00
say-ru \
2010-04-13 10:23:46 +00:00
say-th \
2009-10-13 07:20:19 +00:00
say-zh \
2010-04-13 10:23:46 +00:00
shell-stream \
silk \
2009-10-13 07:20:19 +00:00
siren \
2013-01-07 14:25:52 +00:00
skel \
2010-04-13 10:23:46 +00:00
skinny \
skypopen \
2011-09-22 03:42:48 +00:00
sms \
2010-04-13 10:23:46 +00:00
snapshot \
snipe-hunt \
2009-10-13 07:20:19 +00:00
sndfile \
2011-10-29 12:45:28 +00:00
snmp \
2009-10-13 07:20:19 +00:00
snom \
sofia \
2013-01-07 14:25:52 +00:00
sonar \
2011-05-18 12:32:00 +00:00
spandsp \
2009-10-13 07:20:19 +00:00
speex \
spidermonkey \
spidermonkey-core-db \
spidermonkey-curl \
spidermonkey-odbc \
spidermonkey-socket \
spidermonkey-teletone \
spy \
2010-04-13 10:23:46 +00:00
stress \
2009-10-13 07:20:19 +00:00
syslog \
tone-stream \
2011-05-21 14:21:16 +00:00
tts-commandline \
2009-10-13 07:20:19 +00:00
unimrcp \
2010-04-13 10:23:46 +00:00
valet-parking \
2009-10-13 07:20:19 +00:00
vmd \
voicemail \
2013-01-07 14:25:52 +00:00
voicemail-ivr \
2009-10-13 07:20:19 +00:00
xml-cdr \
xml-curl \
xml-rpc \
2013-01-07 14:25:52 +00:00
xml-scgi \
2009-10-13 07:20:19 +00:00
yaml \
2011-08-08 02:20:17 +00:00
2009-10-13 07:20:19 +00:00
PKG_CONFIG_DEPENDS := \
2011-08-30 00:22:55 +00:00
CONFIG_FS_SOFIA_WITH_IPV6 \
2011-10-29 12:45:28 +00:00
CONFIG_FS_SOFIA_WITH_MYSQL \
2011-08-08 02:20:17 +00:00
CONFIG_FS_SOFIA_WITH_ODBC \
2011-08-30 00:22:55 +00:00
CONFIG_FS_SOFIA_WITH_OPT \
2013-01-14 00:15:24 +00:00
CONFIG_FS_SOFIA_WITH_PULL_CURRENT \
2011-08-30 00:22:55 +00:00
CONFIG_FS_SOFIA_WITH_SCTP \
CONFIG_FS_SOFIA_WITH_ZRTP_GIT \
2011-05-18 12:32:00 +00:00
$( patsubst %,CONFIG_PACKAGE_$( PKG_NAME) -mod-%,$( FS_MOD_AVAILABLE) ) \
2009-10-13 07:20:19 +00:00
2011-08-08 02:20:17 +00:00
2009-10-07 16:17:09 +00:00
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
2011-07-15 19:03:13 +00:00
i n c l u d e $( INCLUDE_DIR ) / n l s . m k
2009-10-07 16:17:09 +00:00
2011-10-29 12:45:28 +00:00
TAR_OPTIONS += --strip-components= 1 -C $( PKG_BUILD_DIR)
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) / D e f a u l t
2009-10-07 16:17:09 +00:00
SECTION:= net
CATEGORY:= Network
2011-03-12 00:25:24 +00:00
SUBMENU:= Telephony
2011-05-18 12:32:00 +00:00
URL:= http://www.$( PKG_NAME) .org/
MAINTAINER:= Mazilo <OpenWRT@slickdeals.endjunk.com>
2009-10-13 07:20:19 +00:00
e n d e f
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME )
$( call Package /$ ( PKG_NAME ) /Default )
2013-01-14 00:15:24 +00:00
TITLE:= FreeSWITCH open source telephony platform ( $( shell echo $( FS_DEFAULT_HEAD) | cut -b -7) )
2013-01-07 14:25:52 +00:00
DEPENDS:= +libcurl +libjpeg +libncurses +libpq +libpthread +librt +libstdcpp
2009-10-13 07:20:19 +00:00
MENU:= 1
2009-10-07 16:17:09 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) / d e s c r i p t i o n
2012-03-11 20:31:20 +00:00
FreeSWITCH is an open source telephony platform designed to
facilitate the creation of voice and chat driven products scaling
2011-05-18 12:32:00 +00:00
from a soft-phone up to a soft-switch. See http://wiki.$( PKG_NAME) .org
2009-10-07 16:17:09 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-07-15 19:03:13 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) / c o n f i g
2013-01-14 00:15:24 +00:00
config FS_SOFIA_WITH_PULL_CURRENT
depends on DEVEL
depends on PACKAGE_$( PKG_NAME)
bool " Pull the latest git HEAD - $( shell echo $( PKG_SOURCE_VERSION) | cut -b -7) (Press < Help > for more information) "
default n
help
This existing git HEAD ( $( FS_DEFAULT_HEAD) ) is probably outdated.
Enable this option for the latest git HEAD ( $( FS_LATEST_HEAD) ) .
Enable this option ONLY if you know what you are doing. It may and/or may not be cleanly
compiled and may require some intervension to create new patches. If you take this route
and come up with some patches, please contemplate to contribute to send in your patches.
2011-08-30 00:22:55 +00:00
config FS_SOFIA_WITH_IPV6
2011-07-15 19:03:13 +00:00
depends on PACKAGE_$( PKG_NAME)
2011-08-30 00:22:55 +00:00
bool "Compile with IPV6 support"
default y
help
2013-01-14 00:15:24 +00:00
Compile $( PKG_NAME) with IPV6 Support.
2011-08-30 00:22:55 +00:00
config FS_SOFIA_WITH_OPT
depends on PACKAGE_$( PKG_NAME)
bool "Compile with optimization"
default y
help
2013-01-14 00:15:24 +00:00
Compile $( PKG_NAME) with optimization enabled.
2011-08-30 00:22:55 +00:00
e n d e f
2011-10-29 12:45:28 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - m o d - s o f i a / c o n f i g
config FS_SOFIA_WITH_MYSQL
depends on PACKAGE_$( PKG_NAME) -mod-sofia
bool "Compile with MySQL"
default n
select PACKAGE_libmysqlclient
2011-08-30 00:22:55 +00:00
help
2013-01-14 00:15:24 +00:00
Compile $( PKG_NAME) with MySQL.
2011-08-30 00:22:55 +00:00
config FS_SOFIA_WITH_ODBC
depends on PACKAGE_$( PKG_NAME) -mod-sofia
2011-10-29 12:45:28 +00:00
depends on PACKAGE_sqliteodbc
2011-09-16 01:24:33 +00:00
depends on PACKAGE_unixodbc_svn
2011-09-08 02:43:52 +00:00
bool "Compile with ODBC support (Requires unixodbc_svn NOT YET AVAILABLE)"
2011-07-15 19:03:13 +00:00
default n
help
2013-01-14 00:15:24 +00:00
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.
2011-08-30 00:22:55 +00:00
config FS_SOFIA_WITH_SCTP
depends on PACKAGE_$( PKG_NAME) -mod-sofia
2011-09-16 01:24:33 +00:00
depends on PACKAGE_sctp
2011-09-08 02:43:52 +00:00
bool "Compile with SCTP (Stream Control Transfer Protocol) support"
2011-10-29 12:45:28 +00:00
default y
2011-08-30 00:22:55 +00:00
help
2013-01-14 00:15:24 +00:00
Compile $( PKG_NAME) -mod-sofia with SCTP support.
2011-08-30 00:22:55 +00:00
config FS_SOFIA_WITH_ZRTP_GIT
depends on PACKAGE_$( PKG_NAME) -mod-sofia
2011-09-16 01:24:33 +00:00
depends on PACKAGE_libzrtpcpp
2011-09-08 02:43:52 +00:00
bool "Compile with ZRTP support (Requires libzrtpcpp NOT YET AVAILABLE)"
2011-08-30 00:22:55 +00:00
default n
2011-09-16 01:24:33 +00:00
#select PACKAGE_libzrtpcpp
2011-08-30 00:22:55 +00:00
help
2013-01-14 00:15:24 +00:00
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.
2011-07-15 19:03:13 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - e x a m p l e - c o n f i g
$( call Package /$ ( PKG_NAME ) /Default )
2010-06-27 13:36:16 +00:00
TITLE:= FreeSWITCH example config ( commented)
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2010-06-27 13:36:16 +00:00
e n d e f
2009-10-13 07:20:19 +00:00
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - e x a m p l e - c o n f i g / d e s c r i p t i o n
2010-06-27 13:36:16 +00:00
The default configuration included with FreeSWITCH. It is not intended to be
2011-05-18 12:32:00 +00:00
a final product, and is thus moved to /usr/share/$( PKG_NAME) /examples/conf to
2010-06-27 13:36:16 +00:00
be an example of how FreeSWITCH can be configured.
e n d e f
2010-04-13 10:23:46 +00:00
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - u p s t r e a m - d e f a u l t s
$( call Package /$ ( PKG_NAME ) /Default )
2010-06-27 13:36:34 +00:00
TITLE:= FreeSWITCH upstream config
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2010-06-27 13:36:34 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - u p s t r e a m - d e f a u l t s / d e s c r i p t i o n
2010-06-27 13:36:34 +00:00
The default configuration included with FreeSWITCH. It is not intended to be
2012-03-11 20:31:20 +00:00
a final product, and but is included for those who don' t want to use the
2010-06-27 13:36:34 +00:00
OpenWRT configuration and/or want to try things as prepared by upstream.
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - m i n i m a l
$( call Package /$ ( PKG_NAME ) /Default )
2011-08-08 02:20:17 +00:00
TITLE:= FreeSWITCH minimal config
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2010-06-27 13:36:34 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - m i n i m a l / d e s c r i p t i o n
2012-03-11 20:31:20 +00:00
A minimal configuration of FreeSWITCH for OpenWRT devices. Is what the UCI
2010-07-07 11:18:11 +00:00
configuration began with.
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o l l e c t i o n - u p s t r e a m - d e f a u l t s
$( call Package /$ ( PKG_NAME ) /Default )
2011-08-08 02:20:17 +00:00
TITLE:= FS upstream def sample conf
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME) \
+$( PKG_NAME) -config-upstream-defaults \
+$( PKG_NAME) -mod-callcenter \
+$( PKG_NAME) -mod-codec2 \
+$( PKG_NAME) -mod-commands \
+$( PKG_NAME) -mod-conference \
+$( PKG_NAME) -mod-curl \
+$( PKG_NAME) -mod-dialplan-xml \
2011-05-21 14:21:16 +00:00
+$( PKG_NAME) -mod-dingaling \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-dptools \
+$( PKG_NAME) -mod-event-socket \
+$( PKG_NAME) -mod-g723-1 \
2011-05-21 14:21:16 +00:00
+$( PKG_NAME) -mod-g729 \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-hash \
2011-10-10 17:12:26 +00:00
+$( PKG_NAME) -mod-http-cache \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-ilbc \
+$( PKG_NAME) -mod-local-stream \
+$( PKG_NAME) -mod-lua \
+$( PKG_NAME) -mod-native-file \
+$( PKG_NAME) -mod-sndfile \
+$( PKG_NAME) -mod-sofia \
2011-05-21 14:21:16 +00:00
+$( PKG_NAME) -mod-spandsp \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-speex \
2011-05-21 14:21:16 +00:00
+$( PKG_NAME) -mod-syslog \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-tone-stream \
+$( PKG_NAME) -mod-xml-curl \
+$( PKG_NAME) -mod-xml-rpc \
+$( PKG_NAME) -tools
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o l l e c t i o n - m i n i m a l
$( call Package /$ ( PKG_NAME ) /Default )
2011-08-08 02:20:17 +00:00
TITLE:= FreeSWITCH minimal package collection
2011-08-30 00:22:55 +00:00
DEFAULT:= y
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME) \
+$( PKG_NAME) -config-minimal \
+$( PKG_NAME) -mod-codec2 \
+$( PKG_NAME) -mod-commands \
+$( PKG_NAME) -mod-dialplan-xml \
+$( PKG_NAME) -mod-dptools \
+$( PKG_NAME) -mod-event-socket \
+$( PKG_NAME) -mod-hash \
+$( PKG_NAME) -mod-local-stream \
+$( PKG_NAME) -mod-sndfile \
+$( PKG_NAME) -mod-sofia \
2011-05-21 14:21:16 +00:00
+$( PKG_NAME) -mod-syslog \
2011-05-18 12:32:00 +00:00
+$( PKG_NAME) -mod-tone-stream \
+$( PKG_NAME) -tools
2010-07-07 11:18:11 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - s o u n d s - e n
$( call Package /$ ( PKG_NAME ) /Default )
2009-12-24 17:13:22 +00:00
TITLE:= FreeSWITCH english sounds
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2009-12-24 17:13:22 +00:00
e n d e f
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - s o u n d s - m o h
$( call Package /$ ( PKG_NAME ) /Default )
2009-12-24 17:13:22 +00:00
TITLE:= FreeSWITCH music-on-hold sounds
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2009-10-13 07:20:19 +00:00
e n d e f
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - t o o l s
$( call Package /$ ( PKG_NAME ) /Default )
2009-10-13 07:20:19 +00:00
TITLE:= FreeSWITCH control tools
2011-05-18 12:32:00 +00:00
DEPENDS:= $( PKG_NAME)
2009-10-13 07:20:19 +00:00
e n d e f
2009-10-07 16:17:09 +00:00
2009-12-24 17:13:22 +00:00
d e f i n e D o w n l o a d / f i l e s
2009-12-17 13:00:44 +00:00
define Download/$( 1)
FILE:= $( 2)
2011-07-15 19:03:13 +00:00
URL:= $( if $( 4) ,$( 4) ,http://files.$( PKG_NAME) .org) /$( 5)
2009-12-17 13:00:44 +00:00
MD5SUM:= $( 3)
endef
define Prepare/$( 1)
2011-07-15 19:03:13 +00:00
$( LN) $( DL_DIR) /$( 2) $( PKG_BUILD_DIR) /$( 6)
2009-12-17 13:00:44 +00:00
endef
$$ ( eval $$ ( call Download,$( 1) ) )
e n d e f
2011-08-08 02:20:17 +00:00
2009-12-24 17:13:22 +00:00
MAKE_INSTALL_TARGETS := install
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -mod -celt ) , )
2011-07-15 19:03:13 +00:00
$( eval $( call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,,downloads/libs/,libs/) )
2009-12-17 13:00:44 +00:00
e n d i f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -mod -curl ) , )
2011-07-15 19:03:13 +00:00
$( eval $( call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/) )
e n d i f
2011-08-08 02:20:17 +00:00
2011-07-15 19:03:13 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -mod -event -zmq ) , )
2012-03-11 20:31:20 +00:00
$( eval $( call Download/files,event-zmq,zeromq-2.1.9.tar.gz,94c5e0262a79c5f82bc0b178c1f8a33d,http://download.zeromq.org http://download.zeromq.org/historic,,libs/) )
2009-12-17 13:00:44 +00:00
e n d i f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -mod -flite ) , )
2013-01-07 14:25:52 +00:00
$( eval $( call Download/files,flite,flite-1.5.4-current.tar.bz2,f3a2d88b1059f6f4ff3c20a8169bc0f4,,downloads/libs/,libs/) )
2011-07-15 19:03:13 +00:00
e n d i f
2011-08-08 02:20:17 +00:00
2011-07-15 19:03:13 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -mod -opus ) , )
2013-01-07 22:01:34 +00:00
$( eval $( call Download/files,opus,opus-1.0.2.tar.gz,c503ad05a59ddb44deab96204401be03,,downloads/libs/,libs/) )
2009-12-24 17:13:22 +00:00
e n d i f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -sounds -en ) , )
2013-01-14 00:15:24 +00:00
$( eval $( call Download/files,sounds-en,$( PKG_NAME) -sounds-en-us-callie-8000-1.0.22.tar.gz,cff509d878708ce5e6e7fedac7f683ef,,,,) )
2009-12-24 17:13:22 +00:00
MAKE_INSTALL_TARGETS += sounds-install
e n d i f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
i f n e q ( $( CONFIG_PACKAGE_ $ ( PKG_NAME ) -sounds -moh ) , )
2013-01-14 00:15:24 +00:00
$( eval $( call Download/files,sounds-moh,$( PKG_NAME) -sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,,,) )
2009-12-24 17:13:22 +00:00
MAKE_INSTALL_TARGETS += moh-install
2009-12-17 13:00:44 +00:00
e n d i f
2011-08-08 02:20:17 +00:00
#
2010-08-08 20:53:30 +00:00
# XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
2011-08-08 02:20:17 +00:00
#
2010-08-08 20:53:30 +00:00
i f n e q ( $( CONFIG_avr 32) , )
TARGET_CFLAGS += -fgnu89-inline
TARGET_CXXFLAGS += -fgnu89-inline
e n d i f
2010-04-13 10:23:46 +00:00
2011-08-08 02:20:17 +00:00
2010-04-13 10:23:46 +00:00
i f n e q ( $( CONFIG_USE_EGLIBC ) , )
ifeq ( $( CONFIG_EGLIBC_OPTION_EGLIBC_UTMP) ,)
TARGET_CFLAGS += -DNO_GETLOGIN
endif
e n d i f
2009-12-17 13:00:44 +00:00
2011-07-15 19:03:13 +00:00
2010-08-08 20:53:30 +00:00
FS_TARGET_CFLAGS := ${ TARGET_CFLAGS } -DLUA_USE_LINUX $( FPIC) -std= gnu99 -Wno-format
FS_TARGET_CXXFLAGS := ${ TARGET_CXXFLAGS } -DLUA_USE_LINUX $( FPIC) -Wno-format
2011-08-30 00:22:55 +00:00
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 }
2010-08-08 20:53:30 +00:00
2011-05-21 14:21:16 +00:00
2009-10-07 16:17:09 +00:00
CONFIGURE_ARGS += \
2011-07-15 19:03:13 +00:00
--host= $( GNU_TARGET_NAME) \
--build= $( GNU_HOST_NAME) \
2011-05-18 12:32:00 +00:00
--prefix= " /usr/share/ $( PKG_NAME) " \
2009-10-13 07:20:19 +00:00
--bindir= "/usr/bin" \
--libdir= "/usr/lib" \
2011-07-15 19:03:13 +00:00
--srcdir= " $( PKG_BUILD_DIR) " \
2011-05-18 12:32:00 +00:00
--sysconfdir= " /etc/ $( PKG_NAME) " \
--with-modinstdir= " /usr/lib/ $( PKG_NAME) " \
2009-10-07 16:17:09 +00:00
--with-random= "/dev/urandom" \
2011-10-29 12:45:28 +00:00
$( if $( CONFIG_FS_SOFIA_WITH_MYSQL) ,--with-mysql,--without-mysql) \
2011-08-30 00:22:55 +00:00
$( call autoconf_bool,CONFIG_FS_SOFIA_WITH_IPV6,ipv6) \
$( call autoconf_bool,CONFIG_FS_SOFIA_WITH_OPT,optimization) \
2011-05-18 12:32:00 +00:00
$( if $( CONFIG_PACKAGE_$( PKG_NAME) -mod-celt) ,--with-ogg= " $( STAGING_DIR) /usr " ,--without-iogg) \
2011-05-21 14:21:16 +00:00
$( 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) \
2011-05-18 12:32:00 +00:00
$( if $( CONFIG_PACKAGE_$( PKG_NAME) -mod-java) ,--with-java= " $( STAGING_DIR) /usr " ,--without-java) \
2011-08-30 00:22:55 +00:00
$( call autoconf_bool,CONFIG_PACKAGE_$( PKG_NAME) -mod-spandsp,builtin-tiff) \
$( call autoconf_bool,CONFIG_FS_SOFIA_WITH_ZRTP_GIT,zrtp) \
$( call autoconf_bool,CONFIG_FS_SOFIA_WITH_ODBC,core-odbc-support) \
$( if $( CONFIG_FS_SOFIA_WITH_ODBC) ,--with-odbc= " $( STAGING_DIR) /usr " ) \
2011-10-29 12:45:28 +00:00
$( if $( CONFIG_FS_SOFIA_WITH_ODBC) ,--with-odbc-lib= " $( STAGING_DIR) /usr/lib " ) \
2011-05-21 14:21:16 +00:00
2009-10-07 16:17:09 +00:00
CONFIGURE_VARS += \
2013-01-07 14:25:52 +00:00
config_TARGET_CC = " $( TOOLCHAIN_DIR) /bin/ ${ TARGET_CC } " \
2010-04-13 10:23:46 +00:00
config_TARGET_CFLAGS = " ${ FS_TARGET_CPPFLAGS } ${ FS_TARGET_CFLAGS } " \
2013-01-07 14:25:52 +00:00
config_TARGET_CXX = " $( TOOLCHAIN_DIR) /bin/ ${ TARGET_CXX } " \
2010-04-13 10:23:46 +00:00
config_TARGET_CXXFLAGS = " ${ FS_TARGET_CPPFLAGS } ${ FS_TARGET_CXXFLAGS } " \
config_TARGET_CPPFLAGS = " ${ FS_TARGET_CPPFLAGS } " \
config_TARGET_READLINE_INC = " ${ FS_TARGET_CPPFLAGS } " \
config_TARGET_READLINE_LIBS = " ${ TARGET_LDFLAGS } -lreadline -lncurses " \
2013-01-07 14:25:52 +00:00
config_TARGET_LIBS = " ${ TARGET_LDFLAGS } -lpthread -ldl " \
2011-07-15 19:03:13 +00:00
config_BUILD_CC = " ${ HOSTCC } " \
config_BUILD_CFLAGS = " ${ HOST_CFLAGS } " \
2010-04-13 10:23:46 +00:00
CC_FOR_BUILD = " ${ HOSTCC } " \
2013-01-07 14:25:52 +00:00
BUILDTOOL_CC = " ${ HOSTCC } " \
BUILDTOOL_CCLD = " ${ HOSTCC } " \
2011-07-15 19:03:13 +00:00
LDFLAGS = " $$ $$ LDFLAGS " \
2010-04-13 10:23:46 +00:00
LDFLAGS_FOR_BUILD = " ${ HOST_LDFLAGS } " \
2013-01-07 14:25:52 +00:00
CC = " $( TOOLCHAIN_DIR) /bin/ ${ TARGET_CC } " \
CXX = " $( TOOLCHAIN_DIR) /bin/ ${ TARGET_CXX } " \
2010-04-13 10:23:46 +00:00
CFLAGS = " ${ FS_TARGET_CPPFLAGS } ${ FS_TARGET_CFLAGS } " \
CXXFLAGS = " ${ FS_TARGET_CPPFLAGS } ${ FS_TARGET_CXXFLAGS } " \
CPPFLAGS = " ${ FS_TARGET_CPPFLAGS } " \
LDFLAGS = " ${ TARGET_LDFLAGS } -Wl,-rpath-link=\" ${ STAGING_DIR } /usr/lib\" " \
2011-07-15 19:03:13 +00:00
PATH = " ${ PATH } : ${ STAGING_DIR } " \
HOST_CC = "/usr/bin/cc" \
HOST_CXX = "/usr/bin/g++" \
CROSS_COMPILE = "1" \
2013-01-14 00:15:24 +00:00
PKG_CONFIG = " $( STAGING_DIR_HOST) /bin/pkg-config " \
PKG_CONFIG_PATH = " $( STAGING_DIR_HOST) /lib/pkgconfig " \
2011-08-30 00:22:55 +00:00
ax_cv_c_compiler_vendor = "gnu" \
2009-11-24 06:49:38 +00:00
ac_cv_dev_urandom = "yes" \
2009-10-07 16:17:09 +00:00
ac_cv_file_dbd_apr_dbd_mysql_c = "no" \
2009-11-24 06:49:38 +00:00
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" \
2009-10-07 16:17:09 +00:00
apr_cv_process_shared_works = "no" \
apr_cv_tcp_nodelay_with_cork = "yes" \
2009-11-24 06:49:38 +00:00
apr_cv_type_rwlock_t = "yes" \
2011-08-30 00:22:55 +00:00
$( if $( CONFIG_PACKAGE_$( PKG_NAME) -mod-perl) ,ac_cv_path_PERL= "yes" ,) \
2011-07-15 19:03:13 +00:00
libzmq_cv_cxx_werror_flag = "" \
2009-10-07 16:17:09 +00:00
2010-04-13 10:23:46 +00:00
2009-12-17 13:00:44 +00:00
d e f i n e B u i l d / P r e p a r e
2011-05-18 12:32:00 +00:00
$( call Build/Prepare/Default)
2009-12-17 13:00:44 +00:00
$( call Prepare/celt)
2011-07-15 19:03:13 +00:00
$( call Prepare/event-zmq)
2009-12-17 13:00:44 +00:00
$( call Prepare/flite)
2011-07-15 19:03:13 +00:00
$( call Prepare/json-cdr)
$( call Prepare/opus)
2009-12-24 17:13:22 +00:00
$( call Prepare/sounds-en)
$( call Prepare/sounds-moh)
2009-12-17 13:00:44 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2009-10-07 16:17:09 +00:00
d e f i n e B u i l d / C o n f i g u r e
2013-01-07 14:25:52 +00:00
if [ -d $( PKG_BUILD_DIR) /libs/libcodec2/src ] ; then \
( cd $( PKG_BUILD_DIR) /libs/libcodec2/src; $( HOSTCC) -c generate_codebook.c; $( HOSTCC) -o generate_codebook generate_codebook.o -lm) \
fi
2011-07-15 19:03:13 +00:00
( cd $( PKG_BUILD_DIR) ; $( AM_TOOL_PATHS) ./bootstrap.sh)
2011-05-18 12:32:00 +00:00
$( call Build/Configure/Default,)
2009-10-13 07:20:19 +00:00
$( foreach m,$( FS_MOD_AVAILABLE) ,
2011-05-18 12:32:00 +00:00
$( if $( CONFIG_PACKAGE_$( PKG_NAME) -mod-$( m) ) ,
2009-10-13 07:20:19 +00:00
$( SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $( PKG_BUILD_DIR) /modules.conf
,
$( SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $( PKG_BUILD_DIR) /modules.conf
)
2009-10-07 16:17:09 +00:00
)
e n d e f
2011-08-08 02:20:17 +00:00
2009-10-07 16:17:09 +00:00
d e f i n e B u i l d / C o m p i l e
$( MAKE) -C $( PKG_BUILD_DIR) \
2013-01-07 14:25:52 +00:00
AR = " $( TOOLCHAIN_DIR) /bin/ $( TARGET_CROSS) ar " \
RANLIB = " $( TOOLCHAIN_DIR) /bin/ $( TARGET_CROSS) ranlib " \
CC = " $( TOOLCHAIN_DIR) /bin/ $( TARGET_CC) " \
CXX = " $( TOOLCHAIN_DIR) /bin/ $( TARGET_CXX) " \
2009-10-07 16:17:09 +00:00
DESTDIR = " $( PKG_INSTALL_DIR) " \
LDFLAGS_FOR_BUILD = " $( HOST_LDFLAGS) " \
2011-10-29 12:45:28 +00:00
all $( MAKE_INSTALL_TARGETS)
2011-05-18 12:32:00 +00:00
$( SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $( PKG_INSTALL_DIR) /etc/$( PKG_NAME) /autoload_configs/modules.conf.xml
$( SED) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $( PKG_INSTALL_DIR) /etc/$( PKG_NAME) /autoload_configs/modules.conf.xml
2009-10-07 16:17:09 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2009-10-13 07:20:19 +00:00
d e f i n e B u i l d / I n s t a l l D e v
2011-05-18 12:32:00 +00:00
$( INSTALL_DIR) $( 1) /usr/include/$( PKG_NAME)
2009-10-13 07:20:19 +00:00
$( INSTALL_DIR) $( 1) /usr/lib
2013-01-14 00:15:24 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/share/$( PKG_NAME) /include/* $( 1) /usr/include/$( PKG_NAME) /
2011-05-18 12:32:00 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/lib/lib$( PKG_NAME) .{ a,so*} $( 1) /usr/lib/
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) / i n s t a l l
2013-01-14 00:15:24 +00:00
$( INSTALL_DIR) $( 1) /etc/config
2009-10-21 14:58:32 +00:00
$( INSTALL_DIR) $( 1) /etc/default
2013-01-14 00:15:24 +00:00
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME) /scripts
$( INSTALL_DIR) $( 1) /etc/hotplug.d/iface
2009-10-21 14:58:32 +00:00
$( INSTALL_DIR) $( 1) /etc/init.d
2013-01-14 00:15:24 +00:00
$( INSTALL_DIR) $( 1) /usr/bin
$( INSTALL_DIR) $( 1) /usr/lib
$( INSTALL_DIR) $( 1) /usr/lib/pkgconfig
2011-05-18 12:32:00 +00:00
$( INSTALL_BIN) ./files/$( PKG_NAME) .init $( 1) /etc/init.d/$( PKG_NAME)
$( INSTALL_DATA) ./files/$( PKG_NAME) .config $( 1) /etc/config/$( PKG_NAME)
2013-01-14 00:15:24 +00:00
$( INSTALL_DATA) ./files/$( PKG_NAME) .default $( 1) /etc/default/$( PKG_NAME)
$( INSTALL_DATA) ./files/$( PKG_NAME) .hotplug $( 1) /etc/hotplug.d/iface/90-$( PKG_NAME)
$( CP) $( PKG_INSTALL_DIR) /usr/bin/$( PKG_NAME) $( 1) /usr/bin/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/lib$( PKG_NAME) * $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/pkgconfig/$( PKG_NAME) .pc $( 1) /usr/lib/pkgconfig/
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o l l e c t i o n - u p s t r e a m - d e f a u l t s / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - e x a m p l e - c o n f i g / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/share/$( PKG_NAME) /examples/conf
$( CP) $( PKG_INSTALL_DIR) /etc/$( PKG_NAME) /* $( 1) /usr/share/$( PKG_NAME) /examples/conf/
2010-06-27 13:36:16 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - u p s t r e a m - d e f a u l t s / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
$( CP) $( PKG_INSTALL_DIR) /etc/$( PKG_NAME) /* $( 1) /etc/$( PKG_NAME) /
2010-06-27 13:36:34 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o l l e c t i o n - m i n i m a l / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
2010-06-27 13:36:34 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o l l e c t i o n - u c i - m i n i m a l / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
2010-07-07 11:18:11 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - c o n f i g - m i n i m a l / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/$( PKG_NAME)
$( CP) ./files/etc.minimal/* $( 1) /etc/$( PKG_NAME) /
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - s o u n d s - e n / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/share/$( PKG_NAME) /sounds
$( CP) $( PKG_INSTALL_DIR) /usr/share/$( PKG_NAME) /sounds/en $( 1) /usr/share/$( PKG_NAME) /sounds/
2009-12-24 17:13:22 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - s o u n d s - m o h / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/share/$( PKG_NAME) /sounds
$( CP) $( PKG_INSTALL_DIR) /usr/share/$( PKG_NAME) /sounds/music $( 1) /usr/share/$( PKG_NAME) /sounds/
2009-12-24 17:13:22 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
d e f i n e P a c k a g e / $( PKG_NAME ) - t o o l s / i n s t a l l
2009-10-13 07:20:19 +00:00
$( INSTALL_DIR) $( 1) /usr/bin
$( CP) $( PKG_INSTALL_DIR) /usr/bin/fs_cli $( 1) /usr/bin/
2011-05-18 12:32:00 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/bin/fs_encode $( 1) /usr/bin/
$( CP) $( PKG_INSTALL_DIR) /usr/bin/fs_ivrd $( 1) /usr/bin/
2011-06-18 00:57:22 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/bin/fsxs $( 1) /usr/bin/
$( CP) $( PKG_INSTALL_DIR) /usr/bin/gentls_cert $( 1) /usr/bin/
2011-05-18 12:32:00 +00:00
$( CP) $( PKG_INSTALL_DIR) /usr/bin/tone2wav $( 1) /usr/bin/
2009-10-13 07:20:19 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
#
2009-10-13 07:20:19 +00:00
# 1. Name
# 2. Title
2013-01-14 00:15:24 +00:00
# 3. Package configuration files
# 4. Inter module depends
# 5. Extra depends
#
d e f i n e B u i l d L i b
define Package/$( PKG_NAME) -$( 1)
$$ ( call Package/$( PKG_NAME) /Default)
TITLE:= FS $( 2) library and pkgconfig files
DEPENDS:= $( PKG_NAME) $( foreach l,$( 4) ,+$( PKG_NAME) -$( l) ) $( 5)
endef
define Package/$( PKG_NAME) -$( 1) /install
[ -d " $$ (1)/usr/lib/pkgconfig " ] || $( INSTALL_DIR) $$ ( 1) /usr/lib/pkgconfig
$( CP) $( PKG_INSTALL_DIR) /usr/lib/pkgconfig/$( patsubst lib%,%,${ 3 } ) .pc $$ ( 1) /usr/lib/pkgconfig
$( CP) $( PKG_INSTALL_DIR) /usr/lib/${ 1 } * $$ ( 1) /usr/lib/
endef
$$ ( eval $$ ( call BuildPackage,$( PKG_NAME) -$( 1) ) )
e n d e f
#
# 1. Name
# 2. Title
# 3. Files (module files include different names)
# 4. Files (supporting files include different names)
# 5. Inter module depends
# 6. Extra depends
2011-08-08 02:20:17 +00:00
#
2009-10-13 07:20:19 +00:00
d e f i n e B u i l d P l u g i n
2011-05-18 12:32:00 +00:00
define Package/$( PKG_NAME) -mod-$( 1)
$$ ( call Package/$( PKG_NAME) /Default)
2010-04-16 00:40:05 +00:00
TITLE:= FS $( 2) module
2013-01-14 00:15:24 +00:00
DEPENDS:= $( PKG_NAME) $( foreach m,$( 5) ,+$( PKG_NAME) -mod-$( m) ) $( 6)
2009-10-13 07:20:19 +00:00
endef
2011-05-18 12:32:00 +00:00
define Package/$( PKG_NAME) -mod-$( 1) /install
2013-01-14 00:15:24 +00:00
[ -z " mod_ $( subst -,_,$( 1) ) " ] || $( INSTALL_DIR) $$ ( 1) /usr/lib/$( PKG_NAME)
for f in $$ $$ ( realpath $$ $$ ( wildcard $( PKG_INSTALL_DIR) /usr/lib/$( PKG_NAME) /mod_$( subst -,_,$( 1) ) .*) ) $$ $$ ( wildcard $( PKG_INSTALL_DIR) /usr/lib/$( PKG_NAME) /$( 3) _*) ; \
do \
$( CP) $$ $$ $$ $$ { f} $$ ( 1) /usr/lib/$( PKG_NAME) /; \
done
for f in $( 4) ; \
do \
[ -d " $( dirname $$ ( 1) /usr/ ${ f } ) " ] || $( INSTALL_DIR) $( dirname $$ ( 1) /usr/${ f } ) ; \
$( CP) $( PKG_INSTALL_DIR) /usr/${ f } $$ ( 1) /usr/${ f } ; \
2009-10-13 07:20:19 +00:00
done
2013-01-14 00:15:24 +00:00
#
# XML configuration files (vanilla)
#
if [ -f ${ PKG_BUILD_DIR } /conf/vanilla/autoload_configs/$( subst -,_,$( 1) ) .conf.xml ] ; then \
[ -d $$ ( 1) /etc/$( PKG_NAME) /autoload_configs ] || $( INSTALL_DIR) $$ ( 1) /etc/$( PKG_NAME) /autoload_configs ; \
$( CP) ${ PKG_BUILD_DIR } /conf/vanilla/autoload_configs/$( subst -,_,$( 1) ) .conf.xml $$ ( 1) /etc/$( PKG_NAME) /autoload_configs/ ; \
if [ -d " ./files/etc.packages/ $( 1) " ] ; then \
$( CP) ./files/etc.packages/$( 1) /* $$ ( 1) /etc/$( PKG_NAME) / ; \
fi \
fi
#
# For mod_YAML configuration files (vanilla)
#
if [ " mod_ $( subst -,_,$( 1) ) " = = "mod_yaml" ] && [ -d ${ PKG_BUILD_DIR } /conf/vanilla/yaml ] ; then \
[ -d $$ ( 1) /etc/$( PKG_NAME) /yaml ] || $( INSTALL_DIR) $$ ( 1) /etc/$( PKG_NAME) /yaml; \
$( CP) $( wildcard ${ PKG_BUILD_DIR } /conf/vanilla/yaml/*) $$ ( 1) /etc/$( PKG_NAME) /yaml; \
fi
#
# For mod_openzap
#
if [ " mod_ $( subst -,_,$( 1) ) " = = "mod_openzap" ] ; then \
[ -z " $$ (1)/etc/ $( PKG_NAME) /autoload_configs " ] || $( INSTALL_DIR) $$ ( 1) /etc/$( PKG_NAME) /autoload_configs ; \
$( CP) ${ PKG_INSTALL_DIR } /etc/$( PKG_NAME) /autoload_configs/$( 1) .conf.xml $$ ( 1) /etc/$( PKG_NAME) /autoload_configs ; \
2011-05-18 12:32:00 +00:00
fi
2010-08-22 05:06:49 +00:00
endef
2011-05-18 12:32:00 +00:00
define Package/$( PKG_NAME) -mod-$( 1) /postinst
2010-08-22 05:06:49 +00:00
#!/bin/sh
2011-05-18 12:32:00 +00:00
s e d - i - e 's|^\([ \t]*\)<!-- *\(.*\)"mod_$(subst -,_,$(1))"\(.*\) *-->\(.*\)$$$$|\1\2"mod_$(subst -,_,$(1))"\3\4|' $$ $$ { I P K G _ I N S T R O O T } / e t c / $( PKG_NAME ) / a u t o l o a d _ c o n f i g s / m o d u l e s . c o n f . x m l
2010-08-22 05:06:49 +00:00
endef
2011-05-18 12:32:00 +00:00
define Package/$( PKG_NAME) -mod-$( 1) /postrm
2010-08-22 05:06:49 +00:00
#!/bin/sh
2011-05-18 12:32:00 +00:00
s e d - i - e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$ $$ { I P K G _ I N S T R O O T } / e t c / $( PKG_NAME ) / a u t o l o a d _ c o n f i g s / m o d u l e s . c o n f . x m l
2009-10-13 07:20:19 +00:00
endef
2011-05-18 12:32:00 +00:00
$$ ( eval $$ ( call BuildPackage,$( PKG_NAME) -mod-$( 1) ) )
2009-10-07 16:17:09 +00:00
e n d e f
2011-08-08 02:20:17 +00:00
2011-05-18 12:32:00 +00:00
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -collection -upstream -defaults ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -collection -minimal ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -sounds -en ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -sounds -moh ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -tools ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -example -config ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -config -upstream -defaults ) )
$( eval $ ( call BuildPackage ,$ ( PKG_NAME ) -config -minimal ) )
2009-10-13 07:20:19 +00:00
2011-08-08 02:20:17 +00:00
#
2013-01-14 00:15:24 +00:00
# $(eval $(call BuildLib,Name,Title,Package Configuration Files,Inter Depends,Extra Depends))
2011-08-08 02:20:17 +00:00
#
2013-01-14 00:15:24 +00:00
$( eval $ ( call BuildLib ,libopenzap ,OpenZAP ,openzap ,,) )
2010-04-13 10:23:46 +00:00
2013-01-14 00:15:24 +00:00
#
# $(eval $(call BuildPlugin,Name,Title,Files,Inter Depends,Extra Depends))
#
$( eval $ ( call BuildPlugin ,abstraction ,An Abstraction To API Call ,,,,) )
$( eval $ ( call BuildPlugin ,alsa ,Alsa Endpoint ,,,,+alsa -lib ) )
$( eval $ ( call BuildPlugin ,amr ,Adaptive Multi -Rate On Bandwidth Codec ,,,,) )
$( eval $ ( call BuildPlugin ,amrwb ,Wide Band AMR ,,,,) )
$( eval $ ( call BuildPlugin ,avmd ,Advanced Voice Mail Detection ,,,,) )
$( eval $ ( call BuildPlugin ,blacklist ,Blacklist ,,,,) )
$( eval $ ( call BuildPlugin ,bv ,BroadVoice 16 and BroadVoice 32 Audio Codec ,,,,) )
$( eval $ ( call BuildPlugin ,callcenter ,Call Center ,,,,) )
$( eval $ ( call BuildPlugin ,cdr -csv ,CSV -CDR Handler ,,,,) )
$( eval $ ( call BuildPlugin ,cdr -pg -csv ,Postgress CDR Handler ,,,,+coreutils +libpq +postresql ) )
$( eval $ ( call BuildPlugin ,cdr -sqlite ,SQLite 3 CDR Handler ,,,,+libsqlite 3) )
$( eval $ ( call BuildPlugin ,celt ,CELT Ultra -Low Delay Codec ,,,,+libogg ) )
$( eval $ ( call BuildPlugin ,cepstral ,Cepstral Interface ,,,,@BROKEN ) ) # needs <swift.h>
$( eval $ ( call BuildPlugin ,cidlookup ,Data Query For CID ->NAME Services ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,cluechoo ,Framework Demo ,,,,) )
$( eval $ ( call BuildPlugin ,codec 2,CoDec 2,,,,) )
$( eval $ ( call BuildPlugin ,commands ,API Commands ,,,,) )
$( eval $ ( call BuildPlugin ,conference ,Conference Room ,,,,) )
$( eval $ ( call BuildPlugin ,console ,Console Logger ,,,,) )
$( eval $ ( call BuildPlugin ,curl ,HTTP Request ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,dahdi -codec ,DAHDI Codecs ,,,,) )
$( eval $ ( call BuildPlugin ,db ,Database Backend ,,,,) )
$( eval $ ( call BuildPlugin ,dialplan -asterisk ,Asterisk Dialplan Parser ,,,,) )
$( eval $ ( call BuildPlugin ,dialplan -directory ,Dialplan Directory ,,,,) )
$( eval $ ( call BuildPlugin ,dialplan -xml ,Dialplan -XML Interface ,,,,) )
$( eval $ ( call BuildPlugin ,dingaling ,Jabber Interface ,,,,+libgcrypt +libopenssl ) )
$( eval $ ( call BuildPlugin ,directory ,Search By Name Directory IVR ,,,,) )
$( eval $ ( call BuildPlugin ,distributor ,Simple Robin -Round Load to Gateway ,,,,) )
$( eval $ ( call BuildPlugin ,dptools ,Dialplan Tools ,,,,) )
$( eval $ ( call BuildPlugin ,easyroute ,Simple DID Routing ,,,,) )
$( eval $ ( call BuildPlugin ,enum ,ENUM Routing ,,,,) )
$( eval $ ( call BuildPlugin ,erlang -event ,Erlang Event Handler ,,,,+erlang ) )
$( eval $ ( call BuildPlugin ,esf ,Extra SIP Functionality ,,,,) )
$( eval $ ( call BuildPlugin ,event -multicast ,Multicast Event Handler ,,,,) )
$( eval $ ( call BuildPlugin ,event -socket ,Socket Event Handler ,,,,) )
$( eval $ ( call BuildPlugin ,event -zmq ,Socket Event Handler By Zero MQ ,,,,+libuuid ) )
$( eval $ ( call BuildPlugin ,expr ,Expression Evaluation ,,,,) )
$( eval $ ( call BuildPlugin ,fifo ,FIFO ,,,,) )
$( eval $ ( call BuildPlugin ,file -string ,Streaming Multiple Sound Files Sequentially ,,,,@OBSOLETE ) ) # merged into dptools
$( eval $ ( call BuildPlugin ,flite ,Festival TTS ,,,,@( !( armeb ||avr 32) ||BROKEN ) ) )
$( eval $ ( call BuildPlugin ,fsk ,Bell -202 1200-baud FSK decoder ,,,,) )
$( eval $ ( call BuildPlugin ,fsv ,Video Player / Recorder ,,,,) )
$( eval $ ( call BuildPlugin ,g 723-1,G .723.1 Codec ,,,,) )
$( eval $ ( call BuildPlugin ,g 729,G .729 Codec ,,,,) )
$( eval $ ( call BuildPlugin ,gsmopen ,GSM Modem compatible Endpoint ,,,,+alsa -lib @BROKEN ) ) # needs gsmlib
$( eval $ ( call BuildPlugin ,h 26x ,H 26X Linear Codec ,,,,) )
$( eval $ ( call BuildPlugin ,h 323,H 323 Endpoint ,,,,@BROKEN ) ) # Req. H323Plus v1.24.x or newer
$( eval $ ( call BuildPlugin ,hash ,API For Manipulating A Hash Table ,,,,) )
$( eval $ ( call BuildPlugin ,html 5,HTML 5 Endpoint Module ,,,,) )
$( eval $ ( call BuildPlugin ,httapi ,HT Telephony API And HTTP Caching ,,,,) )
$( eval $ ( call BuildPlugin ,http -cache ,HTTP GET With Caching ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,ilbc ,ILBC Codec ,,,,) )
$( eval $ ( call BuildPlugin ,isac ,iSAC Codec ,,,,) )
$( eval $ ( call BuildPlugin ,java ,Java Language Interface ,,,,@BROKEN ) ) # needs java
$( eval $ ( call BuildPlugin ,json -cdr ,JSon -CDR Interface ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,lcr ,Least Cost Routing ,,,,) )
$( eval $ ( call BuildPlugin ,local -stream ,Multi -Channel On Same Stream ,,,,) )
$( eval $ ( call BuildPlugin ,logfile ,File Logger ,,,,) )
$( eval $ ( call BuildPlugin ,loopback ,Loopback to Dialplan Endpoint ,,,,) )
$( eval $ ( call BuildPlugin ,lua ,LUA Language Interface ,,,,) )
$( eval $ ( call BuildPlugin ,managed ,Media Switching Software Library ,,,,+glib 2 @BROKEN ) ) # needs Mono
$( eval $ ( call BuildPlugin ,mp 4,MP 4 File Format support for video apps ,,,,@BROKEN ) ) # needs libmp4v2
$( eval $ ( call BuildPlugin ,mp 4v ,MP 4 CoDec Support For Video ,,,,) )
$( eval $ ( call BuildPlugin ,native -file ,WAV Format Sound Player ,,,,) )
$( eval $ ( call BuildPlugin ,nibblebill ,Credit / Debit Billing ,,,,) )
$( eval $ ( call BuildPlugin ,oreka ,Media Recording with Oreka ,,,,) )
$( eval $ ( call BuildPlugin ,openzap ,Zaptel ( Superseded by FreeTDM ) ,ozmod ,,,+$ ( PKG_NAME ) -libopenzap +libpcap ) )
$( eval $ ( call BuildPlugin ,opus ,Opus CoDec ,,,,) )
$( eval $ ( call BuildPlugin ,portaudio ,Portaudio To Sound Card Interface ,,,,+alsa -lib ) )
$( eval $ ( call BuildPlugin ,portaudio -stream ,Portaudio Streaming Interface ,,,,+alsa -lib ) )
$( eval $ ( call BuildPlugin ,posix -timer ,POSIX Compliant Soft Timer ,,,,) )
$( eval $ ( call BuildPlugin ,radius -cdr ,Radius -CDR interface ,,,,+freeradius 2 @BROKEN ) ) # fails in freeradius-client
$( eval $ ( call BuildPlugin ,redis ,Redis Limited Backend ,,,,) )
$( eval $ ( call BuildPlugin ,rss ,RRS Feeds via TTS ,,,,) )
$( eval $ ( call BuildPlugin ,rtmp ,RTMP Protocol Handler ,,,,) )
$( eval $ ( call BuildPlugin ,sangoma -codec ,codec sangoma -codec ,,,,@BROKEN ) ) # Req. Sangoma CoDec source
$( eval $ ( call BuildPlugin ,say -de ,German Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -en ,English Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -es ,Spanish Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -fa ,Persian Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -fr ,French Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -hu ,Hungarian Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -it ,Italian Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -nl ,Dutch Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -pt ,Portugeese Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -ru ,Russian Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -th ,Thai Say ,,,,) )
$( eval $ ( call BuildPlugin ,say -zh ,Chineese Say ,,,,) )
$( eval $ ( call BuildPlugin ,shell -stream ,Streaming Audio Through CLI ,,,,) )
$( eval $ ( call BuildPlugin ,silk ,Skype ( TM ) SILK Codec Module ,,,,) )
$( eval $ ( call BuildPlugin ,siren ,G .722.1 Codec ,,,,) )
$( eval $ ( call BuildPlugin ,skel ,Template For New Module ,,,,) )
$( eval $ ( call BuildPlugin ,skinny ,Skinny Call Control Protocol ( SCCP ) ,,,,) )
$( eval $ ( call BuildPlugin ,skypopen ,Skype Compatible Endpoint ,,,,@FEATURE_drawing -backend_libX 11) )
$( eval $ ( call BuildPlugin ,sms ,SMS ,,,,) )
$( eval $ ( call BuildPlugin ,snapshot ,Record Audio Snapshot to File ,,,,) )
$( eval $ ( call BuildPlugin ,sndfile ,Multi -Format Sound File ,,,,) )
$( eval $ ( call BuildPlugin ,snipe -hunt ,Snipe Hunt ( Simple Example Module ) ,,,,) )
$( eval $ ( call BuildPlugin ,snmp ,SNMP AgentX Subagent ,,,,+libnetsnmp ) )
$( eval $ ( call BuildPlugin ,snom ,SNOM specific features ,,,,) )
$( eval $ ( call BuildPlugin ,sofia ,SOFIA SIP ,,,,) )
$( eval $ ( call BuildPlugin ,sonar ,Sonar Ping Timer ,,,,) )
$( eval $ ( call BuildPlugin ,spandsp ,Span DSP ,,,,+libjpeg ) )
$( eval $ ( call BuildPlugin ,speex ,Speex codec ,,,,) )
$( eval $ ( call BuildPlugin ,spidermonkey ,JavaScript ,,,,@BROKEN ) ) # fails in js
$( eval $ ( call BuildPlugin ,spidermonkey -core_db ,JavaScript DB ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,spidermonkey -curl ,JavaScript Curl ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,spidermonkey -odbc ,JavaScript ODBC ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,spidermonkey -socket ,JavaScript socket ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,spidermonkey -teletone ,JavaScript teletone ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,spy ,User Spy ,,,,) )
$( eval $ ( call BuildPlugin ,stress ,Voice Stress Detection ,,,,) )
$( eval $ ( call BuildPlugin ,syslog ,SysLog logger ,,,,) )
$( eval $ ( call BuildPlugin ,tone -stream ,Tone Generation Stream ,,,,) )
$( eval $ ( call BuildPlugin ,tts -commandline ,ASR TTS Command Interface ,,,,) )
$( eval $ ( call BuildPlugin ,unimrcp ,UniMRCP ( MRCP client ) ,,,,@BROKEN ) )
$( eval $ ( call BuildPlugin ,valet -parking ,Valet Parking Application ,,,,) )
$( eval $ ( call BuildPlugin ,vmd ,VoiceMail Beep Detection ,,,,) )
$( eval $ ( call BuildPlugin ,voicemail ,VoiceMail ,,,,) )
$( eval $ ( call BuildPlugin ,voicemail -ivr ,VoiceMail IVR ,,,,) )
$( eval $ ( call BuildPlugin ,xml -cdr ,XML -CDR Handler ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,xml -curl ,XML -Curl Gateway ,,,,+libcurl ) )
$( eval $ ( call BuildPlugin ,xml -rpc ,XML -RPC Interface ,,,,) )
$( eval $ ( call BuildPlugin ,xml -scgi ,SCGI XML Gateway ,,,,) )
$( eval $ ( call BuildPlugin ,yaml ,YAML langunage ,,,,) )