homebrew-core/Formula/hadoop.rb

29 lines
838 B
Ruby
Raw Normal View History

2009-12-18 20:07:06 +00:00
require 'formula'
class Hadoop < Formula
homepage 'http://hadoop.apache.org/common/'
url 'http://www.apache.org/dyn/closer.cgi?path=hadoop/core/hadoop-1.1.1/hadoop-1.1.1.tar.gz'
sha1 '3b7f226e437a30bb8eee12093179c81ae94e7896'
2009-12-18 20:07:06 +00:00
def install
2010-03-06 07:27:21 +00:00
rm_f Dir["bin/*.bat"]
libexec.install %w[bin conf lib webapps contrib]
libexec.install Dir['*.jar']
2012-08-07 18:20:52 +00:00
bin.write_exec_script Dir["#{libexec}/bin/*"]
# But don't make rcc visible, it conflicts with Qt
(bin/'rcc').unlink
2011-03-13 17:10:09 +00:00
inreplace "#{libexec}/conf/hadoop-env.sh",
"# export JAVA_HOME=/usr/lib/j2sdk1.5-sun",
2012-01-28 19:25:36 +00:00
"export JAVA_HOME=\"$(/usr/libexec/java_home)\""
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
EOS
2009-12-18 20:07:06 +00:00
end
end