Wouldn't it be a good idea to manually clone the leveldb subtree and use it for the compilation instead of always updating the leveldb/ directory in this repository? For better security, a commit hash from the other repo could be hard coded into the build system so the leveldb subtree repo can't be corrupted.
The downside would be that it would not be possible to compile offline but the DL process could be done at a very early stage like the configure