77 lines
2.5 KiB
Ruby
77 lines
2.5 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.2.0",
|
|
revision: "f6e63ef260e795aacd408c28008398785b84103a"
|
|
license "BSD-3-Clause"
|
|
revision 1
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :github_latest
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "cd413eab5533597caacbf4159ee3865705f71b195a9f36dcfe8d641abc2519ec"
|
|
sha256 cellar: :any, big_sur: "2099055930c3ef3d6d8cabd75a2c2e62a71541aac6fc2ac6ec00e1c0413f88ed"
|
|
sha256 cellar: :any, catalina: "e5f060e06bbcefadf93f33285ecb2655ff5559f3b74d025903785b79f664e795"
|
|
sha256 cellar: :any, mojave: "bff15f9246175f7e08d4c4bd50f10fbf7a3ad07cf995fe1d33658026fedc7446"
|
|
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
|