-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh.save
executable file
·55 lines (38 loc) · 1.34 KB
/
install.sh.save
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
52
53
54
55
#!/bin/bash
# rebuild headless sidecoind (no sidecoin-qt)
set -e
trap "exit" INT
if [ -f "Makefile" ]; then
echo "Making clean..."
make clean > /dev/null 2>&1
fi
echo "Installing Berkeley DB 4.8..."
cd src
if [ ! -d "bdb" ]; then
if [ ! -f "db-4.8.30.NC.tar.gz" ]; then
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
# echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
fi
mkdir -p bdb
tar -xvf db-4.8.30.NC.tar.gz -C bdb --strip-components=1 > /dev/null 2>&1
cd bdb/build_unix
mkdir -p build
export BDB_PREFIX=$(pwd)/build
../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX > /dev/null 2>&1
make install
cd ../..
echo "Done."
else
export BDB_PREFIX=$(pwd)/bdb/build_unix/build
echo "Local Berkeley DB installation found."
fi
echo "Checking Berkeley DB version..."
g++ bdb_version_check.cpp -I${BDB_PREFIX}/include/ -L${BDB_PREFIX}/lib/ -o bdb_version_check
./bdb_version_check
cd ..
srcdir="$(dirname $0)"
cd "$srcdir"
autoreconf --install --force --prepend-include=${BDB_PREFIX}/include/
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2 -ggdb -O0" LDFLAGS="-L${BDB_PREFIX}/lib/" USE_UPNP= --enable-debug --with-gui #--disable-wallet --disable-tests
make
strip src/sidecoind