Last active
June 17, 2018 17:07
-
-
Save stiucsib86/9eca3c814d5af2308d6d57f227d65f7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To run script | |
# 1. in background which immune to hangups (meaning you can exit terminal safely), | |
# 2. and write output to "nohup.out" file | |
# | |
# nohup ./privcy-raspberry-pi.sh & | |
# Prerequisite: Install required tools | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install git qt5-default qt5-qmake qtbase5-dev-tools build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev autoconf openssl libssl-dev libevent-dev libminiupnpc-dev | |
sudo apt-get install autotools-dev autoconf automake bsdmainutils build-essential git | |
sudo apt-get install libtool libssl-dev libboost-all-dev pkg-config | |
sudo apt-get install libqrencode-dev libminiupnpc-dev libevent-dev libcap-dev libseccomp-dev | |
# Clone the latest version and checkout raspberry branch | |
git clone --recursive https://github.com/privcycoin/privcy.git | |
# git clone --recursive https://github.com/stiucsib86/privcy.git | |
cd privcy | |
# Prepare directory & paths | |
PRIVCY_ROOT=$(pwd) | |
BDB_PREFIX="${PRIVCY_ROOT}/db4" | |
mkdir -p $BDB_PREFIX | |
# Fetch the sources | |
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' | |
# Check the sources. The below command must return db-4.8.30.NC.tar.gz: OK | |
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c | |
# Unpack the sources | |
tar -xzvf db-4.8.30.NC.tar.gz | |
# Build the library and install to our prefix | |
cd db-4.8.30.NC/build_unix/ | |
# Do a static build so that it can be embedded into the executable | |
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX | |
make install | |
# Configure PRiVCY to use our own-built instance of BDB | |
cd $PRIVCY_ROOT | |
./autogen.sh | |
./configure --disable-tests --without-gui LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" | |
# Fixes "msse2" and "mstackrealign" error | |
cd $PRIVCY_ROOT | |
sed -i 's/-msse2 -mstackrealign//g' src/Makefile | |
# Clone OpenSSL sources from GitHub and checkout the 1.1.0h version | |
git clone https://github.com/openssl/openssl.git | |
cd openssl | |
git checkout OpenSSL_1_1_0h | |
./config | |
make depend | |
make | |
sudo make install | |
# Finally, go back to your privcy source-root directory and execute the build process by entering make | |
cd $PRIVCY_ROOT | |
make clean | |
make | |
# Copy DeepOnion Daemon to Home folder | |
cd $PRIVCY_ROOT | |
cp src/PRiVCYd ~/PRiVCYd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment