Skip to content

Instantly share code, notes, and snippets.

@dch
Created March 21, 2012 13:56
Show Gist options
  • Save dch/2147079 to your computer and use it in GitHub Desktop.
Save dch/2147079 to your computer and use it in GitHub Desktop.
NB the recipes below are now in homebrew apart from OpenSSL 1.0.1 and modified Erlang
diff --git i/Library/Formula/couchdb.rb w/Library/Formula/couchdb.rb
index 3352b28..7c1203d 100644
--- i/Library/Formula/couchdb.rb
+++ w/Library/Formula/couchdb.rb
@@ -1,9 +1,14 @@
require 'formula'
class Couchdb < Formula
- url 'http://www.apache.org/dyn/closer.cgi?path=couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz'
homepage "http://couchdb.apache.org/"
- md5 'cd126219b9cb69a4c521abd6960807a6'
+ url 'http://www.apache.org/dyn/closer.cgi?path=couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz'
+ md5 'a5cbbcaac288831b3d8a08b725657f10'
+
+ devel do
+ url 'http://git-wip-us.apache.org/repos/asf/couchdb.git', :using => :git, :tag => '1.3.x'
+ version '1.3.x'
+ end
head 'http://git-wip-us.apache.org/repos/asf/couchdb.git', :using => :git
@@ -36,7 +41,7 @@ class Couchdb < Formula
curl http://127.0.0.1:5984/
The reply should look like:
- {"couchdb":"Welcome","version":"1.1.0"}
+ {"couchdb":"Welcome","version":"1.2.0"}
EOS
end
@@ -51,7 +56,13 @@ class Couchdb < Formula
cp #{prefix}/Library/LaunchDaemons/org.apache.couchdb.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.apache.couchdb.plist
- Or start manually with:
+ Alternatively, automatically run on startup as a daemon with:
+ sudo launchctl list org.apache.couchdb \>/dev/null 2\>\&1 \&\& \\
+ sudo launchctl unload -w /Library/LaunchDaemons/org.apache.couchdb.plist
+ sudo cp #{prefix}/Library/LaunchDaemons/org.apache.couchdb.plist /Library/LaunchDaemons/
+ sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist
+
+ Or start manually as the current user with:
couchdb
EOS
end
diff --git i/Library/Formula/erlang.rb w/Library/Formula/erlang.rb
index 083d9a7..2d1612f 100644
--- i/Library/Formula/erlang.rb
+++ w/Library/Formula/erlang.rb
@@ -43,6 +43,8 @@ class Erlang < Formula
# may as well skip bin too, everything is just shell scripts
skip_clean ['lib', 'bin']
+ depends_on "openssl"
+
if MacOS.xcode_version >= "4.3"
# remove the autoreconf if possible
depends_on "automake" => :build
diff --git i/Library/Formula/openssl.rb w/Library/Formula/openssl.rb
index d923ab6..e543db0 100644
--- i/Library/Formula/openssl.rb
+++ w/Library/Formula/openssl.rb
@@ -1,12 +1,12 @@
require 'formula'
class Openssl < Formula
+ url 'http://www.openssl.org/source/openssl-1.0.1.tar.gz'
homepage 'http://www.openssl.org'
- url 'http://www.openssl.org/source/openssl-0.9.8s.tar.gz'
- sha1 'a7410b0991f37e125bf835dfd1315822fca64d56'
+ sha1 'a6476d33fd38c2e7dfb438d1e3be178cc242c907'
keg_only :provided_by_osx,
- "The OpenSSL provided by Leopard (0.9.7) is too old for some software."
+ "The OpenSSL provided by OS X (0.9.8r on Lion) is too old for some software."
def install
args = %W[./Configure
@dch
Copy link
Author

dch commented Mar 21, 2012

My config on Lion

I did:

Homebrew status

The new erlang, couch & openssl recipes have been submitted to homebrew, but not yet accepted.

Clean up old recipes

brew update
brew remove --force openssl erlang couchdb icu4c spidermonkey nspr

Skip this when homebrew has accepted all patches

The next step can be ommitted once the recipes are accepted, basically you're just updating to my fork:

pushd /usr/local/Library/Formula && curl https://raw.github.com/gist/2147079/couchdb-1.2.0.diff | patch -p3

Race to the Finish

Everybody back on deck for the race to the finish line. Erlang will take 10+ minutes at least.

brew install icu4c openssl
brew install erlang --no-docs
brew install couchdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment