72 lines
2.4 KiB
Ruby
72 lines
2.4 KiB
Ruby
class Monero < Formula
|
|
desc "Official Monero wallet and CPU miner"
|
|
homepage "https://www.getmonero.org/"
|
|
url "https://github.com/monero-project/monero.git",
|
|
tag: "v0.17.1.9",
|
|
revision: "8fef32e45c80aec41f25be9d1d8fb75adc883c64"
|
|
license "BSD-3-Clause"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "d6fb5505e8fab3d588fb01cd61e4feab202d575729525a96fc270060b4162079"
|
|
sha256 cellar: :any, big_sur: "ba4a3f33a6554f58d0a6b6b689b770e74acc9304e411667259ceb2702550bb19"
|
|
sha256 cellar: :any, catalina: "a62cc51e63fdb3a297a554a89cc748fa23d5d3908f9161de6099de086a40de71"
|
|
sha256 cellar: :any, mojave: "cb68324913bbb7aa1b7a22145eae86098785359ddfae947fb6cc93fd2d5c077b"
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "hidapi"
|
|
depends_on "libsodium"
|
|
depends_on "openssl@1.1"
|
|
depends_on "protobuf"
|
|
depends_on "readline"
|
|
depends_on "unbound"
|
|
depends_on "zeromq"
|
|
|
|
conflicts_with "wownero", because: "both install a wallet2_api.h header"
|
|
|
|
def install
|
|
system "cmake", ".", *std_cmake_args
|
|
system "make", "install"
|
|
|
|
# Fix conflict with miniupnpc.
|
|
# This has been reported at https://github.com/monero-project/monero/issues/3862
|
|
rm lib/"libminiupnpc.a"
|
|
end
|
|
|
|
plist_options manual: "monerod"
|
|
|
|
def plist
|
|
<<~EOS
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/monerod</string>
|
|
<string>--non-interactive</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
cmd = "yes '' | #{bin}/monero-wallet-cli --restore-deterministic-wallet " \
|
|
"--password brew-test --restore-height 1 --generate-new-wallet wallet " \
|
|
"--electrum-seed 'baptism cousin whole exquisite bobsled fuselage left " \
|
|
"scoop emerge puzzled diet reinvest basin feast nautical upon mullet " \
|
|
"ponies sixteen refer enhanced maul aztec bemused basin'" \
|
|
"--command address"
|
|
address = "4BDtRc8Ym9wGzx8vpkQQvpejxBNVpjEmVBebBPCT4XqvMxW3YaCALFraiQibejyMAxUXB5zqn4pVgHVm3JzhP2WzVAJDpHf"
|
|
assert_equal address, shell_output(cmd).lines.last.split[1]
|
|
end
|
|
end
|