Skip to content

Instantly share code, notes, and snippets.

@sergeyk
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergeyk/bb8274c218ada01d1fea to your computer and use it in GitHub Desktop.
Save sergeyk/bb8274c218ada01d1fea to your computer and use it in GitHub Desktop.
require 'formula'
class Lmdb < Formula
homepage 'http://symas.com/mdb/'
url 'https://gitorious.org/mdb/mdb/archive/LMDB_0.9.11.tar.gz'
sha1 '8015de70514e8b437b4bc43718a7034101efdc67'
head 'git://git.openldap.org/openldap.git', :branch => 'mdb.master'
def install
# .so -> .dylib
inreplace 'libraries/liblmdb/Makefile', ".so", ".dylib"
# fix non-POSIX `cp` multiple source files
inreplace 'libraries/liblmdb/Makefile' do |s|
s.gsub! '$(DESTDIR)$(prefix)/man/man1', '$(DESTDIR)$(prefix)/share/man'
end
man.mkpath
bin.mkpath
lib.mkpath
include.mkpath
system "make", "-C", "libraries/liblmdb", "install", "prefix=#{prefix}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment