ejabberd 14.05

Update to latest stable release, add options for brewed libraries, fix
compilation by bypassing ENV.cc.
This commit is contained in:
David Christenson 2014-05-16 02:34:48 -06:00 committed by Mike McQuaid
parent f3e707d593
commit b6748275cd

View file

@ -2,9 +2,10 @@ require "formula"
class Ejabberd < Formula
homepage "http://www.ejabberd.im"
url "http://www.process-one.net/downloads/ejabberd/13.12/ejabberd-13.12.tgz"
sha1 "3aedb5012fab49181961ff24bad3af581f4b30ee"
revision 1
url "https://www.process-one.net/downloads/ejabberd/14.05/ejabberd-14.05.tgz"
sha1 "bad6b91ca6b9ac30ffe8b2eb0c5bb759d7742fab"
head 'https://github.com/processone/ejabberd.git'
bottle do
sha1 "0951237f1710e8c3de1c8c68501f53532036d726" => :mavericks
@ -12,19 +13,20 @@ class Ejabberd < Formula
sha1 "582da64c98ce8be147cfd17f2d464e5806d849e3" => :lion
end
option "32-bit"
depends_on "openssl"
depends_on "erlang"
depends_on "libyaml"
option "32-bit"
option "with-odbc", "Build with ODBC support"
option "with-pgsql", "Build with PostgreSQL support"
option "with-mysql", "Build with MySQL support"
# for CAPTCHA challenges
depends_on "imagemagick" => :optional
def install
ENV["TARGET_DIR"] = ENV["DESTDIR"] = "#{lib}/ejabberd/erlang/lib/ejabberd-#{version}"
ENV["MAN_DIR"] = man
ENV["SBIN_DIR"] = sbin
# Homebrew's 'C compiler cannot create executables' bug workaround
ENV["HOMEBREW_ARCHFLAGS"] = " "
if build.build_32_bit?
%w{ CFLAGS LDFLAGS }.each do |compiler_flag|
@ -35,11 +37,11 @@ class Ejabberd < Formula
args = ["--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--localstatedir=#{var}"]
args << "--enable-odbc" if build.with? "odbc"
args << "--enable-pgsql" if build.with? "pgsql"
args << "--enable-mysql" if build.with? "mysql"
"--localstatedir=#{var}",
"--enable-pgsql",
"--enable-mysql",
"--enable-odbc",
"--enable-pam"]
system "./configure", *args
system "make"
@ -56,4 +58,26 @@ class Ejabberd < Formula
after 'localhost'.
EOS
end
plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/ejabberdctl start"
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_sbin}/ejabberdctl</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end