-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·104 lines (81 loc) · 2.35 KB
/
bootstrap.sh
File metadata and controls
executable file
·104 lines (81 loc) · 2.35 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#! /bin/sh
### Install-Script for third-party libraries
ROOT_UID="0"
#Check if run as root
if [ `whoami` != root ]; then
echo "Please run this script as root or using sudo"
exit
fi
echo "Installing third party libraries"
## Installing Boost Library
echo "Installing Boost.."
BOOST_DIR="./boost_1_53_0"
if [ ! -d "$BOOST_DIR" ]; then
echo "Fetching Boost C++ Library"
wget http://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.gz
tar xzvf boost_1_53_0.tar.gz
rm boost_1_53_0.tar.gz
cd ./boost_1_53_0
./bootstrap.sh
./b2 install --prefix=/usr/local
cd ..
echo "Boost installation finished."
else
echo "Boost already downloaded."
echo "To download Boost again please delete the ccns/boost_* folder."
echo "Press [Enter] key to continue.."
read dummy < /dev/tty
fi
## End Boost
## Installing Crypto++
echo "Installing Crypto++"
CRYPTO_DIR="./crypto++"
if [ ! -d "$CRYPTO_DIR" ]; then
wget http://prdownloads.sourceforge.net/cryptopp/cryptopp562.zip
unzip cryptopp562.zip -d ./crypto++
rm cryptopp562.zip
cd ./crypto++
# edit config to build static and dynmaic lib
line="# CXXFLAGS += -fPIC"
rep="CXXFLAGS += -fPIC"
sed -i "s/${line}/${rep}/g" ~/ccns/crypto++/GNUmakefile
# edit config to build without debug symbols
line="CXXFLAGS = -DNDEBUG -g -O2"
rep="CXXFLAGS = -DNDEBUG -O2"
sed -i "s/${line}/${rep}/g" ~/ccns/crypto++/GNUmakefile
make libcryptopp.a libcryptopp.so cryptest.exe
make install PREFIX=/usr/local
cd ..
echo "Crypto++ installation finished."
else
echo "Crypto++ already downloaded."
echo "To download Crypto++ again please delete the ccns/boost_* folder."
echo "Press [Enter] key to continue.."
read dummy < /dev/tty
fi
## End Crypto ++
## Installing libXml2
echo "Installing libXml2"
LIBXML_DIR="libxml2-2.9.1"
if [ ! -d "$LIBXML_DIR" ]; then
wget https://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz
tar xzvf libxml2-2.9.1.tar.gz
rm libxml2-2.9.1.tar.gz
cd ./libxml2-2.9.1
./autogen.sh --prefix=/usr/local
./configure
make
make install
cd ..
echo "libXml2 installation finished."
else
echo "libXml2 already downloaded."
echo "To download libXml2 again please delete the ccns/libxml* folder."
echo "Press [Enter] key to continue.."
read dummy < /dev/tty
fi
## End libXml2
##finally calling ldconfig
echo "Calling ldconfig.."
ldconfig
echo "Install-Script finished."