2009-12-28 00:12:56 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mcabber < Formula
|
2009-12-28 00:12:56 +00:00
|
|
|
homepage 'http://mcabber.com/'
|
2012-02-21 06:04:21 +00:00
|
|
|
url 'http://mcabber.com/files/mcabber-0.10.1.tar.bz2'
|
2010-12-18 21:41:38 +00:00
|
|
|
md5 'fe96beab30f535d5d6270fd1719659b4'
|
2012-02-21 06:04:21 +00:00
|
|
|
|
2011-10-28 00:29:56 +00:00
|
|
|
head 'http://mcabber.com/hg/', :using => :hg
|
2009-12-28 00:12:56 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2009-12-28 00:12:56 +00:00
|
|
|
depends_on 'glib'
|
2010-08-14 11:33:46 +00:00
|
|
|
depends_on 'loudmouth'
|
|
|
|
depends_on 'gpgme'
|
|
|
|
depends_on 'libgcrypt'
|
2012-02-14 09:53:00 +00:00
|
|
|
depends_on 'libotr'
|
|
|
|
depends_on 'libidn'
|
|
|
|
depends_on 'aspell' if ARGV.include? '--enable-aspell'
|
|
|
|
depends_on 'enchant' if ARGV.include? '--enable-enchant'
|
2010-08-14 11:33:46 +00:00
|
|
|
|
2012-02-28 15:39:22 +00:00
|
|
|
if ARGV.build_head? and MacOS.xcode_version >= "4.3"
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2012-02-27 03:44:55 +00:00
|
|
|
end
|
|
|
|
|
2010-08-14 11:33:46 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--enable-enchant", "Enable spell checking support via enchant"],
|
|
|
|
["--enable-aspell", "Enable spell checking support via aspell"],
|
|
|
|
]
|
|
|
|
end
|
2009-12-28 00:12:56 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-14 09:53:00 +00:00
|
|
|
if ARGV.build_head? then
|
2012-02-27 03:44:55 +00:00
|
|
|
ENV['LIBTOOLIZE'] = 'glibtoolize'
|
|
|
|
ENV['ACLOCAL'] = "aclocal -I #{HOMEBREW_PREFIX}/share/aclocal"
|
2012-02-21 06:04:21 +00:00
|
|
|
cd 'mcabber' # Not using block form on purpose
|
2012-02-14 09:53:00 +00:00
|
|
|
inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'
|
|
|
|
inreplace 'autogen.sh', 'aclocal', '$ACLOCAL'
|
|
|
|
system "./autogen.sh"
|
|
|
|
end
|
|
|
|
|
2010-08-14 11:33:46 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking",
|
2012-02-14 09:53:00 +00:00
|
|
|
"--prefix=#{prefix}", "--enable-otr"]
|
2010-08-14 11:33:46 +00:00
|
|
|
|
|
|
|
args << "--enable-aspell" if ARGV.include? "--enable-aspell"
|
|
|
|
args << "--enable-enchant" if ARGV.include? "--enable-enchant"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2009-12-28 00:12:56 +00:00
|
|
|
system "make install"
|
2010-08-14 11:33:46 +00:00
|
|
|
|
|
|
|
(share+'mcabber').install %w[mcabberrc.example contrib]
|
2009-12-28 00:12:56 +00:00
|
|
|
end
|
2012-02-14 09:53:00 +00:00
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
A configuration file is necessary to start mcabber. The template is here:
|
|
|
|
#{share}/mcabber/mcabberrc.example
|
|
|
|
And there is a Getting Started Guide you will need to setup Mcabber:
|
|
|
|
http://wiki.mcabber.com/index.php/Getting_started
|
|
|
|
EOS
|
|
|
|
end
|
2009-12-28 00:12:56 +00:00
|
|
|
end
|