2014-08-26 18:03:16 +00:00
|
|
|
class Freeswitch < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Telephony platform to route various communication protocols"
|
2015-06-01 00:53:09 +00:00
|
|
|
homepage "https://freeswitch.org"
|
|
|
|
url "https://freeswitch.org/stash/scm/fs/freeswitch.git",
|
|
|
|
:tag => "v1.4.19",
|
|
|
|
:revision => "ebf2df68fa6f341311620c6d90f5a8d77334606c"
|
|
|
|
|
|
|
|
head "https://freeswitch.org/stash/scm/fs/freeswitch.git"
|
2014-08-26 18:03:16 +00:00
|
|
|
|
2014-08-26 19:31:03 +00:00
|
|
|
bottle do
|
2015-06-01 23:25:07 +00:00
|
|
|
sha256 "724b0f3f85c5dde65923d7b64b396addccd898a9b0f8977a422e0518a2a62d94" => :yosemite
|
|
|
|
sha256 "f91222c325a6f65da9873559b61912095e23f7bcee0dec1079170b139696e7d2" => :mavericks
|
|
|
|
sha256 "5a3cbf979034485152c4412980d62516e12bb6b0a5e52e7c71f636368960ef0d" => :mountain_lion
|
2014-08-26 19:31:03 +00:00
|
|
|
end
|
|
|
|
|
2014-12-04 17:01:21 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2014-12-17 14:53:55 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on :apr => :build
|
2014-08-26 18:03:16 +00:00
|
|
|
|
2014-12-17 14:53:55 +00:00
|
|
|
depends_on "jpeg"
|
|
|
|
depends_on "curl"
|
|
|
|
depends_on "openssl"
|
|
|
|
depends_on "pcre"
|
|
|
|
depends_on "speex"
|
|
|
|
depends_on "sqlite"
|
2014-08-26 18:03:16 +00:00
|
|
|
|
|
|
|
def install
|
2015-01-20 10:15:00 +00:00
|
|
|
system "./bootstrap.sh", "-j#{ENV.make_jobs}"
|
2014-08-26 18:03:16 +00:00
|
|
|
|
|
|
|
# tiff will fail to find OpenGL unless told not to use X
|
|
|
|
inreplace "libs/tiff-4.0.2/configure.gnu", "--with-pic", "--with-pic --without-x"
|
|
|
|
# mod_enum requires libldns-dev which doesn't seem to exist in brew
|
|
|
|
inreplace "modules.conf", "applications/mod_enum", "#applications/mod_enum"
|
|
|
|
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--enable-shared",
|
|
|
|
"--enable-static",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--exec_prefix=#{prefix}"
|
|
|
|
|
|
|
|
system "make"
|
2015-01-20 10:15:00 +00:00
|
|
|
system "make", "install", "all", "cd-sounds-install", "cd-moh-install"
|
2014-08-26 18:03:16 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
plist_options :manual => "freeswitch -nc --nonat"
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{bin}/freeswitch</string>
|
|
|
|
<string>-nc</string>
|
|
|
|
<string>-nonat</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>ServiceIPC</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/freeswitch", "-version"
|
|
|
|
end
|
|
|
|
end
|