summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/ubuntu/ubuntu-install
blob: 978bffe27def9566054a9ba7adcb4cc1fd063176 (plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#  
#    http://www.apache.org/licenses/LICENSE-2.0
#    
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.

# Install the required system tools and libraries, the runtime dependencies and
# the Tuscany SCA runtime on a fresh Ubuntu Server 9.10 system.

# Display commands as they are executed
set -x

# Build and install in the current directory
build=`pwd`

# Install core dev tools
sudo apt-get -y install wget git-core autoconf automake libtool
if [ "$?" != "0" ]; then
    exit $?
fi

# Install GCC 4.5
mkdir -p gcc-4.5
cd gcc-4.5
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/cpp-4.5_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/fixincludes_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/g++-4.5_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/gcc-4.5_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/gcc-4.5-base_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/lib64gcc1_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/lib64gomp1_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/lib64mudflap0_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/lib64stdc++6_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libgcc1_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libgomp1_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libmudflap0-4.5-dev_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libmudflap0_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libstdc++6_4.5.0-1_i386.deb
wget http://ftp.debian.org/debian/pool/main/g/gcc-4.5/libstdc++6-4.5-dev_4.5.0-1_i386.deb
sudo dpkg -i *.deb
cd $build

# Build Apache HTTP server
sudo apt-get -y install libssl-dev
if [ "$?" != "0" ]; then
    exit $?
fi
wget http://www.apache.org/dist/httpd/httpd-2.2.15.tar.gz
tar xzf httpd-2.2.15.tar.gz
cd httpd-2.2.15
./configure --enable-ssl --enable-proxy --enable-rewrite --with-included-apr --with-mpm=prefork --prefix=$build/httpd-2.2.15-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Memcached
sudo apt-get install libevent-dev
if [ "$?" != "0" ]; then
    exit $?
fi
wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
tar xzf memcached-1.4.4.tar.gz
cd memcached-1.4.4
./configure --prefix=$build/memcached-1.4.4-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Tinycdb
wget http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz
tar xzf tinycdb_0.77.tar.gz
cd tinycdb-0.77
make
make prefix=$build/tinycdb-0.77-bin install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Libcurl
wget http://curl.haxx.se/download/curl-7.19.5.tar.gz
tar xzf curl-7.19.5.tar.gz
cd curl-7.19.5
./configure --prefix=$build/curl-7.19.5-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Libxml2
wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.7.tar.gz
tar xzf libxml2-sources-2.7.7.tar.gz
cd libxml2-2.7.7
./configure --prefix=$build/libxml2-2.7.7-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build TraceMonkey
sudo apt-get -y install autoconf2.13
if [ "$?" != "0" ]; then
    exit $?
fi
wget -O tracemonkey-e4364736e170.tar.gz http://hg.mozilla.org/tracemonkey/archive/e4364736e170.tar.gz
tar xzf tracemonkey-e4364736e170.tar.gz
cd tracemonkey-e4364736e170/js/src
autoconf2.13
./configure --prefix=$build/tracemonkey-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Install Google AppEngine SDK
wget http://googleappengine.googlecode.com/files/google_appengine_1.3.2.zip
unzip google_appengine_1.3.2.zip

# Build Apache Axis2/C
sudo apt-get -y install pkg-config
if [ "$?" != "0" ]; then
    exit $?
fi
wget http://www.apache.org/dist/ws/axis2-c/1_6_0/axis2c-src-1.6.0.tar.gz
tar xzf axis2c-src-1.6.0.tar.gz
cd axis2c-src-1.6.0
./configure --enable-libxml2 --enable-openssl --with-apache2=$build/httpd-2.2.15-bin/include --prefix=$build/axis2c-1.6.0-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
export AXIS2C_HOME=$build/axis2c-1.6.0-bin
cd samples
./configure --prefix=$build/axis2c-1.6.0-bin --with-axis2=$build/axis2c-1.6.0-bin/include/axis2-1.6.0
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Apache Qpid/C++
sudo apt-get -y install libboost-dev libboost-program-options-dev libboost-filesystem-dev uuid-dev
if [ "$?" != "0" ]; then
    exit $?
fi
sudo -s ln -s /usr/lib/libboost_program_options-mt.so /usr/lib/libboost_program_options.so
sudo -s ln -s /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_filesystem.so
wget http://www.apache.org/dist/qpid/0.6/qpid-cpp-0.6.tar.gz
tar xzf qpid-cpp-0.6.tar.gz
cd qpidc-0.6
./configure --prefix=$build/qpidc-0.6-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Libstrophe
sudo apt-get -y install check
if [ "$?" != "0" ]; then
    exit $?
fi
git clone git://code.stanziq.com/libstrophe
cd libstrophe
git submodule init
git submodule update
aclocal
automake --add-missing --foreign --copy
autoconf
./configure --prefix=$build/libstrophe-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build
mkdir -p $build/libstrophe-bin/include
cp $build/libstrophe/*.h $build/libstrophe-bin/include
cp $build/libstrophe/src/*.h $build/libstrophe-bin/include

# Install Apache Vysper
sudo apt-get -y install openjdk-6-jdk
if [ "$?" != "0" ]; then
    exit $?
fi
wget http://www.apache.org/dist/mina/vysper/0.5/vysper-0.5-bin.tar.gz
tar xzf vysper-0.5-bin.tar.gz
if [ "$?" != "0" ]; then
    exit $?
fi

# Build PostgreSQL
sudo apt-get -y install libreadline-dev
if [ "$?" != "0" ]; then
    exit $?
fi
wget http://wwwmaster.postgresql.org/redir/198/f/source/9.0alpha4/postgresql-9.0alpha4.tar.gz
tar xzf postgresql-9.0alpha4.tar.gz
cd postgresql-9.0alpha4
./configure --prefix=$build/postgresql-9.0-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Build Tuscany SCA
git clone git://git.apache.org/tuscany-sca-cpp
cd tuscany-sca-cpp
cp etc/git-exclude .git/info/exclude
./bootstrap
./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --enable-threads --enable-python --enable-gae --with-gae=$build/google_appengine --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.5 --enable-sqldb --with-pgsql=$build/postgresql-9.0-bin
make
make install
if [ "$?" != "0" ]; then
    exit $?
fi
cd $build

# Create bin archive
tar czf tuscany-sca-cpp-1.0.0-SNAPSHOT.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin axis2c-1.6.0-bin libxml2-2.7.7-bin curl-7.19.5-bin httpd-2.2.15-bin tracemonkey-bin google_appengine libstrophe-bin memcached-1.4.4-bin tinycdb-0.77-bin qpidc-0.6-bin vysper-0.5 postgresql-9.0-bin