class Bitcoin < Formula desc "Decentralized, peer to peer payment network" homepage "https://bitcoin.org/" url "https://bitcoin.org/bin/bitcoin-core-0.18.0/bitcoin-0.18.0.tar.gz" sha256 "5e4e6890e07b620a93fdb24605dae2bb53e8435b2a93d37558e1db1913df405f" revision 1 bottle do cellar :any sha256 "b90adc43e6fa8a3e44caf1ea4aceaedda17e73e5ddf595eaf5f23b986b479cbd" => :mojave sha256 "d77a60aea170c72a60bf198d12ebd97a20b388fa5299551667774dc86c7bd2d0" => :high_sierra sha256 "eb6a4279a322c29e853606792ed19e0fec2550560b74d6e2aa9b2bd36e20e27d" => :sierra end head do url "https://github.com/bitcoin/bitcoin.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build end depends_on "pkg-config" => :build depends_on "berkeley-db@4" depends_on "boost" depends_on "libevent" depends_on "miniupnpc" depends_on "openssl" depends_on "zeromq" def install if MacOS.version == :el_capitan && MacOS::Xcode.version >= "8.0" ENV.delete("SDKROOT") end system "./autogen.sh" if build.head? system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--with-boost-libdir=#{Formula["boost"].opt_lib}", "--prefix=#{prefix}" system "make", "install" pkgshare.install "share/rpcauth" end plist_options :manual => "bitcoind" def plist; <<~EOS Label #{plist_name} ProgramArguments #{opt_bin}/bitcoind RunAtLoad EOS end test do system "#{bin}/test_bitcoin" end end