diff --git a/23-lmdb.sh b/23-lmdb.sh new file mode 100644 index 0000000..7f163ea --- /dev/null +++ b/23-lmdb.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="LMDB_0.9.31.tar.gz" +DNL="https://github.com/LMDB/lmdb/archive/LMDB_0.9.31.tar.gz" +SHA256="dd70a8c67807b3b8532b3e987b0a4e998962ecc28643e1af5ec77696b081c9b0" + +[ -d lmdb-LMDB_0.9.31 ] && rm -rf lmdb-LMDB_0.9.31 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -zxf ${TARBALL} && cd lmdb-LMDB_0.9.31 + +cd libraries/liblmdb +make +if [ $? -ne 0 ]; then + echo "Failed building LMDB. Sorry." + exit 1 +fi +sed -i 's| liblmdb.a||' Makefile + +echo +echo "As the root user:" +echo +echo " cd lmdb-LMDB_0.9.31/libraries/liblmdb" +echo " make prefix=/usr install" diff --git a/README.md b/README.md index 40bc468..e9afc75 100644 --- a/README.md +++ b/README.md @@ -215,4 +215,12 @@ Runtime requires make-ca. * Status: Script Untested * Note: Note yet built with DANE support, or Trousers support. +Dependency Twenty-Three: LMDB +----------------------------- + +Justification: Needed for Cyrus SASL. No build dependencies outside of LFS. + +* Script: [`23-lmdb.sh`](23-lmdb.sh) +* Status: Script Untested +