summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Moody <moody20@llnl.gov>2015-09-22 11:59:09 -0700
committerAdam Moody <moody20@llnl.gov>2015-09-22 11:59:09 -0700
commit3ade141829bc382cd7d50d02d79967e78d0de147 (patch)
tree8b9451c5b781891c7a948fa72e7768d610f473b2
parent30acc6f2f04beb56ef67af385cc8543ceeca82af (diff)
downloadspack-3ade141829bc382cd7d50d02d79967e78d0de147.tar.gz
spack-3ade141829bc382cd7d50d02d79967e78d0de147.tar.bz2
spack-3ade141829bc382cd7d50d02d79967e78d0de147.tar.xz
spack-3ade141829bc382cd7d50d02d79967e78d0de147.zip
add leveldb package
-rw-r--r--var/spack/packages/leveldb/package.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/packages/leveldb/package.py b/var/spack/packages/leveldb/package.py
new file mode 100644
index 0000000000..da68a9cbcb
--- /dev/null
+++ b/var/spack/packages/leveldb/package.py
@@ -0,0 +1,29 @@
+import os
+import glob
+from spack import *
+
+class Leveldb(Package):
+ """LevelDB is a fast key-value storage library written at Google
+ that provides an ordered mapping from string keys to string values."""
+
+ homepage = "https://github.com/google/leveldb"
+ url = "https://github.com/google/leveldb/archive/v1.18.tar.gz"
+
+ version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0')
+
+ depends_on("snappy")
+
+ def install(self, spec, prefix):
+ make()
+
+ mkdirp(prefix.include)
+ mkdirp(prefix.lib)
+
+ cp = which('cp')
+
+ # cp --preserve=links libleveldb.* prefix/lib
+ args = glob.glob('libleveldb.*')
+ args.append(prefix + '/lib')
+ cp('--preserve=links', *args)
+
+ cp('-r', 'include/leveldb', prefix + '/include')