aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJohn Hewson2013-08-05 11:57:57 -0700
committerAdam Vandenberg2013-08-07 07:50:08 -0700
commitf7df97dfec871a07c0c0555f8370deaed8119dc9 (patch)
treed0ca400e33051c4d0edebe3c84f5297a01bee581 /Library
parent87ffae14322422d5fcabd8e87b4381ce9c71c31c (diff)
downloadhomebrew-f7df97dfec871a07c0c0555f8370deaed8119dc9.tar.bz2
LMDB 2.4.35
LMDB is an ultra-fast, ultra-compact key-value data store developed by Symas for the OpenLDAP Project. Closes #21677. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/lmdb.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/Formula/lmdb.rb b/Library/Formula/lmdb.rb
new file mode 100644
index 000000000..7f70f220f
--- /dev/null
+++ b/Library/Formula/lmdb.rb
@@ -0,0 +1,36 @@
+require 'formula'
+
+class Lmdb < Formula
+ homepage 'http://symas.com/mdb/'
+ url 'ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.35.tgz'
+ sha1 'db02243150b050baac6a8ea4145ad73a1f6d2266'
+
+ 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! 'cp $(IPROGS) $(DESTDIR)$(prefix)/bin',
+ 'for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin/; done'
+ s.gsub! 'cp $(ILIBS) $(DESTDIR)$(prefix)/lib',
+ 'for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib/; done'
+ s.gsub! 'cp $(IHDRS) $(DESTDIR)$(prefix)/include',
+ 'for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include/; done'
+ # also fix the /share/man/man path as well
+ s.gsub! 'cp $(IDOCS) $(DESTDIR)$(prefix)/man/man1',
+ 'for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/share/man/; done'
+ end
+
+ man.mkpath
+ bin.mkpath
+ lib.mkpath
+ include.mkpath
+
+ cd 'libraries/liblmdb' do
+ system "make", "install", "prefix=#{prefix}"
+ end
+ end
+end