cmckni3
2/3/2016 - 4:43 PM

Formula for cgminer with cpu mining enabled through homebrew

Formula for cgminer with cpu mining enabled through homebrew

require 'formula'
class Cgminer < Formula
  homepage 'https://github.com/ckolivas/cgminer'
  url 'https://github.com/ckolivas/cgminer/archive/v2.11.0.tar.gz'
  sha1 '56f7d2bed9b51a3a9b6cafacb09c10de552f5e82'
  version '2.11'
  depends_on 'automake' => :build
  depends_on 'curl' => :build
  depends_on 'c-ares' => :build
  depends_on 'libusb'
  depends_on 'pkg-config' => :build
  def install
    ENV['NOCONFIGURE'] = '1'
    system "./autogen.sh"
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
    "--prefix=#{prefix}", "--enable-cpumining", "--enable-scrypt"
    system "make install"
  end
end
require 'formula'

class CgminerMavericks < Formula
  homepage 'https://github.com/ckolivas/cgminer'
  head 'https://github.com/ckolivas/cgminer.git', :branch => 'master'
  url 'https://github.com/ckolivas/cgminer/archive/v3.8.1.tar.gz'
  sha1 '29a0348685d0c1d3a89c3ee67b6decc0e5de59ad'

  depends_on 'autoconf' => :build
  depends_on 'automake' => :build
  depends_on 'libtool' => :build
  depends_on 'pkg-config' => :build
  depends_on 'coreutils' => :build
  depends_on 'curl'

  def install
    inreplace "autogen.sh", "libtoolize", "glibtoolize"
    inreplace "autogen.sh", "readlink", "greadlink"
    system "autoreconf -fvi"
    system "./autogen.sh", "--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/libusb/lib/pkgconfig",
                          "--enable-scrypt",
                          "--enable-bflsc",
                          "--enable-bitforce",
                          "--enable-cpumining",
                          "--enable-icarus",
                          "--enable-modminer",
                          "--enable-ztex",
                          "--enable-avalon",
                          "--disable-adl",
                          "--enable-opencl",
                          "--enable-bitfury",
                          "--enable-hashfast",
                          "--enable-klondike"
    system "make", "install"
  end

  test do
    system "cgminer"
  end
end