require 'formula' class BfgminerAmu < Formula homepage 'https://github.com/luke-jr/bfgminer' head 'https://github.com/nwoolls/bfgminer.git', :branch => 'feature/antminer-u1-support' url 'http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.9.0/bfgminer-3.9.0.zip' sha1 '5be8c54b814d1d7f7740f250d9db413ad77fbd91' depends_on 'autoconf' => :build depends_on 'automake' => :build depends_on 'libtool' => :build depends_on 'pkg-config' => :build depends_on 'uthash' => :build depends_on 'curl' depends_on 'jansson' depends_on 'libmicrohttpd' depends_on 'libevent' depends_on 'libusb' depends_on 'hidapi' def install system "./autogen.sh" system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "PKG_CONFIG_PATH=#{HOMEBREW_PREFIX}/opt/curl/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/jansson/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/libmicrohttpd/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/libusb/lib/pkgconfig:#{HOMEBREW_PREFIX}/opt/hidapi/lib/pkgconfig", "--enable-scrypt", "--enable-opencl" system "make", "install" end test do system "bfgminer" end end