forked from decryp2kanon/sugarmaker
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-armv7l.sh
executable file
·51 lines (43 loc) · 1.49 KB
/
build-armv7l.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# try on virtualbox ubuntu 16.04
# https://lxadm.com/Static_compilation_of_cpuminer
# CLEAN
make distclean || echo clean
rm -f config.status
# DEPENDS
## OPENSSL
# wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz
# tar -xvzf openssl-1.1.0g.tar.gz
# cd openssl-1.1.0g/
# ./config no-shared
# make -j$(nproc)
# sudo make install
# cd ..
## CURL
# wget https://github.com/curl/curl/releases/download/curl-7_57_0/curl-7.57.0.tar.gz
# tar -xvzf curl-7.57.0.tar.gz
# cd curl-7.57.0/
# .buildconf | grep "buildconf: OK"
# ./configure --disable-shared | grep "Static=yes"
# make -j$(nproc)
# sudo make install
# cd ..
# BUILD
./autogen.sh
# CFLAGS="-Wall -O2 -fomit-frame-pointer" ./configure
# ./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static -I/usr/local/lib/ -L/usr/local/lib/libcrypto.a" LIBS="-lssl -lcrypto -lz -lpthread -ldl" CFLAGS="-DCURL_STATICLIB" --with-crypto
./configure --with-curl="/usr/local/" --with-crypto="/usr/local/" CFLAGS="-Wall -O2 -fomit-frame-pointer" LDFLAGS="-static" LIBS="-ldl -lz"
make
strip -s sugarmaker
# CHECK STATIC
file sugarmaker | grep "statically linked"
# PACKAGE
RELEASE=sugarmaker-v2.5.0-sugar4-armv7l
rm -rf $RELEASE
mkdir $RELEASE
cp ./mining-script/sh/*.sh $RELEASE/
cp sugarmaker $RELEASE/
# SIGN
zip -X $RELEASE/$RELEASE.zip $RELEASE/*
sha256sum $RELEASE/$RELEASE.zip > $RELEASE/$RELEASE
gpg --digest-algo sha256 --clearsign $RELEASE/$RELEASE
rm $RELEASE/$RELEASE && cat $RELEASE/$RELEASE.asc