aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-13 10:10:09 -0700
committerAdam Vandenberg2011-03-13 10:10:09 -0700
commitb446bbbc08e27a3c50153fafcb0e6d2451638a08 (patch)
tree9027a6d2569c66b31d012c6db8c2ef9ef2d149c6 /Library/Formula
parentc281011e5b46c65fe2a8d65110d7e1ccede79a69 (diff)
downloadhomebrew-b446bbbc08e27a3c50153fafcb0e6d2451638a08.tar.bz2
hadoop 0.21.0
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/hadoop.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/Library/Formula/hadoop.rb b/Library/Formula/hadoop.rb
index 73631e878..9599d23d0 100644
--- a/Library/Formula/hadoop.rb
+++ b/Library/Formula/hadoop.rb
@@ -1,31 +1,37 @@
require 'formula'
class Hadoop < Formula
- url 'http://www.carfab.com/apachesoftware/hadoop/core/hadoop-0.20.2/hadoop-0.20.2.tar.gz'
+ url 'http://www.gtlib.gatech.edu/pub/apache/hadoop/core/hadoop-0.21.0/hadoop-0.21.0.tar.gz'
homepage 'http://hadoop.apache.org/common/'
- md5 '8f40198ed18bef28aeea1401ec536cb9'
+ md5 'ec0f791f866f82a7f2c1319a54f4db97'
def shim_script target
<<-EOS.undent
#!/bin/bash
- exec #{libexec}/bin/#{target} $*
+ exec #{libexec}/bin/#{target} $@
EOS
end
def install
rm_f Dir["bin/*.bat"]
- libexec.install %w[bin conf contrib lib webapps]
+ libexec.install %w[bin conf lib webapps]
libexec.install Dir['*.jar']
bin.mkpath
Dir["#{libexec}/bin/*"].each do |b|
n = Pathname.new(b).basename
(bin+n).write shim_script(n)
end
+
+ inreplace "#{libexec}/conf/hadoop-env.sh",
+ "# export JAVA_HOME=/usr/lib/j2sdk1.6-sun",
+ "export JAVA_HOME=$(/usr/libexec/java_home)"
end
- def caveats
- <<-EOS.undent
- $JAVA_HOME must be set for Hadoop commands to work.
+ 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
end
end