Skip to content

Instantly share code, notes, and snippets.

@ingenthr
Created December 5, 2012 01:24
Show Gist options
  • Select an option

  • Save ingenthr/4211116 to your computer and use it in GitHub Desktop.

Select an option

Save ingenthr/4211116 to your computer and use it in GitHub Desktop.
libcouchbase GA formula
require 'formula'
def with_libev_plugin?
ARGV.include?('--with-libev-plugin')
end
def without_libevent_plugin?
ARGV.include?('--without-libevent-plugin')
end
class Libcouchbase < Formula
homepage 'http://couchbase.com/develop/c/next'
url 'http://packages.couchbase.com/clients/c/libcouchbase-2.0.0.tar.gz'
md5 '0b54b6968fe5ba71defc76889ef5b0cb'
depends_on 'libevent' unless without_libevent_plugin?
depends_on 'libev' if with_libev_plugin?
def options
[
['--with-libev-plugin', 'Build libev IO plugin'],
['--without-libevent-plugin', 'Do not build libev IO plugin']
]
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-examples",
"--disable-couchbasemock"
system "make install"
end
def test
system "#{bin}/cbc-version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment