-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall-dependencies.sh
executable file
·120 lines (103 loc) · 3.62 KB
/
install-dependencies.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/bash
set -e
# install the following libraries using bash in linux
# boost, eigen, gsl, jellyfish, htslib, spline
Dir=$(pwd)
mkdir -p ${Dir}/external
# check pkg-config path
mkdir -p ${Dir}/external/pkgconfig
export PKG_CONFIG_PATH="${Dir}/external/pkgconfig/:${PKG_CONFIG_PATH}"
# install boost
echo "Install Boost library..."
cd ${Dir}/external
wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
tar -zxf boost_1_69_0.tar.gz
cd ${Dir}/external/boost_1_69_0
mkdir -p Installation
./bootstrap.sh --with-libraries=iostreams --prefix=${Dir}/external/boost_1_69_0/Installation
./b2 install
# install eigen
if $(pkg-config --exists eigen3); then
echo "EIGEN library exists."
else
echo "Install Eigen library..."
cd ${Dir}/external
wget -O eigen-3.3.7.tar.gz http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
mkdir -p eigen-3.3.7
tar -xzf 3.3.7.tar.gz -C eigen-3.3.7 --strip-components=1
cd eigen-3.3.7
mkdir -p Installation
mkdir -p build_dir && cd build_dir
cmake -DCMAKE_INSTALL_PREFIX=${Dir}/external/eigen-3.3.7/Installation ../
make install
cp $(find ${Dir}/external/eigen-3.3.7/Installation -name *.pc) ${Dir}/external/pkgconfig/
fi
# install gsl
if $(pkg-config --exists gsl); then
echo "GSL library exists."
else
echo "Install GSL library..."
cd ${Dir}/external
wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.5.tar.gz
tar -zxf gsl-2.5.tar.gz
cd ${Dir}/external/gsl-2.5/
mkdir -p Installation
./configure --prefix=${Dir}/external/gsl-2.5/Installation
make
make install
cp $(find ${Dir}/external/gsl-2.5/Installation -name *.pc) ${Dir}/external/pkgconfig/
fi
# install htslib
if $(pkg-config --exists htslib); then
echo "htslib library exists."
else
echo "Install htslib..."
cd ${Dir}/external
wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2
tar -xjvf htslib-1.9.tar.bz2
cd ${Dir}/external/htslib-1.9/
mkdir -p Installation
./configure --prefix=${Dir}/external/htslib-1.9/Installation --enable-plugins=no --enable-libcurl=no --enable-s3=no
make
make install
cp $(find ${Dir}/external/htslib-1.9/Installation -name *.pc) ${Dir}/external/pkgconfig/
fi
# install jellyfish
if $(pkg-config --exists jellyfish-2.0); then
echo "JELLYFISH library exists."
else
echo "Install JELLYFISH..."
cd ${Dir}/external
wget https://github.com/gmarcais/Jellyfish/releases/download/v2.2.10/jellyfish-2.2.10.tar.gz
tar -zxf jellyfish-2.2.10.tar.gz
cd ${Dir}/external/jellyfish-2.2.10/
mkdir -p Installation
./configure --prefix=${Dir}/external/jellyfish-2.2.10/Installation
make
make install
cp $(find ${Dir}/external/jellyfish-2.2.10/Installation -name *.pc) ${Dir}/external/pkgconfig/
fi
# install clp
if $(pkg-config --exists clp); then
echo "clp library exists."
else
echo "Install clp..."
cd ${Dir}/external
wget https://www.coin-or.org/download/source/Clp/Clp-1.17.5.tgz
tar -zxf Clp-1.17.5.tgz
cd Clp-1.17.5/
mkdir -p Installation
./configure -C --prefix=${Dir}/external/Clp-1.17.5/Installation --enable-static
make
make install
cp $(find ${Dir}/external/Clp-1.17.5/Installation -name *.pc) ${Dir}/external/pkgconfig/
fi
echo
echo "****************************************"
echo "* Installation of dependencies done *"
echo "****************************************"
echo
echo "To configure with CLP, run: ./configure PKG_CONFIG_PATH=${PKG_CONFIG_PATH} BOOST_ROOT=${Dir}/external/boost_1_69_0/Installation"
echo "To configure with gurobi, run: ./configure PKG_CONFIG_PATH=${PKG_CONFIG_PATH} --with-gurobi=<path to gurobi linux64 folder> BOOST_ROOT=${Dir}/external/boost_1_69_0/Installation"
echo
echo "Then compile and install with: make install"