2012-09-11 12:37:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Inspircd < Formula
|
|
|
|
homepage 'http://inspircd.github.com'
|
2012-12-17 03:41:27 +00:00
|
|
|
url 'https://github.com/inspircd/inspircd/archive/v2.0.10.tar.gz'
|
|
|
|
sha1 '9b88b9b58e3e765604c938d1c2ae2c2ab8403d24'
|
2012-09-11 12:37:05 +00:00
|
|
|
|
|
|
|
head 'https://github.com/inspircd/inspircd.git', :branch => 'insp20'
|
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
2013-01-26 23:21:48 +00:00
|
|
|
depends_on 'gnutls' => :recommended
|
|
|
|
depends_on 'libgcrypt' unless build.without? 'gnutls'
|
|
|
|
depends_on 'openssl' => :optional
|
|
|
|
depends_on 'pcre' => :optional
|
|
|
|
depends_on 'tre' => :optional
|
2012-09-11 12:37:05 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
modules = []
|
2013-01-26 23:21:48 +00:00
|
|
|
modules << 'm_ssl_gnutls.cpp' unless build.without? 'gnutls'
|
|
|
|
modules << 'm_ssl_openssl.cpp' if build.with? 'openssl'
|
|
|
|
modules << 'm_regex_pcre.cpp' if build.with? 'pcre'
|
|
|
|
modules << 'm_regex_tre.cpp' if build.with? 'tre'
|
2012-09-11 12:37:05 +00:00
|
|
|
|
|
|
|
system './configure', "--enable-extras=#{modules.join(',')}" unless modules.empty?
|
|
|
|
system './configure', "--prefix=#{prefix}", "--with-cc=#{ENV.cc}"
|
|
|
|
system 'make install'
|
|
|
|
|
|
|
|
inreplace "#{prefix}/org.inspircd.plist", 'ircdaemon', ENV['USER']
|
|
|
|
end
|
|
|
|
end
|