Skip to content

Instantly share code, notes, and snippets.

@mbrevda
Last active December 10, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbrevda/4352611 to your computer and use it in GitHub Desktop.
Save mbrevda/4352611 to your computer and use it in GitHub Desktop.
Asterisk 10
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