aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorPeter Powell2012-09-11 13:37:05 +0100
committerAdam Vandenberg2012-10-02 19:56:03 -0700
commit14c66925474360b525fab6faa8eb0dacf0bfa9ba (patch)
treeb78717ed0e5845a1509bdaf5ff20918a78cf4fb4 /Library/Formula
parentf2345bd43e907ee521f7a28b3bccf9338e04eac9 (diff)
downloadhomebrew-14c66925474360b525fab6faa8eb0dacf0bfa9ba.tar.bz2
InspIRCd 2.0.8
Closes #14854. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/inspircd.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Formula/inspircd.rb b/Library/Formula/inspircd.rb
new file mode 100644
index 000000000..177d3881f
--- /dev/null
+++ b/Library/Formula/inspircd.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Inspircd < Formula
+ homepage 'http://inspircd.github.com'
+ url 'https://github.com/downloads/inspircd/inspircd/InspIRCd-2.0.8.tar.bz2'
+ sha1 'c8bcbc222df40bc8110cefdb4a1fee91ad7c73d1'
+
+ head 'https://github.com/inspircd/inspircd.git', :branch => 'insp20'
+
+ option 'without-gnutls', 'Disable the GnuTLS module'
+ option 'with-openssl', 'Enable the OpenSSL module'
+ option 'with-pcre', 'Enable the PCRE module'
+ option 'with-tre', 'Enable the TRE module'
+
+ depends_on 'pkg-config' => :build
+ depends_on 'gnutls' unless build.include? 'without-gnutls'
+ depends_on 'openssl' if build.include? 'with-openssl'
+ depends_on 'pcre' if build.include? 'with-pcre'
+ depends_on 'tre' if build.include? 'with-tre'
+
+ def install
+ modules = []
+ modules << 'm_ssl_gnutls.cpp' unless build.include? 'without-gnutls'
+ modules << 'm_ssl_openssl.cpp' if build.include? 'with-openssl'
+ modules << 'm_regex_pcre.cpp' if build.include? 'with-pcre'
+ modules << 'm_regex_tre.cpp' if build.include? 'with-tre'
+
+ 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