2009-12-18 20:07:06 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Hadoop < Formula
|
|
|
|
homepage 'http://hadoop.apache.org/common/'
|
2012-10-16 22:53:17 +00:00
|
|
|
url 'http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.0.4/hadoop-1.0.4.tar.gz'
|
|
|
|
sha1 '1ab6f3271289ff83ba7b44a090ec1a3e6b77d1dd'
|
2009-12-18 20:07:06 +00:00
|
|
|
|
|
|
|
def install
|
2010-03-06 07:27:21 +00:00
|
|
|
rm_f Dir["bin/*.bat"]
|
2012-03-19 23:02:38 +00:00
|
|
|
libexec.install %w[bin conf lib webapps contrib]
|
2010-07-24 21:42:41 +00:00
|
|
|
libexec.install Dir['*.jar']
|
2012-08-07 18:20:52 +00:00
|
|
|
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
2011-03-13 17:10:09 +00:00
|
|
|
|
|
|
|
inreplace "#{libexec}/conf/hadoop-env.sh",
|
2012-02-27 14:18:02 +00:00
|
|
|
"# export JAVA_HOME=/usr/lib/j2sdk1.5-sun",
|
2012-01-28 19:25:36 +00:00
|
|
|
"export JAVA_HOME=\"$(/usr/libexec/java_home)\""
|
2010-05-05 15:48:41 +00:00
|
|
|
end
|
|
|
|
|
2011-03-13 17:10:09 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
In Hadoop's config file:
|
|
|
|
#{libexec}/conf/hadoop-env.sh
|
|
|
|
$JAVA_HOME has been set to be the output of:
|
|
|
|
/usr/libexec/java_home
|
2010-05-05 15:48:41 +00:00
|
|
|
EOS
|
2009-12-18 20:07:06 +00:00
|
|
|
end
|
|
|
|
end
|