Skip to content

Instantly share code, notes, and snippets.

@neilvallon
Created May 7, 2018 05:07
Show Gist options
  • Save neilvallon/17b4cd44ff3e77451319eb36c035bad5 to your computer and use it in GitHub Desktop.
Save neilvallon/17b4cd44ff3e77451319eb36c035bad5 to your computer and use it in GitHub Desktop.
class Fakecoin < Formula
homepage "https://fakco.in/"
url "https://github.com/Fake-Coin/FakeCoin-Qt.git"
#head do
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"
needs :cxx11
def install
if MacOS.version == :el_capitan && MacOS::Xcode.installed? &&
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/rpcuser"
end
plist_options :manual => "fakecoind"
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}/fakecoind</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
test do
system "#{bin}/test_fakecoin"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment