homebrew-core/Formula/apache-drill.rb

33 lines
1.0 KiB
Ruby

class ApacheDrill < Formula
desc "Schema-free SQL Query Engine for Hadoop, NoSQL and Cloud Storage"
homepage "https://drill.apache.org"
url "https://www.apache.org/dyn/closer.lua?path=drill/1.20.3/apache-drill-1.20.3.tar.gz"
mirror "https://dlcdn.apache.org/drill/1.20.3/apache-drill-1.20.3.tar.gz"
sha256 "1520cd2524cf8e0ce45fcf02e8e5e3e044465c6dacad853f9fadf9c918863cad"
license "Apache-2.0"
livecheck do
url "https://drill.apache.org/download/"
regex(/href=.*?apache-drill[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "773fb0f514a9b10a85331161e65964c471f34fc9b7a100b90761825830dd60d6"
end
depends_on "openjdk@11"
def install
rm_f Dir["bin/*.bat"]
libexec.install Dir["*"]
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("11"))
rm_f Dir["#{bin}/*.txt"]
end
test do
ENV["DRILL_LOG_DIR"] = ENV["TMP"]
pipe_output("#{bin}/sqlline -u jdbc:drill:zk=local", "!tables", 0)
end
end