Skip to content

Instantly share code, notes, and snippets.

@ajaswa
Created January 11, 2014 06:38
Show Gist options
  • Save ajaswa/8367828 to your computer and use it in GitHub Desktop.
Save ajaswa/8367828 to your computer and use it in GitHub Desktop.
bfgminer.rb
require 'formula'
class Bfgminer < 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'
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",
"--enable-scrypt",
"--enable-opencl"
system "make", "install"
end
test do
system "bfgminer"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment