Signed-off-by: geraldo netto <geraldone...@gmail.com>
---
 leveldb/GET      |  6 +++++-
 leveldb/Makefile | 10 ++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/leveldb/GET b/leveldb/GET
index 4534d0b..01b6560 100755
--- a/leveldb/GET
+++ b/leveldb/GET
@@ -3,6 +3,7 @@ set -e
 VERSION=1.15
 TARBALL=v$VERSION.tar.gz
 SRCDIR=leveldb-$VERSION
+LIBSNAPPY=/lib64/libsnappy.so.1
 wget -c https://github.com/google/leveldb/archive/$TARBALL
 rm -rf $SRCDIR leveldb
 tar zxf $TARBALL
@@ -17,5 +18,8 @@ cp -vf libleveldb.so.$VERSION ..
 cd ..
 
 mkdir -p ROOTFS/usr/lib
-cp libleveldb.so.$VERSION /lib64/libsnappy.so.1 ROOTFS/usr/lib
+if [ ! -f $LIBSNAPPY ]; then
+    LIBSNAPPY=/usr/lib/x86_64-linux-gnu/libsnappy.so.1
+fi
+cp libleveldb.so.$VERSION $LIBSNAPPY ROOTFS/usr/lib
 cp db_bench.so ROOTFS
diff --git a/leveldb/Makefile b/leveldb/Makefile
index 016807d..6b7ac12 100644
--- a/leveldb/Makefile
+++ b/leveldb/Makefile
@@ -1,8 +1,14 @@
 .PHONY: module
+VERSION = 1.15
+LIBSNAPPY = /lib64/libsnappy.so.1
+ifeq (,$(wildcard $(LIBSNAPPY)))
+    LIBSNAPPY = /usr/lib/x86_64-linux-gnu/libsnappy.so.1
+endif
+
 module: src
        echo '/db_bench.so: $${MODULE_DIR}/db_bench.so' > usr.manifest
-       echo '/usr/lib/libleveldb.so.1.15: $${MODULE_DIR}/libleveldb.so.1.15' 
>> usr.manifest
-       echo '/usr/lib/libsnappy.so.1: /lib64/libsnappy.so.1' >> usr.manifest
+       echo '/usr/lib/libleveldb.so.$(VERSION): 
$${MODULE_DIR}/libleveldb.so.$(VERSION)' >> usr.manifest
+       echo '/usr/lib/libsnappy.so.1: $(LIBSNAPPY)' >> usr.manifest
        : > bootfs.manifest
 
 .PHONY: src
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to