-
Notifications
You must be signed in to change notification settings - Fork 9
/
build-linux.bash
executable file
·63 lines (56 loc) · 2.98 KB
/
build-linux.bash
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
#!/bin/bash
source build-linux-env.bash
# Deploy
# Copy dependencies
read -rsp $'Press any key to run "deployment"'
if [ $ARCH = "i686" ]; then
echo "no logic yet..."
# cp /usr/lib/i386-linux-gnu/libstdc++.so.6 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libgcc_s.so.1 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libc.so.6 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libpthread.so.0 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libdl.so.2 $OCS_DEPLOY_DIR_PATH/server/
# cp /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/librt.so.1 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libglib-2.0.so.0 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/i386-linux-gnu/libm.so.6 $OCS_DEPLOY_DIR_PATH/server/
# cp /lib/ld-linux.so.2 $OCS_DEPLOY_DIR_PATH/server/ld.so
# cp /lib/i386-linux-gnu/libpcre.so.3 $OCS_DEPLOY_DIR_PATH/server/
elif [ $ARCH = "x86_64" ]; then
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libgcc_s.so.1 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libc.so.6 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libpthread.so.0 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libm.so.6 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libz.so.1 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libdl.so.2 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/librt.so.1 $OCS_DEPLOY_DIR_PATH/server/
cp /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libglib-2.0.so.0 $OCS_DEPLOY_DIR_PATH/server/
cp /lib/x86_64-linux-gnu/libpcre.so.3 $OCS_DEPLOY_DIR_PATH/server/
cp /lib64/ld-linux-x86-64.so.2 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libQt5Core.so.5 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libQt5Network.so.5 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libQt5WebSockets.so.5 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libicui18n.so.56 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libicuuc.so.56 $OCS_DEPLOY_DIR_PATH/server/
cp $OCS_QTDIR_X86_64/lib/libicudata.so.56 $OCS_DEPLOY_DIR_PATH/server/
fi
cp $BASEDIR/projects/videoserver/res/scripts/videoserver.sh $OCS_DEPLOY_DIR_PATH/server/
cp $BASEDIR/projects/videoserver/res/scripts/videoserver-initd.sh $OCS_DEPLOY_DIR_PATH/server/
cp $BASEDIR/projects/videoserver/res/default.ini $OCS_DEPLOY_DIR_PATH/server/default.ini.orig
cp $BASEDIR/projects/videoserver/res/logging.conf $OCS_DEPLOY_DIR_PATH/server/logging.conf.orig
cp -rf $BASEDIR/projects/serverstatus $OCS_DEPLOY_DIR_PATH/server/
# Copy LDD dependencies (DO NOT USE YET!)
if false; then
AppBasePath=$OCS_DEPLOY_DIR_PATH/server
AppFilePath=$OCS_DEPLOY_DIR_PATH/server/videoserver
echo "Collecting the shared library dependencies for $AppFilePath..."
deps=$(ldd $AppFilePath | awk 'BEGIN{ORS=" "}$1\
~/^\//{print $1}$3~/^\//{print $3}'\
| sed 's/,$/\n/')
for dep in $deps
do
echo "Copy $dep to $AppBasePath"
done
fi