Bitlbee: add Libpurple support

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Dustin Chilson 2011-04-25 21:30:13 -04:00 committed by Adam Vandenberg
parent 80c3f4fb36
commit 1cfbdb587e

View file

@ -7,6 +7,11 @@ class Bitlbee < Formula
depends_on 'glib' depends_on 'glib'
depends_on 'gnutls' depends_on 'gnutls'
depends_on 'libpurple' if ARGV.include? '--purple'
def options
[['--purple', "Use libpurple for all communication with instant messaging networks"]]
end
def install def install
# By default Homebrew will set ENV['LD'] to the same as ENV['CC'] which # By default Homebrew will set ENV['LD'] to the same as ENV['CC'] which
@ -16,21 +21,24 @@ class Bitlbee < Formula
# magician will know). # magician will know).
ENV['LD'] = '/usr/bin/ld' ENV['LD'] = '/usr/bin/ld'
# Homebrew should handle the stripping. args = ["--prefix=#{prefix}",
# Should we use --config=/usr/local/var/lib/bitlbee/ ? "--debug=0",
system "./configure", "--prefix=#{prefix}", "--strip=0", # Let Homebrew handle the stripping
"--debug=0", "--strip=0", "--ssl=gnutls",
"--ssl=gnutls", "--pidfile=#{var}/bitlbee/run/bitlbee.pid",
"--pidfile=#{var}/bitlbee/run/bitlbee.pid", "--config=#{var}/bitlbee/lib/",
"--config=#{var}/bitlbee/lib/", "--ipsocket=#{var}/bitlbee/run/bitlbee.sock"]
"--ipsocket=#{var}/bitlbee/run/bitlbee.sock"
args << "--purple=1" if ARGV.include? "--purple"
system "./configure", *args
# This build depends on make running first. # This build depends on make running first.
system "make" system "make"
system "make install" system "make install"
# This build has an extra step. # This build has an extra step.
system "make install-etc" system "make install-etc"
(var+"bitlbee").mkpath
(var+"bitlbee/run").mkpath (var+"bitlbee/run").mkpath
(var+"bitlbee/lib").mkpath (var+"bitlbee/lib").mkpath
end end