2012-07-19 22:51:25 +00:00
|
|
|
class AwsSnsCli < AmazonWebServicesFormula
|
2015-01-20 22:48:54 +00:00
|
|
|
homepage "https://aws.amazon.com/developertools/3688"
|
|
|
|
url "https://sns-public-resources.s3.amazonaws.com/SimpleNotificationServiceCli-2010-03-31.zip"
|
2012-08-27 17:40:53 +00:00
|
|
|
# The version in the tarball is the API version; this is the tool version
|
2015-01-20 22:48:54 +00:00
|
|
|
version "2013-09-27"
|
|
|
|
sha1 "192bd9e682f2b27a3c10f207f7a85c65dcaae471"
|
2012-07-19 22:51:25 +00:00
|
|
|
|
|
|
|
def install
|
2015-01-20 22:48:54 +00:00
|
|
|
rm Dir["bin/*.cmd"] # Remove Windows versions
|
2012-09-09 16:50:03 +00:00
|
|
|
|
|
|
|
# There is a "service" binary, which of course will conflict with any number
|
2015-01-23 01:25:57 +00:00
|
|
|
# other brews that have a generically named tool. So don't just blindly
|
2012-09-09 16:50:03 +00:00
|
|
|
# install bin to the prefix.
|
2015-01-20 22:48:54 +00:00
|
|
|
jars = prefix/"jars"
|
2012-09-09 16:50:03 +00:00
|
|
|
jars.install "bin", "lib"
|
2015-01-20 22:48:54 +00:00
|
|
|
chmod 0755, Dir["#{jars}/bin/*"]
|
2012-09-09 16:50:03 +00:00
|
|
|
bin.install_symlink Dir["#{jars}/bin/sns-*"]
|
2012-07-19 22:51:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2015-01-20 22:48:54 +00:00
|
|
|
standard_instructions "AWS_SNS_HOME", prefix/"jars"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
|
|
|
|
ENV["AWS_SNS_HOME"] = prefix/"jars"
|
|
|
|
assert_match /w.x.y.z/, shell_output("#{bin}/sns-version")
|
2012-07-19 22:51:25 +00:00
|
|
|
end
|
|
|
|
end
|