-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (25 loc) · 926 Bytes
/
build.sh
File metadata and controls
executable file
·31 lines (25 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env sh
set -e
set -x
BUILD_DEPS="git ca-certificates \
gcc g++ autoconf automake make libtool pkgconf \
curl-dev jansson-dev uthash-dev ncurses-dev libusb-dev libevent-dev libgcrypt-dev linux-headers"
RUNTIME_DEPS="ca-certificates libcurl jansson uthash ncurses libusb libevent"
apk add --no-cache ${RUNTIME_DEPS}
apk add --no-cache ${BUILD_DEPS}
# fix for ccan
mkdir -p /usr/include/sys
echo '#include <unistd.h>' > /usr/include/sys/unistd.h
# TODO: --shallow-submodules
git clone --depth=100 --recurse-submodules https://github.com/TheBiggerGuy/bfgminer.git
cd bfgminer
./autogen.sh
./configure --disable-other-drivers --enable-gridseed --enable-scrypt --without-libmicrohttpd
make -j 2
make install
cd ../
rm -rf bfgminer
# clean up build system
apk del ${BUILD_DEPS}
# ensure you have the runtime dep and they where not removed with the dev deps
apk add --no-cache ${RUNTIME_DEPS}