7bd947eb0b
* Use new "url" features * Use keg_only DSL * Use "skip_clean :all" DSL * Whitespace and style cleanups * Make bash invocations less silly * Use new man2-man8 helpers * Remove "FileUtils." since it is included in Formula * Use real names for deps instead of aliases * ENV.x11 now updates path, so remove that from individual brews
31 lines
707 B
Ruby
31 lines
707 B
Ruby
require 'formula'
|
|
|
|
class Hadoop < Formula
|
|
url 'http://www.carfab.com/apachesoftware/hadoop/core/hadoop-0.20.2/hadoop-0.20.2.tar.gz'
|
|
homepage 'http://hadoop.apache.org/common/'
|
|
md5 '8f40198ed18bef28aeea1401ec536cb9'
|
|
|
|
def shim_script target
|
|
<<-EOS.undent
|
|
#!/bin/bash
|
|
exec #{libexec}/bin/#{target} $*
|
|
EOS
|
|
end
|
|
|
|
def install
|
|
rm_f Dir["bin/*.bat"]
|
|
libexec.install %w[bin conf contrib 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
|
|
end
|
|
|
|
def caveats
|
|
<<-EOS.undent
|
|
$JAVA_HOME must be set for Hadoop commands to work.
|
|
EOS
|
|
end
|
|
end
|