2013-12-16 21:28:48 +00:00
|
|
|
class Predictionio < Formula
|
2015-05-14 15:12:25 +00:00
|
|
|
homepage "https://prediction.io/"
|
2015-05-12 20:00:00 +00:00
|
|
|
url "http://download.prediction.io/PredictionIO-0.9.2.tar.gz"
|
2015-05-14 23:38:23 +00:00
|
|
|
sha256 "e4da196a1d67f545d6667f8368a7c6a64ff5c6de5135b085a12e9251b6076991"
|
2013-12-16 21:28:48 +00:00
|
|
|
|
2015-05-12 20:00:00 +00:00
|
|
|
depends_on "elasticsearch"
|
|
|
|
depends_on "hadoop"
|
|
|
|
depends_on "hbase"
|
|
|
|
depends_on "apache-spark"
|
|
|
|
depends_on :java => "1.7+"
|
2013-12-16 21:28:48 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
rm_f Dir["bin/*.bat"]
|
|
|
|
|
2015-05-12 20:00:00 +00:00
|
|
|
libexec.install Dir["*"]
|
2015-01-19 12:06:06 +00:00
|
|
|
bin.write_exec_script libexec/"bin/pio"
|
2013-12-16 21:28:48 +00:00
|
|
|
|
2015-01-19 12:06:06 +00:00
|
|
|
inreplace libexec/"conf/pio-env.sh" do |s|
|
2015-05-14 23:38:23 +00:00
|
|
|
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}"
|
2015-01-19 12:06:06 +00:00
|
|
|
end
|
2013-12-16 21:28:48 +00:00
|
|
|
end
|
|
|
|
end
|