2012-09-11 12:37:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Inspircd < Formula
|
|
|
|
homepage 'http://inspircd.github.com'
|
2013-08-28 20:51:25 +00:00
|
|
|
url 'https://github.com/inspircd/inspircd/archive/v2.0.14.tar.gz'
|
|
|
|
sha1 'b8b29fef06579ca624027a26a989cdea90a290a8'
|
2012-09-11 12:37:05 +00:00
|
|
|
|
2013-04-01 10:01:19 +00:00
|
|
|
head 'https://github.com/inspircd/inspircd.git', :branch => 'master'
|
2012-09-11 12:37:05 +00:00
|
|
|
|
2013-02-16 13:56:45 +00:00
|
|
|
skip_clean 'data'
|
|
|
|
skip_clean 'logs'
|
|
|
|
|
2012-09-11 12:37:05 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-02-16 13:56:45 +00:00
|
|
|
depends_on 'geoip' => :optional
|
|
|
|
depends_on 'gnutls' => :optional
|
|
|
|
depends_on 'libgcrypt' if build.with? 'gnutls'
|
|
|
|
depends_on :mysql => :optional
|
2013-01-26 23:21:48 +00:00
|
|
|
depends_on 'pcre' => :optional
|
2013-02-16 13:56:45 +00:00
|
|
|
depends_on 'sqlite' => :optional
|
2013-01-26 23:21:48 +00:00
|
|
|
depends_on 'tre' => :optional
|
2012-09-11 12:37:05 +00:00
|
|
|
|
2013-02-16 13:56:45 +00:00
|
|
|
option 'without-ldap', 'Build without ldap support'
|
|
|
|
option 'without-openssl', 'Build without openssl support'
|
|
|
|
option 'without-postgres', 'Build without postgres support'
|
|
|
|
|
2012-09-11 12:37:05 +00:00
|
|
|
def install
|
|
|
|
modules = []
|
2013-02-16 13:56:45 +00:00
|
|
|
modules << 'm_geoip.cpp' if build.with? 'geoip'
|
|
|
|
modules << 'm_ssl_gnutls.cpp' if build.with? 'gnutls'
|
|
|
|
modules << 'm_mysql.cpp' if build.with? 'mysql'
|
|
|
|
modules << 'm_ssl_openssl.cpp' unless build.without? 'openssl'
|
|
|
|
modules << 'm_ldapauth.cpp' unless build.without? 'ldap'
|
|
|
|
modules << 'm_ldapoper.cpp' unless build.without? 'ldap'
|
2013-01-26 23:21:48 +00:00
|
|
|
modules << 'm_regex_pcre.cpp' if build.with? 'pcre'
|
2013-02-16 13:56:45 +00:00
|
|
|
modules << 'm_ssl_pgsql.cpp' unless build.without? 'postgres'
|
|
|
|
modules << 'm_sqlite3.cpp' if build.with? 'sqlite'
|
2013-01-26 23:21:48 +00:00
|
|
|
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
|