Skip to content

Commit

Permalink
INDY-1205: add build procedure of rocksdb package to build-3rd-partie…
Browse files Browse the repository at this point in the history
…s script. (#583)

Signed-off-by: Sergey Shilov <[email protected]>
  • Loading branch information
sergey-shilov authored and ashcherbakov committed Mar 22, 2018
1 parent e91bf0f commit 8734243
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
7 changes: 1 addition & 6 deletions build-scripts/ubuntu-1604/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ RUN apt-get update -y && apt-get install -y \
apt-transport-https \
ca-certificates

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 && \
echo "deb https://repo.sovrin.org/test/deb xenial rocksdb" >> /etc/apt/sources.list && \
apt-get update

RUN apt-get update -y && apt-get install -y \
# common stuff
git \
Expand All @@ -27,8 +23,7 @@ RUN apt-get update -y && apt-get install -y \
libbz2-dev \
zlib1g-dev \
liblz4-dev \
libsnappy-dev \
rocksdb=5.8.8
libsnappy-dev

RUN pip3 install -U setuptools

Expand Down
19 changes: 19 additions & 0 deletions build-scripts/ubuntu-1604/build-3rd-parties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ set -x

OUTPUT_PATH=${1:-.}

function build_rocksdb_deb {
VERSION=$1
VERSION_TAG="rocksdb-$VERSION"

git clone https://github.com/evernym/rocksdb.git /tmp/rocksdb
cd /tmp/rocksdb
git checkout $VERSION_TAG
EXTRA_CFLAGS="-fPIC" EXTRA_CXXFLAGS="-fPIC" ./build_tools/make_package.sh $VERSION
cp ./package/rocksdb_${VERSION}_amd64.deb $OUTPUT_PATH
# Install it in the system as it is needed by python-rocksdb.
make install
cd -
rm -rf /tmp/rocksdb
}

function build_from_pypi {
PACKAGE_NAME=$1

Expand Down Expand Up @@ -43,6 +58,9 @@ function build_from_pypi {
rm ${PREREM_TMP}
}

# Build rocksdb at first
build_rocksdb_deb 5.8.8

build_from_pypi ioflo 1.5.4
build_from_pypi orderedset 2.0
build_from_pypi base58 0.2.4
Expand All @@ -56,4 +74,5 @@ build_from_pypi intervaltree 2.1.0
build_from_pypi portalocker 0.5.7
build_from_pypi sortedcontainers 1.5.7
build_from_pypi setuptools 38.5.2
# TODO: add libsnappy dependency for python-rocksdb package
build_from_pypi python-rocksdb 0.6.9

0 comments on commit 8734243

Please sign in to comment.