class Bitcoin < Formula desc "Decentralized, peer to peer payment network" homepage "https://bitcoin.org/" url "https://bitcoin.org/bin/bitcoin-core-0.18.1/bitcoin-0.18.1.tar.gz" sha256 "5c7d93f15579e37aa2d1dc79e8f5ac675f59045fceddf604ae0f1550eb03bf96" bottle do cellar :any sha256 "063b0d3e9d9255f0d2bba8e0b0f6c756b82431eecd5f64f81605a8dd557d64c1" => :mojave sha256 "215f6607ec341cdedddcdc08b57dea742ce052fbf2f76eb8a0419ed0b34ce631" => :high_sierra sha256 "7f252ae994a21a147c1c95b39e3b7616eca914012731efff710b3a89d8e1bc8e" => :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