Skip to content

Instantly share code, notes, and snippets.

@jameswhite
Last active December 25, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameswhite/7049001 to your computer and use it in GitHub Desktop.
Save jameswhite/7049001 to your computer and use it in GitHub Desktop.
#!/bin/bash
# start with wheezy
apt-get install -y autoconf build-essential git-core file libncurses5-dev libudev-dev libtool pkg-config libcurl4-openssl-dev screen ocl-icd-opencl-dev
# The version of libusb that ships with wheezy won't work, so we statically link against this one (don't make install it)
[ ! -d /opt/local/src ] && mkdir -p /opt/local/src; cd /opt/local/src
wget -qO libusb-1.0.16-rc10.tar.bz2 "http://freyr.websages.com/libusb-1.0.16-rc10.tar.bz2"
tar xvjf libusb-1.0.16-rc10.tar.bz2
cd libusb-1.0.16-rc10 && ./configure && make && export MYLIBDIR=$(pwd)
echo "[${MYLIBDIR}]"
[ ! -d /var/cache/git ] && mkdir -p /var/cache/git ; cd /var/cache/git
git clone https://github.com/ckolivas/cgminer
cd /var/cache/git/cgminer/ && ./autogen.sh
LIBUSB_CFLAGS="-I${MYLIBDIR}/libusb" LIBUSB_LIBS="${MYLIBDIR}/libusb/.libs/libusb-1.0.a -ludev" ./configure --enable-bflsc --enable-icarus
make && make install > install.out 2>install.err
# (
# cd /opt/local/src; [ -d cgminer-3.4.3 ] && rm -fr cgminer-3.4.3; tar xvzf cgminer-3.4.3.tar.gz;
# ( cd cgminer-3.4.3 ; LIBUSB_CFLAGS="-I/opt/local/src/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="/opt/local/src/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev" ./configure --enable-bflsc --enable-icarus )
# )
cgminer -o "http://mint.bitminter.com" -u jameswhite_skrs0006 -p blergh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment