aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMisty De Meo2014-08-26 11:03:16 -0700
committerMisty De Meo2014-08-26 14:48:06 -0700
commit41ffff4b6325885e166d27c9cbf20e76cf6b7ab9 (patch)
treede99408d8680835e9e47e2789829adc82836f8da /Library/Formula
parent19f4c03661b381ea95db8c32e412d4b280ed5b1e (diff)
downloadhomebrew-41ffff4b6325885e166d27c9cbf20e76cf6b7ab9.tar.bz2
freeswitch 1.4.6
Closes #30477.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/freeswitch.rb69
1 files changed, 69 insertions, 0 deletions
diff --git a/Library/Formula/freeswitch.rb b/Library/Formula/freeswitch.rb
new file mode 100644
index 000000000..9cb5cf500
--- /dev/null
+++ b/Library/Formula/freeswitch.rb
@@ -0,0 +1,69 @@
+require 'formula'
+
+class Freeswitch < Formula
+ homepage 'http://freeswitch.org'
+ url 'https://stash.freeswitch.org/scm/fs/freeswitch.git', :tag => 'v1.4.6'
+
+ head 'https://stash.freeswitch.org/scm/fs/freeswitch.git'
+
+ depends_on :autoconf
+ depends_on :automake
+ depends_on :libtool
+ depends_on 'pkg-config' => :build
+
+ depends_on 'jpeg'
+ depends_on 'curl'
+ depends_on 'openssl'
+ depends_on 'pcre'
+ depends_on 'speex'
+ depends_on 'sqlite'
+
+ def install
+ system "./bootstrap.sh -j#{ENV.make_jobs}"
+
+ # 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"
+ system "make install"
+ system "make all cd-sounds-install cd-moh-install"
+ 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