Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Ensure we have the prerequisites.
- 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";
- function install_deps {
- apt-get update
- 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
- add-apt-repository -y ppa:ethereum/ethereum
- apt-get update
- apt-get -y install libcryptopp-dev
- }
- echo "checking dependencies..."
- for pkg in $REQS; do
- installed="`dpkg -l $pkg | grep ^ii | awk {'print $3'}`";
- [ ! -z "$installed" ] && echo "found $pkg version $installed" || install_deps;
- done;
- # May as well work in shared memory. Fast as hell, and impermanent.
- # On a system with all prerequisites, the below is all that was needed.
- # Installs to /usr/local/bin/ethminer
- THREADS=$(($(cat /proc/cpuinfo | grep processor | wc -l)+1));
- cd /dev/shm
- rm -rf cpp-ethereum
- git clone https://github.com/Genoil/cpp-ethereum/
- cd cpp-ethereum/
- 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"
- make -j$THREADS && make install
- `which ethminer` --version
Advertisement
Add Comment
Please, Sign In to add comment