2012-02-28 23:38:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Freeswitch < Formula
|
|
|
|
homepage 'http://freeswitch.org'
|
2012-08-10 19:53:34 +00:00
|
|
|
url 'git://git.freeswitch.org/freeswitch.git', :tag => 'v1.2.0'
|
|
|
|
version '1.2.0'
|
2012-02-28 23:38:05 +00:00
|
|
|
|
|
|
|
head 'git://git.freeswitch.org/freeswitch.git'
|
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :autoconf
|
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
|
|
|
|
2012-02-28 23:38:05 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
|
|
|
depends_on 'jpeg'
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./bootstrap.sh -j#{ENV.make_jobs}"
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--enable-shared",
|
|
|
|
"--enable-static",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--exec_prefix=#{prefix}"
|
|
|
|
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
2012-08-10 19:53:34 +00:00
|
|
|
system "make all cd-sounds-install cd-moh-install"
|
2012-02-28 23:38:05 +00:00
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
plist_options :manual => "freeswitch -nc --nonat"
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
2012-02-28 23:38:05 +00:00
|
|
|
<?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
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/freeswitch", "-version"
|
|
|
|
end
|
|
|
|
end
|