-
Notifications
You must be signed in to change notification settings - Fork 10
36 lines (31 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class HazelcastEnterpriseAT51Snapshot < Formula
desc "Hazelcast is a streaming and memory-first application platform for fast, stateful, data-intensive workloads on-premises, at the edge or as a fully managed cloud service."
homepage "https://github.com/hazelcast/hazelcast-command-line"
url "https://repository.hazelcast.com/snapshot/com/hazelcast/hazelcast-enterprise-distribution/5.1-SNAPSHOT/hazelcast-enterprise-distribution-5.1-20220221.110731-523.tar.gz"
sha256 "453f2487d5db4c7aa7ac8a7c2cc37c42638ee5d05b04d7b108ba083023b6a314"
conflicts_with "hazelcast"
depends_on "openjdk" => :recommended
def install
libexec.install Dir["*"]
Dir["#{libexec}/bin/hz*"].each do |path|
executable_name = File.basename(path)
if executable_name.end_with? ".bat"
next
end
(bin/executable_name).write_env_script libexec/"bin/#{executable_name}", Language::Java.overridable_java_home_env
end
etc.install "#{libexec}/config" => "hazelcast"
rm_rf libexec/"config"
libexec.install_symlink "#{etc}/hazelcast" => "config"
prefix.install_metafiles
inreplace libexec/"lib/hazelcast-download.properties", "hazelcastDownloadId=distribution", "hazelcastDownloadId=brew"
end
def caveats
<<~EOS
Configuration files have been placed in #{etc}/hazelcast.
EOS
end
def post_install
exec "echo Hazelcast has been installed."
end
end