diff --git a/srcpkgs/lmdb-devel b/srcpkgs/lmdb-devel
new file mode 120000
index 0000000000..d26baf46fe
--- /dev/null
+++ b/srcpkgs/lmdb-devel
@@ -0,0 +1 @@
+lmdb
\ No newline at end of file
diff --git a/srcpkgs/lmdb/patches/install.patch b/srcpkgs/lmdb/patches/install.patch
new file mode 100644
index 0000000000..7c8d604d27
--- /dev/null
+++ b/srcpkgs/lmdb/patches/install.patch
@@ -0,0 +1,17 @@
+--- libraries/liblmdb/Makefile.orig	2013-12-08 09:17:29.298223935 +0100
++++ libraries/liblmdb/Makefile	2013-12-08 09:18:54.841750719 +0100
+@@ -35,10 +35,10 @@ PROGS	= $(IPROGS) mtest mtest2 mtest3 mt
+ all:	$(ILIBS) $(PROGS)
+ 
+ install: $(ILIBS) $(IPROGS) $(IHDRS)
+-	for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done
+-	for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done
+-	for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
+-	for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/man/man1; done
++	for f in $(IPROGS); do install -Dm755 $$f $(DESTDIR)$(prefix)/bin/$$f; done
++	for f in $(ILIBS); do install -Dm644 $$f $(DESTDIR)$(prefix)/lib/$$f; done
++	for f in $(IHDRS); do install -Dm644 $$f $(DESTDIR)$(prefix)/include/$$f; done
++	for f in $(IDOCS); do install -Dm644 $$f $(DESTDIR)$(prefix)/share/man/man1/$$f; done
+ 
+ clean:
+ 	rm -rf $(PROGS) *.[ao] *.so *~ testdb
diff --git a/srcpkgs/lmdb/template b/srcpkgs/lmdb/template
new file mode 100644
index 0000000000..04c056afcd
--- /dev/null
+++ b/srcpkgs/lmdb/template
@@ -0,0 +1,40 @@
+# Template file for 'lmdb'
+pkgname=lmdb
+version=0.9.10
+revision=1
+short_desc="Lightning Memory-Mapped Database Manager"
+maintainer="Juan RP <xtraeme@gmail.com>"
+license="OpenLDAP 2.8 license"
+homepage="http://symas.com/mdb/"
+
+do_fetch() {
+	git clone -b LMDB_${version} git://gitorious.org/mdb/mdb.git lmdb-${version}
+}
+
+do_build() {
+	cd libraries/liblmdb
+	make XCFLAGS="$CFLAGS" CC="$CC"
+}
+
+do_install() {
+	cd libraries/liblmdb
+	make DESTDIR=${DESTDIR} prefix=/usr install
+
+	vinstall LICENSE 644 usr/share/licenses/lmdb
+	vinstall COPYRIGHT 644 usr/share/licenses/lmdb
+}
+
+lmdb-devel_package() {
+	short_desc+=" - development files"
+	depends="lmdb>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+	}
+}
+
+lmdb_package() {
+	pkg_install() {
+		vmove all
+	}
+}