2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-08 21:49:23 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Asterisk < Formula
|
2011-04-04 10:44:57 +00:00
|
|
|
url 'http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.3.2.tar.gz'
|
2009-10-08 21:49:23 +00:00
|
|
|
homepage 'http://www.asterisk.org/'
|
2011-04-04 10:44:57 +00:00
|
|
|
md5 '0bee03f4498a6081146a579b51130633'
|
2009-10-08 21:49:23 +00:00
|
|
|
|
2011-04-02 16:33:22 +00:00
|
|
|
skip_clean :all # Or modules won't load
|
|
|
|
|
2011-04-04 10:44:57 +00:00
|
|
|
def options
|
|
|
|
[['--with-sample-config', "Install the sample config files. NOTE. Without this, you won't have any config file."]]
|
|
|
|
end
|
2009-10-08 21:49:23 +00:00
|
|
|
|
|
|
|
def install
|
2011-04-04 10:44:57 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--localstatedir=#{var}", "--sysconfdir=#{etc}"
|
2009-10-08 21:49:23 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2011-04-04 10:44:57 +00:00
|
|
|
system "make samples" if ARGV.include? '--with-sample-config'
|
2009-10-08 21:49:23 +00:00
|
|
|
end
|
|
|
|
end
|