From 608e26e38a8a56764759d2dc0b07f98fa69a9d03 Mon Sep 17 00:00:00 2001 From: Philippe Schommers Date: Thu, 1 Nov 2018 13:16:25 +0100 Subject: [PATCH] Move RocksDB to a Git Submodule --- .gitmodules | 3 + README.md | 18 +- binding.gyp | 2 +- deps/rocksdb/rocksdb | 1 + deps/rocksdb/rocksdb.gyp | 386 +++++++++++++++++++++++++++++++++++++++ scripts/build-version.js | 21 +++ 6 files changed, 428 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 deps/rocksdb/rocksdb create mode 100644 deps/rocksdb/rocksdb.gyp create mode 100644 scripts/build-version.js diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..8184b83a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "deps/rocksdb/rocksdb"] + path = deps/rocksdb/rocksdb + url = https://github.com/facebook/rocksdb.git diff --git a/README.md b/README.md index 47c50ccf..0063754f 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,27 @@ There are multiple ways you can find help in using LevelDB in Node.js: See the [contribution guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details. +### Git Submodules + +This project uses Git Submodules. This means that you should clone it recursively if you're planning on working on it: + +```bash +$ git clone --recurse-submodules https://github.com/Level/leveldown.git +``` + +Alternatively, you can initalize submodules inside the cloned folder: + +```bash +$ git submodule update --init --recursive +``` + ### Windows A large portion of the Windows support comes from code by [Krzysztof Kowalczyk](http://blog.kowalczyk.info/) [@kjk](https://twitter.com/kjk), see his Windows LevelDB port [here](http://code.google.com/r/kkowalczyk-leveldb/). If you're using LevelUP on Windows, you should give him your thanks! ## Prebuilt Binaries -`rocksdb` uses `prebuild` and `prebuild-install` for handling prebuilt binaries. See [this list](https://github.com/Level/rocksdb/releases) of supported prebuilt platform binaries. When installing rocksdb `prebuild-install` will install prebuilt binaries from GitHub if they exist and fallback to a compile step if they don't. +`rocksdb` uses `prebuild` and `prebuild-install` for handling prebuilt binaries. See [this list](https://github.com/Level/rocksdb/releases) of supported prebuilt platform binaries. When installing rocksdb `prebuild-install` will install prebuilt binaries from GitHub if they exist and fallback to a compile step if they don't. If you are working on `rocksdb` and want to re-compile the C++ code it's enough to do `npm install`. @@ -72,4 +86,4 @@ Copyright © 2012-present `rocksdb` [contributors](https://github.com/level/ `rocksdb` builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors to the LevelDB fork by Facebook. LevelDB and Snappy are both issued under the [New BSD Licence](http://opensource.org/licenses/BSD-3-Clause). -[level-badge]: http://leveldb.org/img/badge.svg +[level-badge]: http://leveldb.org/img/badge.svg \ No newline at end of file diff --git a/binding.gyp b/binding.gyp index 98b48d9a..043823a8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -52,7 +52,7 @@ }] ] , "dependencies": [ - "<(module_root_dir)/deps/leveldb/leveldb.gyp:leveldb" + "<(module_root_dir)/deps/rocksdb/rocksdb.gyp:rocksdb" ] , "include_dirs" : [ "