68 lines
1.9 KiB
Ruby
68 lines
1.9 KiB
Ruby
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"
|
|
revision 1
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "5ef81b850e854e55d8f833c60f85c687757dce42b40270d361e6ba01ce9a37a7" => :mojave
|
|
sha256 "8650b24c3dba1bb87c8fcf1516e013f4a5390b5b79ebbcd6f97e57bad20a194a" => :high_sierra
|
|
sha256 "40f30ab7c8fe3eef9e90929cdaba441035f22e45fe7d3360ce653b55d8b2d40d" => :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@1.1"
|
|
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
|
|
<?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}/bitcoind</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/test_bitcoin"
|
|
end
|
|
end
|