forked from Consensys/homebrew-teku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteku.rb
37 lines (31 loc) · 1.01 KB
/
teku.rb
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
37
class Teku < Formula
desc "Teku Ethereum 2 beacon chain client"
homepage "https://github.com/consensys/teku"
url "https://artifacts.consensys.net/public/teku/raw/names/teku.zip/versions/23.2.0/teku-23.2.0.zip"
# update with: ./updateTeku.sh <new-version>
sha256 "e41c43d0b68654983604b66736c64db8cbfe20bdb530b230e3bfe5a2280fb5b6"
head "https://artifacts.consensys.net/public/teku/raw/names/teku.zip/versions/develop/teku-develop.zip"
depends_on "openjdk" => "11+"
def install
cp_r ".", "#{prefix}/dist"
bin.install_symlink "#{prefix}/dist/bin/teku"
(buildpath/"teku.yaml").write <<~EOS
# Default Homebrew Teku config
network: "mainnet"
data-path: "#{etc}/teku.yaml"
EOS
etc.install "teku.yaml"
end
def post_install
# Make sure the var/teku directory exists
(var/"teku").mkpath
end
service do
run [opt_bin/"teku", "--config-file=#{etc}/teku.yaml"]
keep_alive true
working_dir var/"teku"
end
test do
system "#{bin}/teku" "--version"
end
end