-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprep.sh
executable file
·106 lines (67 loc) · 2.3 KB
/
prep.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
#!/bin/bash
# (c) Andrey Streltsov <[email protected]>
# (c) ANSE 19 May 2015
# prerequisites
SKIP_MXE=0
echo "Installing system-wide dependencies.."
sudo apt-get install libgsf-1-dev uuid-dev autoconf automake autopoint bash bison bzip2 cmake flex gettext git g++ gperf intltool libffi-dev libtool libltdl-dev libssl-dev libxml-parser-perl make openssl patch perl pkg-config python ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 valac gtk-doc-tools gobject-introspection
CURRENT_DIR=`pwd`
if [ ! -d "dev" ]; then
mkdir dev
fi
echo "Installing MXE.."
cd ~
cd dev
if [ -d "./mxe" ]; then
rm -r mxe
fi
git clone http://github.com/mxe/mxe.git
echo "Will install MXE to /opt/mxe. Previous installation(if exists) will be moved to /opt/mxe.old
Anykey to continue, CTRL+D/C for stop script execution"
read
if [ -d "/opt/mxe" ]; then
echo ""
sudo mv /opt/mxe /opt/mxe.old
fi
#sudo mv ./mxe /opt
cd /opt/mxe
# MXE compiler settings
cp $CURRENT_DIR/patches/settings.mk /opt/mxe
make download-qt5 download-glib download-jansson download-pthreads download-glib download-libevent download-curl download-jansson download-openssl download-sqlite download-libevent -j 4
if [ ! -e "/opt/mxe/src/qtwebkit-1.patch" ]; then
echo "Adding qtwebkit patch to fix compilation error for shared target(bug exists on 19 May 2015)"
cp $CURRENT_DIR/patches/qtwebkit-1.patch /opt/mxe/src/
fi
#make qt5 qtwebkit glib jansson pthreads glib libevent curl jansson openssl sqlite libevent
#exit 0
echo "Prepearing MSITOOLS packages.."
cd ~/dev
if [ -d "./msitools-0.93" ]; then
rm -rf "./msitools-0.93"
fi
wget http://ftp.gnome.org/pub/GNOME/sources/msitools/0.93/msitools-0.93.tar.xz
tar xf msitools-0.93.tar.xz
rm msitools-0.93.tar.xz
if [ -d "./gcab" ]; then
rm -rf "./gcab"
fi
git clone git://git.gnome.org/gcab
cd gcab
./autogen.sh
make && sudo make install
cd ../
cd msitools-0.93
./autogen.sh
./configure --prefix=$CURRENT_DIR/msitools
# Patching msitools failety makefiles...
rm Makefile.am
cp $CURRENT_DIR/patches/msitools/Makefile.am .
rm tests/Makefile.in
cp $CURRENT_DIR/patches/msitools/tests/Makefile.am ./tests/
if [ -d "$CURRENT_DIR/msitools" ]; then
rm -r "$CURRENT_DIR/msitools"
fi
mkdir -p $CURRENT_DIR/msitools
make && make install
# All is Done
echo "Should be Ready for Seafile-Client Building"