trino: renamed from prestosql

master
Branch Vincent 2021-08-12 21:09:08 -04:00 committed by BrewTestBot
parent b3dc6aaf6d
commit 72b591c303
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
2 changed files with 13 additions and 18 deletions

View File

@ -1,19 +1,13 @@
class Prestosql < Formula
class Trino < Formula
desc "Distributed SQL query engine for big data"
homepage "https://prestosql.io"
homepage "https://trino.io"
url "https://search.maven.org/remotecontent?filepath=io/prestosql/presto-server/344/presto-server-344.tar.gz"
sha256 "9ae950f2901efd5cb1ca7d1bbd8a4cbb01d16dfe9c4fe702db2ee147ab841a8b"
license "Apache-2.0"
bottle do
sha256 cellar: :any_skip_relocation, all: "5e7676fdb46e1239f9f1b8087654ea8e897e20d91f054849568098abdc54420c"
end
depends_on "openjdk"
conflicts_with "prestodb", because: "both install `presto` and `presto-server` binaries"
resource "presto-cli" do
resource "trino-cli" do
url "https://search.maven.org/remotecontent?filepath=io/prestosql/presto-cli/344/presto-cli-344-executable.jar"
sha256 "92de6ce3afa29acea4e9527a1f2e20889008d72ee94cdd34b55c072fd805503e"
end
@ -24,7 +18,7 @@ class Prestosql < Formula
(libexec/"etc/node.properties").write <<~EOS
node.environment=dev
node.id=dev
node.data-dir=#{var}/presto/data
node.data-dir=#{var}/trino/data
EOS
(libexec/"etc/jvm.config").write <<~EOS
@ -53,32 +47,32 @@ class Prestosql < Formula
connector.name=jmx
EOS
(bin/"presto-server").write_env_script libexec/"bin/launcher", Language::Java.overridable_java_home_env
(bin/"trino-server").write_env_script libexec/"bin/launcher", Language::Java.overridable_java_home_env
resource("presto-cli").stage do
resource("trino-cli").stage do
libexec.install "presto-cli-#{version}-executable.jar"
bin.write_jar_script libexec/"presto-cli-#{version}-executable.jar", "presto"
bin.write_jar_script libexec/"presto-cli-#{version}-executable.jar", "trino"
end
end
def post_install
(var/"presto/data").mkpath
(var/"trino/data").mkpath
end
def caveats
<<~EOS
Add connectors to #{opt_libexec}/etc/catalog/. See:
https://prestosql.io/docs/current/connector.html
https://trino.io/docs/current/connector.html
EOS
end
service do
run [opt_bin/"presto-server", "run"]
run [opt_bin/"trino-server", "run"]
working_dir opt_libexec
end
test do
system bin/"presto-server", "run", "--help"
assert_match "Presto CLI #{version}", shell_output("#{bin}/presto --version").chomp
system bin/"trino-server", "run", "--help"
assert_match "Presto CLI #{version}", shell_output("#{bin}/trino --version").chomp
end
end

View File

@ -115,6 +115,7 @@
"postgresql95": "postgresql@9.5",
"prest": "prestd",
"presto": "prestodb",
"prestosql": "trino",
"pyqt5": "pyqt@5",
"qt5": "qt@5",
"racket": "minimal-racket",