This repository has been archived by the owner on May 8, 2023. It is now read-only.
forked from AGProjects/python3-sipsimple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_dependencies.sh
executable file
·71 lines (59 loc) · 1.61 KB
/
get_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
#!/bin/bash
#
# Update PJSIP
#
cd deps
echo "Preparing PJSIP sources..."
if [ ! -f 2.10.tar.gz ]; then
echo Downloading PJSIP 2.10...
wget https://github.com/pjsip/pjproject/archive/2.10.tar.gz
if [ $? -eq 0 ]; then
echo "PJSIP downloaded"
else
echo Fail to download PJSIP
exit 1
fi
fi
tar xzf 2.10.tar.gz
if [ -d pjsip ]; then
rm -r pjsip
fi
mkdir pjsip
mv pjproject*/* ./pjsip/
#
# Update ZSRTP
#
# Clone latest version from github
if [ ! -d ZRTPCPP ]; then
echo Downloading ZRTP...
git clone https://github.com/wernerd/ZRTPCPP.git
if [ $? -eq 0 ]; then
echo "ZRTP downloaded"
cd ZRTPCPP
git checkout 6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03
cd ..
else
echo Fail to download ZRTP
exit 1
fi
fi
# Copy wrapper from old version to third_party/zsrtp/
echo "Preparing ZRTP sources..."
mkdir ./pjsip/third_party/zsrtp
cp -r zsrtp/include ./pjsip/third_party/zsrtp/
cp -r zsrtp/srtp ./pjsip/third_party/zsrtp/
cp -r zsrtp/build ./pjsip/third_party/build/zsrtp
# Copy new version to third_party/zsrtp/
mkdir ./pjsip/third_party/zsrtp/zrtp
cp -r ZRTPCPP/bnlib ./pjsip/third_party/zsrtp/zrtp/
cp -r ZRTPCPP/common ./pjsip/third_party/zsrtp/zrtp/
cp -r ZRTPCPP/cryptcommon ./pjsip/third_party/zsrtp/zrtp/
cp -r ZRTPCPP/srtp ./pjsip/third_party/zsrtp/zrtp/
cp -r ZRTPCPP/zrtp ./pjsip/third_party/zsrtp/zrtp/
cp ZRTPCPP/COPYING ./pjsip/third_party/zsrtp/zrtp/
cp ZRTPCPP/README.md ./pjsip/third_party/zsrtp/zrtp/
for p in patches/*.patch; do
echo "Applying patch $p"
cat $p | patch -p0 > /dev/null
done
cd - > /dev/null