homebrew-core/Formula/predictionio.rb
Donald Szeto 23e35d0d67 PredictionIO 0.8.6
Closes Homebrew/homebrew#36687.

Signed-off-by: Brett Koonce <koonce@gmail.com>
2015-02-09 20:49:30 -08:00

26 lines
690 B
Ruby

require 'formula'
class Predictionio < Formula
homepage 'http://prediction.io/'
url 'http://download.prediction.io/PredictionIO-0.8.6.tar.gz'
sha1 'bba9342864bd01859b2719dc76affb3067fcab46'
depends_on 'elasticsearch'
depends_on 'hadoop'
depends_on 'hbase'
depends_on 'apache-spark'
depends_on :java => "1.7"
def install
rm_f Dir["bin/*.bat"]
libexec.install Dir['*']
bin.write_exec_script libexec/"bin/pio"
inreplace libexec/"conf/pio-env.sh" do |s|
s.gsub! /#\s*ES_CONF_DIR=.+$/, "ES_CONF_DIR=#{Formula['elasticsearch'].opt_prefix}/config"
s.gsub! /SPARK_HOME=.+$/, "SPARK_HOME=#{Formula['apache-spark'].opt_prefix}"
end
end
end