diff --git a/Formula/prestosql.rb b/Formula/trino.rb similarity index 68% rename from Formula/prestosql.rb rename to Formula/trino.rb index 69c6ba79933..08fd4f90fe8 100644 --- a/Formula/prestosql.rb +++ b/Formula/trino.rb @@ -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 diff --git a/formula_renames.json b/formula_renames.json index a834f4da3bf..bfbeaf07b21 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -115,6 +115,7 @@ "postgresql95": "postgresql@9.5", "prest": "prestd", "presto": "prestodb", + "prestosql": "trino", "pyqt5": "pyqt@5", "qt5": "qt@5", "racket": "minimal-racket",