2013-10-31 23:53:36 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Mahout < Formula
|
2015-04-22 18:25:19 +00:00
|
|
|
homepage 'https://mahout.apache.org/'
|
2015-04-25 11:50:15 +00:00
|
|
|
url 'https://www.apache.org/dyn/closer.cgi?path=mahout/0.10.0/mahout-distribution-0.10.0.tar.gz'
|
2015-04-22 18:25:19 +00:00
|
|
|
sha1 'c8dcb51a04eb026eb9fd0fe6cb496cb101cf632d'
|
2013-10-31 23:53:36 +00:00
|
|
|
|
2014-02-25 14:45:10 +00:00
|
|
|
head do
|
2015-04-22 18:25:19 +00:00
|
|
|
url 'https://svn.apache.org/repos/asf/mahout/trunk'
|
2014-02-25 14:45:10 +00:00
|
|
|
depends_on 'maven' => :build
|
|
|
|
end
|
|
|
|
|
2013-10-31 23:53:36 +00:00
|
|
|
depends_on 'hadoop'
|
2015-04-22 18:25:19 +00:00
|
|
|
depends_on :java
|
2013-10-31 23:53:36 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
if build.head?
|
2015-04-22 18:25:19 +00:00
|
|
|
chmod 755, './bin'
|
2013-10-31 23:53:36 +00:00
|
|
|
system 'mvn -DskipTests clean install'
|
|
|
|
end
|
|
|
|
|
2014-02-25 14:45:10 +00:00
|
|
|
libexec.install "bin"
|
2013-10-31 23:53:36 +00:00
|
|
|
|
|
|
|
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
|