diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-09-19 16:45:34 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-09-19 16:45:34 +0300 |
| commit | 3cc318eb5d848099eacf9d1fe4cd5ac669dbfe16 (patch) | |
| tree | 65c636debbc4f1f3187fd6469da0bd4ea55fc934 /get_libwallet_api.sh | |
| parent | 6e5f5e1ded66d8712517cf29e1ddf718212f02dd (diff) | |
| download | monzero-gui-3cc318eb5d848099eacf9d1fe4cd5ac669dbfe16.tar.gz monzero-gui-3cc318eb5d848099eacf9d1fe4cd5ac669dbfe16.tar.xz monzero-gui-3cc318eb5d848099eacf9d1fe4cd5ac669dbfe16.zip | |
build: adjusted with bitmonero->monero renamings;
build: temporary disabled link with 'libunwind' due Ubuntu issues
Diffstat (limited to 'get_libwallet_api.sh')
| -rwxr-xr-x | get_libwallet_api.sh | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/get_libwallet_api.sh b/get_libwallet_api.sh index 881e0ace..cbd4f021 100755 --- a/get_libwallet_api.sh +++ b/get_libwallet_api.sh @@ -1,8 +1,8 @@ #!/bin/bash -BITMONERO_URL=https://github.com/monero-project/bitmonero.git -BITMONERO_BRANCH=master +MONERO_URL=https://github.com/monero-project/monero.git +MONERO_BRANCH=master # thanks to SO: http://stackoverflow.com/a/20283965/4118915 CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) pushd $(pwd) @@ -10,51 +10,55 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" INSTALL_DIR=$ROOT_DIR/wallet -BITMONERO_DIR=$ROOT_DIR/bitmonero +MONERO_DIR=$ROOT_DIR/monero -if [ ! -d $BITMONERO_DIR ]; then - git clone --depth=1 $BITMONERO_URL $BITMONERO_DIR --branch $BITMONERO_BRANCH --single-branch +if [ ! -d $MONERO_DIR ]; then + git clone --depth=1 $MONERO_URL $MONERO_DIR --branch $MONERO_BRANCH --single-branch else - cd $BITMONERO_DIR; - git checkout $BITMONERO_BRANCH + cd $MONERO_DIR; + git checkout $MONERO_BRANCH git pull; fi -echo "cleaning up existing bitmonero build dir, libs and includes" -rm -fr $BITMONERO_DIR/build -rm -fr $BITMONERO_DIR/lib -rm -fr $BITMONERO_DIR/include +echo "cleaning up existing monero build dir, libs and includes" +rm -fr $MONERO_DIR/build +rm -fr $MONERO_DIR/lib +rm -fr $MONERO_DIR/include -mkdir -p $BITMONERO_DIR/build/release -pushd $BITMONERO_DIR/build/release +mkdir -p $MONERO_DIR/build/release +pushd $MONERO_DIR/build/release if [ "$(uname)" == "Darwin" ]; then # Do something under Mac OS X platform - cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../.. + cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then # Do something under GNU/Linux platform - cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../.. + PLATFORM="Linux" + cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../.. elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then # Do something under Windows NT platform - cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../.. + cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../.. elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then # Do something under Windows NT platform - cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../.. + cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../.. fi -pushd $BITMONERO_DIR/build/release/src/wallet +pushd $MONERO_DIR/build/release/src/wallet make -j$CPU_CORE_COUNT make install -j$CPU_CORE_COUNT popd # unbound is one more dependency. can't be merged to the wallet_merged # since filename conflict (random.c.obj) -pushd $BITMONERO_DIR/build/release/external/unbound -make -j$CPU_CORE_COUNT -make install -j$CPU_CORE_COUNT -popd +# for Linux, we use libunbound from repository, so we don't need to build it +if [ $PLATFORM != "Linux" ]; then + pushd $MONERO_DIR/build/release/external/unbound + make -j$CPU_CORE_COUNT + make install -j$CPU_CORE_COUNT + popd +fi popd |
