homebrew-core/Formula/aws-cloudsearch.rb
Xu Cheng a753bdca89 aws-cloudsearch: set envs using env_script_all_files
Closes Homebrew/homebrew#38703.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-16 18:23:38 +08:00

20 lines
740 B
Ruby

class AwsCloudsearch < Formula
homepage "https://aws.amazon.com/developertools/9054800585729911"
url "https://s3.amazonaws.com/amazon-cloudsearch-data/cloud-search-tools-v2-2.0.1.0-2014.10.27.tar.gz"
version "2.0.1.0-2014.10.27"
sha256 "882a6442172957b27c0b3cd1f271531112092d4d227b528ce912b2e7ea886d51"
depends_on :java => "1.7+"
def install
inreplace "bin/cs-cmd", 'LIBDIR="${CS_HOME}/lib"', 'LIBDIR="${CS_HOME}/jars/lib"'
(libexec/"jars").install "lib"
libexec.install %w[conf help third-party]
bin.install Dir["bin/*"]
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.7+").merge(:CS_HOME => libexec))
end
test do
system "#{bin}/cs-configure-from-batches", "-h"
end
end