-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_mono-2.8.sh
91 lines (71 loc) · 1.83 KB
/
install_mono-2.8.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
#!/bin/bash -e
TOPDIR=$(pwd)
BUILDDIR=$TOPDIR/build
PREFIX=/opt/mono-2.8
export PATH=$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
echo "updating existing system"
sudo apt-get update
sudo apt-get upgrade -y
echo "installing prerequisites"
sudo apt-get install -y build-essential libc6-dev g++ gcc libglib2.0-dev pkg-config git-core apache2 apache2-threaded-dev bison gettext autoconf automake libtool libpango1.0-dev libatk1.0-dev libgtk2.0-dev libtiff4-dev libgif-dev libglade2-dev
mkdir -p $BUILDDIR
echo
echo "downloading mono packages"
echo
cd $BUILDDIR
PACKAGES=("mono-2.8.2"
"libgdiplus-2.8.1"
"gtk-sharp-2.12.10"
"xsp-2.8.2"
"mod_mono-2.8")
URLS=("http://ftp.novell.com/pub/mono/sources/mono/mono-2.8.2.tar.bz2"
"http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.8.1.tar.bz2"
"http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.10.tar.bz2"
"http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.8.2.tar.bz2"
"http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.8.tar.bz2")
echo Downloading
count=${#PACKAGES[@]}
index=0
while [ "$index" -lt "$count" ]
do
#only download it if you don't already have it.
if [ ! -f "${PACKAGES[$index]}.tar" ]
then
wget "${URLS[@]:$index:1}"
fi
if [ -f "${PACKAGES[$index]}.tar.bz2" ]
then
bunzip2 -df "${PACKAGES[$index]}.tar.bz2"
fi
if [ -f "${PACKAGES[$index]}.tar" ]
then
tar -xvf "${PACKAGES[$index]}.tar"
fi
let "index = $index + 1"
done
echo
echo "building mono packages"
echo
for i in "${PACKAGES[@]}"
do
cd $BUILDDIR/$i
./configure --prefix=$PREFIX
make
if [ "$i" = ${PACKAGES[0]} ]
then
sudo make install
fi
done
echo
echo "installing mono packages"
echo
for i in "${PACKAGES[@]:1}"
do
cd $BUILDDIR/$i
sudo make install
done
cd $BUILDDIR
echo
echo "done"