2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-01 14:17:44 +00:00
|
|
|
|
|
|
|
class Couchdb <Formula
|
2010-03-26 15:18:11 +00:00
|
|
|
url 'git://github.com/apache/couchdb.git'
|
|
|
|
homepage='http://couchdb.apache.org/'
|
2010-04-11 03:59:16 +00:00
|
|
|
version "0.11.0"
|
2010-04-13 16:11:42 +00:00
|
|
|
@specs = {:tag => "origin/tags/0.11.0"}
|
2009-09-01 14:17:44 +00:00
|
|
|
|
2009-09-21 18:00:13 +00:00
|
|
|
depends_on 'spidermonkey'
|
|
|
|
depends_on 'icu4c'
|
|
|
|
depends_on 'erlang'
|
2009-09-30 07:08:33 +00:00
|
|
|
|
2009-09-01 14:17:44 +00:00
|
|
|
def install
|
2010-03-26 15:18:11 +00:00
|
|
|
erlang = Formula.factory "erlang"
|
|
|
|
js = Formula.factory "spidermonkey"
|
|
|
|
system "./bootstrap" if File.exists? "bootstrap"
|
2009-10-14 17:09:11 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--localstatedir=#{var}",
|
2010-03-26 15:18:11 +00:00
|
|
|
"--sysconfdir=#{etc}",
|
2010-03-27 05:48:41 +00:00
|
|
|
"--with-erlang=#{erlang.lib}/erlang/usr/include",
|
|
|
|
"--with-js-include=#{js.include}",
|
|
|
|
"--with-js-lib=#{js.lib}"
|
2009-09-01 14:17:44 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
2009-09-07 03:26:56 +00:00
|
|
|
|
2010-03-27 05:48:41 +00:00
|
|
|
(lib+'couchdb/bin/couchjs').chmod 0755
|
|
|
|
(var+'lib/couchdb').mkpath
|
|
|
|
(var+'log/couchdb').mkpath
|
2009-09-01 14:17:44 +00:00
|
|
|
end
|
|
|
|
end
|