2012-09-11 12:37:05 +00:00
|
|
|
class Inspircd < Formula
|
2015-06-02 15:53:34 +00:00
|
|
|
desc "Modular C++ Internet Relay Chat daemon"
|
2014-12-29 17:05:17 +00:00
|
|
|
homepage "http://www.inspircd.org"
|
2015-05-13 14:01:03 +00:00
|
|
|
url "https://github.com/inspircd/inspircd/archive/v2.0.20.tar.gz"
|
|
|
|
sha256 "5156e2da5da4cfa377705ecd633aee41cdcd785d12627497d55cab5f70dd686f"
|
2014-12-29 17:05:17 +00:00
|
|
|
head "https://github.com/inspircd/inspircd.git"
|
2012-09-11 12:37:05 +00:00
|
|
|
|
2014-07-25 09:24:19 +00:00
|
|
|
bottle do
|
2015-08-18 20:19:24 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "b224270f471897506b1ec091fbe9470392416d0e08ad59aadb2a4ca678c9831f" => :yosemite
|
|
|
|
sha256 "56a85222822adba5ce3fb86c8873963b4b5b70435985cc7fc7956afa25d5c78d" => :mavericks
|
|
|
|
sha256 "142864c79850cb4a7a1a46e85e5d1ba087de67e938801585e1bd254f21da70d5" => :mountain_lion
|
2014-07-25 09:24:19 +00:00
|
|
|
end
|
|
|
|
|
2014-12-29 17:05:17 +00:00
|
|
|
skip_clean "data"
|
|
|
|
skip_clean "logs"
|
2013-02-16 13:56:45 +00:00
|
|
|
|
2015-08-18 17:06:02 +00:00
|
|
|
option "without-ldap", "Build without ldap support"
|
|
|
|
|
2014-12-29 17:05:17 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "geoip" => :optional
|
|
|
|
depends_on "gnutls" => :optional
|
2013-02-16 13:56:45 +00:00
|
|
|
depends_on :mysql => :optional
|
2014-12-29 17:05:17 +00:00
|
|
|
depends_on "openssl" => :optional
|
|
|
|
depends_on "pcre" => :optional
|
|
|
|
depends_on "postgresql" => :optional
|
|
|
|
depends_on "sqlite" => :optional
|
|
|
|
depends_on "tre" => :optional
|
2012-09-11 12:37:05 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
modules = []
|
2014-12-29 17:05:17 +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" if build.with? "openssl"
|
2015-08-18 17:06:02 +00:00
|
|
|
modules << "m_ldapauth.cpp" << "m_ldapoper.cpp" if build.with? "ldap"
|
2014-12-29 17:05:17 +00:00
|
|
|
modules << "m_regex_pcre.cpp" if build.with? "pcre"
|
|
|
|
modules << "m_pgsql.cpp" if build.with? "postgresql"
|
|
|
|
modules << "m_sqlite3.cpp" if build.with? "sqlite"
|
|
|
|
modules << "m_regex_tre.cpp" if build.with? "tre"
|
|
|
|
|
|
|
|
system "./configure", "--enable-extras=#{modules.join(",")}" unless modules.empty?
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--with-cc=#{ENV.cc}"
|
|
|
|
system "make", "install"
|
2015-08-18 12:45:41 +00:00
|
|
|
end
|
2014-12-29 17:05:17 +00:00
|
|
|
|
2015-08-18 12:45:41 +00:00
|
|
|
def post_install
|
2014-12-29 17:05:17 +00:00
|
|
|
inreplace "#{prefix}/org.inspircd.plist", "ircdaemon", ENV["USER"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/inspircd", "--version"
|
2012-09-11 12:37:05 +00:00
|
|
|
end
|
|
|
|
end
|