123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #!/bin/bash
- Version=1.0
- Release=01/Jan/2021
- author=wareck@gmail.com
- Boost_v=1_67_0
- DB_v=4.8.30 # can be 4.8.30.NC or 4.8.30
- Miniupnpc_v=2.1
- echo -e "\n\e[95mSystem Check:\e[0m"
- update_me=0
- ntp_i=""
- pv_i=""
- gcc_i=""
- xz_i=""
- pixz_i=""
- pwgen_i=""
- xz_i=""
- zram_i=""
- swap_i=""
- echo -e -n "Check PV installed : "
- if ! [ -x "$(command -v pv)" ];then echo -e "[\e[91m NO \e[0m]" && pv_i="pv" && update_me=1;else echo -e "[\e[92m OK \e[0m]";fi
- echo -e -n "Check NTP installed : "
- if ! [ -x "$(command -v ntpd)" ];then echo -e "[\e[91m NO \e[0m]" && ntp_i="ntp" && update_me=1;else echo -e "[\e[92m OK \e[0m]";fi
- echo -e -n "Check PIXZ installed : "
- if ! [ -x "$(command -v pixz)" ];then echo -e "[\e[91m NO \e[0m]" && pixz_i="pixz libbz2-dev liblzma-dev libzip-dev zlib1g-dev" && update_me=1;else echo -e "[\e[92m OK \e[0m]";fi
- echo -e -n "Check PWGEN installed : "
- if ! [ -x "$(command -v pwgen)" ];then echo -e "[\e[91m NO \e[0m]" && pwgen_i="pwgen" && update_me=1;else echo -e "[\e[92m OK \e[0m]";fi
- if ! [ -x "$(command -v htop)" ];then htop_i="htop" && update_me=1;fi
- if [ $update_me = 1 ]
- then
- echo -e "\n\e[95mRaspberry update:\e[0m"
- sudo apt-get update
- sudo apt-get install aptitude -y
- sudo apt install pv python-dev build-essential $htop_i $ntp_i $pwgen_i $pixz_i $zram_i $swap_i -y
- sudo apt install libevent-dev libssl-dev autogen autoconf libtool pkg-config -y
- sudo sed -i -e "s/# set const/set const/g" /etc/nanorc
- fi
- echo -e "\n\e[95mDownload/Expand Boost Library:\e[0m"
- if ! [ -d $MyDir/boost_$Boost_v ]
- then
- wget -c -q --show-progress http://wareck.free.fr/crypto/okcash/boost_$Boost_v.tar.xz
- tar xfJ boost_$Boost_v.tar.xz --checkpoint=.500
- fi
- echo -e "Done."
- echo -e "\n\e[95mDonwload/Expand Miniupnpc Library:\e[0m"
- if ! [ -d $MyDir/miniupnpc-$Miniupnpc_v ]
- then
- wget -c -q --show-progress http://wareck.free.fr/crypto/okcash/miniupnpc-$Miniupnpc_v.tar.xz
- tar xfJ miniupnpc-$Miniupnpc_v.tar.xz --checkpoint=.1
- fi
- echo -e "Done."
- echo -e "\n\e[95mDownload/Expand db-4.8.30.NC Library:\e[0m"
- if ! [ -d $MyDir/db-$DB_v ]
- then
- wget -c -q --show-progress http://wareck.free.fr/crypto/okcash/db-$DB_v.tar.xz
- tar xfJ db-$DB_v.tar.xz --checkpoint=.100
- fi
- echo -e "Done."
- echo -e "\n\e[95mDownload OkCash $OKcash_v Source Code:\e[0m"
- git clone https://github.com/Bitcoin-ABC/secp256k1.git
- #git clone https://github.com/litecoincash-project/litecoincash.git
- echo -e "Done."
- echo -e "\n\e[95mBuild DB-$DB_v:\e[0m"
- if [ -f /usr/share/man/man3/miniupnpc.3.gz ]; then sudo rm /usr/share/man/man3/miniupnpc.3.gz; fi
- cd db-$DB_v
- cd build_unix
- ../dist/configure --enable-cxx
- make -j$(nproc)
- sudo make install
- sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so /usr/lib/ || true
- cd .. && cd ..
- echo -e "\n\e[95mBuild Boost $Boost_v:\e[0m"
- cd boost_$Boost_v
- ./bootstrap.sh
- sudo ./b2 --with-chrono --with-filesystem --with-program_options --with-system --with-thread --with-timer --with-test toolset=gcc variant=release link=static threading=multi runtime-link=static install
- cd ..
- echo -e "\n\e[95mBuild miniupnpc $Miniupnpc_v:\e[0m"
- cd miniupnpc-$Miniupnpc_v
- make -j$(nproc)
- sudo make install
- cd ..
- export CPATH="/usr/local/BerkeleyDB.4.8/include"
- export LIBRARY_PATH="/usr/local/BerkeleyDB.4.8/lib"
- cd secp256k1
- ./autogen.sh
- ./configure
- make
- sudo make install
- cd ..
- cd litecoincash
- ./autogen.sh
- ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" --disable-tests --disable-bench --disable-gui-test
- make
- sudo make install
|