95884bae22
Closes Homebrew/homebrew#42407. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
40 lines
1 KiB
Ruby
40 lines
1 KiB
Ruby
class Mahout < Formula
|
|
desc "Library to help build scalable machine learning libraries"
|
|
homepage "https://mahout.apache.org/"
|
|
url "https://www.apache.org/dyn/closer.cgi?path=mahout/0.10.0/mahout-distribution-0.10.0.tar.gz"
|
|
sha256 "0f76800f6ff93f47b9ebf794522a6c5a58155eba7233a53863e7486454b96b53"
|
|
|
|
head do
|
|
url "https://svn.apache.org/repos/asf/mahout/trunk"
|
|
depends_on "maven" => :build
|
|
end
|
|
|
|
depends_on "hadoop"
|
|
depends_on :java
|
|
|
|
def install
|
|
if build.head?
|
|
chmod 755, "./bin"
|
|
system "mvn -DskipTests clean install"
|
|
end
|
|
|
|
libexec.install "bin"
|
|
|
|
if build.head?
|
|
libexec.install Dir["buildtools/target/*.jar"]
|
|
libexec.install Dir["core/target/*.jar"]
|
|
libexec.install Dir["examples/target/*.jar"]
|
|
libexec.install Dir["math/target/*.jar"]
|
|
else
|
|
libexec.install Dir["*.jar"]
|
|
end
|
|
|
|
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
Mahout requires JAVA_HOME to be set:
|
|
export JAVA_HOME=$(/usr/libexec/java_home)
|
|
EOS
|
|
end
|
|
end
|