Skip to content

Instantly share code, notes, and snippets.

@altamic
Created November 26, 2010 18:08
Show Gist options
  • Save altamic/717030 to your computer and use it in GitHub Desktop.
Save altamic/717030 to your computer and use it in GitHub Desktop.
bitcoin build with homebrew (still fails)
require 'formula'
class Bitcoin < Formula
version '0.3.17'
url "http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-#{version}/bitcoin-#{version}-linux.tar.gz"
sha1 'c81637bc78d697e212846cf8b68c281eb8edfaec'
head 'https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk', :using => :svn
homepage 'http://www.bitcoin.org'
depends_on 'boost'
depends_on 'openssl'
depends_on 'berkeley-db'
depends_on 'wxmac'
def install
ENV.deparallelize
Dir.chdir 'src' do
# tweak the makefile
inreplace 'makefile.osx' do |s|
s.change_make_var! 'DEPSDIR', HOMEBREW_PREFIX.to_s
s.gsub! /(libdb_cxx)-4.8(.a)/, '\1\2'
s.gsub! /(libboost_)(system|filesystem|program_options|thread)/, '\1\2-mt'
openssl_path = Openssl.new.installed_prefix.to_s.gsub! /__UNKNOWN__/, 'openssl'
s.gsub! /(\$\(DEPSDIR\)\/lib\/)(libssl|libcrypto)(.a)/, "#{openssl_path}/lib/" + '\2\3'
end
require 'rubygems'
require 'ruby-debug'
debugger
system 'make -f makefile.osx all'
# bin.install "#{prefix}/bin/bitcoin"
# system "mkdir -p #{prefix}/Bitcoin.app/Contents/{MacOS,Resources}"
# system "cp bitcoin bitcoind Bitcoin.app/Contents/MacOS/"
# Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
# Bitcoin.app/Contents/MacOS/bitcoin
# Bitcoin.app/Contents/Info.plist
#
# etc/bitcoin.conf
# server=false
# rpcuser=admin
# rpcpassword=password
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment