magick777

ubuntu-genoil

Oct 8th, 2016
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.74 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Ensure we have the prerequisites.
  4.  
  5. REQS="software-properties-common git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential libjsonrpccpp-stub0 libjsonrpccpp-tools libminiupnpc-dev libminiupnpc10 libcryptopp-dev";
  6.  
  7. function install_deps {
  8. apt-get update
  9. apt-get -y install software-properties-common git cmake libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential libjsonrpccpp-stub0 libjsonrpccpp-tools libminiupnpc-dev libminiupnpc10
  10. add-apt-repository -y ppa:ethereum/ethereum
  11. apt-get update
  12. apt-get -y install libcryptopp-dev
  13. }
  14.  
  15. echo "checking dependencies..."
  16. for pkg in $REQS; do
  17.     installed="`dpkg -l $pkg | grep ^ii | awk {'print $3'}`";
  18.     [ ! -z "$installed" ] && echo "found $pkg version $installed" || install_deps;
  19. done;
  20.  
  21. # May as well work in shared memory. Fast as hell, and impermanent.
  22. # On a system with all prerequisites, the below is all that was needed.
  23. # Installs to /usr/local/bin/ethminer
  24.  
  25. THREADS=$(($(cat /proc/cpuinfo | grep processor | wc -l)+1));
  26.  
  27. cd /dev/shm
  28. rm -rf cpp-ethereum
  29. git clone https://github.com/Genoil/cpp-ethereum/
  30. cd cpp-ethereum/
  31. cmake -DBUNDLE=miner -DETHASHCL=1 -DETHASHCUDA=0 -DCMAKE_CXX_FLAGS="-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Wno-error=parentheses -Wno-parentheses -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-but-set-variable -pedantic -DSHAREDLIB -fPIC -O3 -march=native -DNDEBUG -DETH_RELEASE"
  32. make -j$THREADS && make install
  33. `which ethminer` --version
Advertisement
Add Comment
Please, Sign In to add comment