forked from Tencent/phxrpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·80 lines (54 loc) · 1.38 KB
/
build.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
set -e # exit immediately on error
set -x # display all commands
mkdir -p etc
mkdir -p sbin
mkdir -p third_party
cp ./Makefile.third_party third_party/Makefile
cd third_party;
if [ ! -f ../sbin/redis-server ]; then
if [ ! -f 3.2.3.tar.gz ]; then
wget https://github.com/antirez/redis/archive/3.2.3.tar.gz
fi
tar zxvf 3.2.3.tar.gz
cd redis-3.2.3
make
cp src/redis-server ../../sbin/
cp redis.conf ../../etc/
cd ..
fi
if [ ! -f hiredis/libhiredis.a ]; then
if [ ! -f hiredis/Makefile ]; then
git clone https://github.com/redis/hiredis.git
fi
cd hiredis
make static
cd ..
fi
if [ ! -f r3c/libr3c.a ]; then
if [ ! -f r3c/r3c.cpp ]; then
git clone https://github.com/eyjian/r3c.git
fi
make
fi
if [ ! -f protobuf/bin/protoc ]; then
if [ ! -f protobuf-cpp-3.0.0.tar.gz ]; then
wget https://github.com/google/protobuf/releases/download/v3.0.0/protobuf-cpp-3.0.0.tar.gz
fi
tar zxvf protobuf-cpp-3.0.0.tar.gz
cd protobuf-3.0.0
./configure --prefix=`pwd`/../protobuf
make -j2
make install
cd ../
fi
if [ ! -f easyloggingpp/easylogging++.h ]; then
if [ ! -f 9.84.tar.gz ]; then
wget https://github.com/easylogging/easyloggingpp/archive/9.84.tar.gz
fi
tar zxvf 9.84.tar.gz
mkdir -p easyloggingpp
cp easyloggingpp-9.84/src/easylogging++.h easyloggingpp
fi
cd ..
make
exit $?