Last active
December 10, 2015 00:39
-
-
Save mbrevda/4352611 to your computer and use it in GitHub Desktop.
Asterisk 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Asterisk < Formula | |
homepage 'http://asterisk.org' | |
url 'http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-10.11.0.tar.gz' | |
sha1 'a678774bd6cb90fb4cefe115eb91a30228410288' | |
env :std | |
fails_with :clang | |
def options | |
[['--with-samples', "Install the sample config files. NOTE. Without this, you won't have any config files."]] | |
end | |
def install | |
ENV['CC'] = 'gcc' | |
ENV['CXX'] = 'g++' | |
ENV['CXXFLAGS'] = '' | |
ENV['CFLAGS'] = '' | |
ENV['LDFLAGS'] = '' | |
ENV['CPPFLAGS'] = '' | |
system "./configure", | |
"--prefix=#{prefix}", | |
"--without-netsnmp", | |
"--with-ssl=/usr/local/opt/openssl/" | |
inreplace 'Makefile.rules', '-O6', '-Os' | |
system "make" | |
system "make install" | |
system "make samples" if ARGV.include? '--with-sample-config' | |
end | |
def test | |
system asterisk | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment