-
Notifications
You must be signed in to change notification settings - Fork 16
/
install_libraries
executable file
·140 lines (122 loc) · 2.77 KB
/
install_libraries
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
#cryptopp
export CRYPTO_PP_DIR="./cryptopp560"
#no need to check anything since make will just see that nothing has changed
cd $CRYPTO_PP_DIR
make
cd ..
#zookeeper
export ZOOKEEPER_BIN="./zookeeper_install"
export ZOOKEEPER_DIR="./zookeeper-3.1.1"
if [ ! -d "$ZOOKEEPER_BIN" ]; then
mkdir -p $ZOOKEEPER_BIN
cd $ZOOKEEPER_DIR"/src/c"
./configure --prefix=$PWD"/../../../"$ZOOKEEPER_BIN && make && make install
cd ../../..
fi
#gmp (a dependency of sfslite)
export GMP_BIN="./gmp_install"
export GMP_DIR="./gmp-4.3.1"
if [ ! -d "$GMP_BIN" ]; then
mkdir -p $GMP_BIN
cd $GMP_DIR
./configure --prefix=$PWD"/../"$GMP_BIN && make && make install
if [ $? -ne 0 ]; then
cd ..
rmdir $GMP_BIN
exit 1
fi
cd ..
fi
#sfslite
export SFS_BIN="./sfs_install"
export SFS_DIR="./sfslite-1.2.7"
if [ ! -d "$SFS_BIN" ]; then
mkdir -p $SFS_BIN
cd $SFS_DIR
sh setup.gnu -f -i -s && ./configure --with-gmp=$PWD"/../"$GMP_BIN --prefix=$PWD"/../"$SFS_BIN && make && make install
if [ $? -ne 0 ]; then
cd ..
rmdir $SFS_BIN
exit 1
fi
cd ..
fi
#log4cpp
export LOG4CPP_BIN="./log4cpp_install"
export LOG4CPP_DIR="./log4cpp-1.0"
if [ ! -d "$LOG4CPP_BIN" ]; then
mkdir -p $LOG4CPP_BIN
cd $LOG4CPP_DIR
./configure --prefix=$PWD"/../"$LOG4CPP_BIN
if [ $? -ne 0 ]; then
echo "WARNING: configuring log4cpp returned non-zero status"
echo "If the error states: \"rm: conftest.dSYM: is a directory\" you can safely ignore it"
fi
make && make check && make install
if [ $? -ne 0 ]; then
cd ..
rmdir $LOG4CPP_BIN
exit 1
fi
cd ..
fi
#libconfig
export LIBCONFIG_BIN="./libconfig_install"
export LIBCONFIG_DIR="./libconfig-1.4.2"
if [ ! -d "$LIBCONFIG_BIN" ]; then
mkdir -p $LIBCONFIG_BIN
cd $LIBCONFIG_DIR
./configure --prefix=$PWD"/../"$LIBCONFIG_BIN && make && make check && make install
if [ $? -ne 0 ]; then
cd ..
rmdir $LIBCONFIG_BIN
exit 1
fi
cd ..
fi
#lighttpd
export LIGHTTPD_BIN="./lighttpd_install"
export LIGHTTPD_DIR="./lighttpd-1.4.26"
if [ ! -d "$LIGHTTPD_BIN" ]; then
mkdir -p $LIGHTTPD_BIN
cd $LIGHTTPD_DIR
./configure --prefix=$PWD"/../"$LIGHTTPD_BIN && make && make install
if [ $? -ne 0 ]; then
cd ..
rmdir $LIGHTTPD_BIN
exit 1
fi
cd ..
fi
#bdb
export BDB_BIN="./bdb_install"
export BDB_DIR="./db-5.0.21"
if [ ! -d "$BDB_BIN" ]; then
mkdir -p $BDB_BIN
cd $BDB_DIR/build_unix
../dist/configure --prefix=$PWD"/../../"$BDB_BIN && make && make install
if [ $? -ne 0 ]; then
cd ../..
rmdir $BDB_BIN
exit 1
fi
cd ../..
fi
cd $BDB_DIR/perl/BerkeleyDB
if [ ! -e "Makefile" ]; then
perl Makefile.PL
if [ $? -ne 0 ]; then
exit 1
fi
fi
make
if [ $? -ne 0 ]; then
exit 1
fi
export db=$PWD
cd ../../..
cd lighttpd_files
echo "#!/bin/bash" > perl_wrapper
echo "perl -I$db -I$db/blib/arch/auto/BerkeleyDB \$1" >> perl_wrapper
chmod 0755 perl_wrapper