blob: 17fcf18fd546ab5043a4430717d40deca9fd96e7 (
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
# 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 a complete distribution, the required system tools and libraries, the
# runtime dependencies and the Tuscany SCA runtime on Mac OS X 10.8 / Xcode 4.4.
# Display commands as they are executed
set -x
# Build and install in the current directory
build=`pwd`
# Install autotools as they're not included in Xcode 4.4 anymore
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar xzf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=$build/automake-1.11-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
export PATH=$PATH:$build/automake-1.11-bin
curl -OL http://ftpmirror.gnu.org/automake/automake-1.11.tar.gz
tar xzf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=$build/automake-1.11-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz
tar xzf libtool-2.4.tar.gz
cd libtool-2.4
./configure --prefix=$build/automake-1.11-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Install pkg-config as it's not included in Xcode
curl -OL http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz
tar xzf pkg-config-0.25.tar.gz
cd pkg-config-0.25
./configure --prefix=$build/pkg-config-0.25-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Libexpat
curl -OL http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
mv download expat-2.0.1.tar.gz
tar xzf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=$build/expat-2.0.1-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Libprce
curl -OL http://downloads.sourceforge.net/project/pcre/pcre/8.12/pcre-8.12.zip
unzip pcre-8.12.zip
cd pcre-8.12
./configure --prefix=$build/pcre-8.12-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Apache APR and APR util
curl -OL http://archive.apache.org/dist/apr/apr-1.4.6.tar.gz
tar xzf apr-1.4.6.tar.gz
cd apr-1.4.6
./buildconf
./configure --prefix=$build/apr-1.4.6-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
curl -OL http://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz
tar xzf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-util-1.4.1.patch
patch -p0 <apr-util-1.4.1.patch
./buildconf --with-apr=$build/apr-1.4.6
./configure --with-apr=$build/apr-1.4.6-bin --with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-util-1.4.1-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build HTTP server
curl -OL http://archive.apache.org/dist/httpd/httpd-2.4.3.tar.gz
tar xzf httpd-2.4.3.tar.gz
cd httpd-2.4.3
./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-pcre=$build/pcre-8.12-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.4.3-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build libevent
curl -OL http://www.monkey.org/~provos/libevent-2.0.13-stable.tar.gz
tar xzf libevent-2.0.13-stable.tar.gz
cd libevent-2.0.13-stable
./configure --prefix=$build/libevent-2.0.13-stable-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Memcached
curl -OL http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
tar xzf memcached-1.4.13.tar.gz
cd memcached-1.4.13
autoreconf --install
./configure --with-libevent=$build/libevent-2.0.13-stable-bin --prefix=$build/memcached-1.4.13-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Tinycdb
git clone git://github.com/jsdelfino/tinycdb.git
cd tinycdb
make all shared
make prefix=$build/tinycdb-bin install-all install-sharedlib
install_name_tool -id $build/tinycdb-bin/lib/libcdb.so.1 $build/tinycdb-bin/lib/libcdb.so.1
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Libcurl
curl -OL http://c-ares.haxx.se/download/c-ares-1.9.1.tar.gz
tar xzf c-ares-1.9.1.tar.gz
cd c-ares-1.9.1
./configure --prefix=$build/c-ares-1.9.1-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
curl -OL http://curl.haxx.se/download/curl-7.28.0.tar.gz
tar xzf curl-7.28.0.tar.gz
cd curl-7.28.0
curl -OL http://curl.haxx.se/ca/cacert.pem
mkdir -p $build/curl-7.28.0-bin/lib
cp cacert.pem $build/curl-7.28.0-bin/lib/cacert.pem
./configure --enable-ares=$build/c-ares-1.9.1-bin --with-ca-bundle=$build/curl-7.28.0-bin/lib/cacert.pem --prefix=$build/curl-7.28.0-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Libxml2
curl -OL 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 Jansson
curl -OL http://www.digip.org/jansson/releases/jansson-2.4.tar.gz
tar xzf jansson-2.4.tar.gz
cd jansson-2.4
curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/jansson-2.4.patch
patch -p0 <jansson-2.4.patch
./configure --prefix=$build/jansson-2.4-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Libstrophe
git clone git://github.com/jsdelfino/libstrophe.git
cd libstrophe
export ACLOCALFLAGS="-I $build/pkg-config-0.25-bin/share/aclocal"
./bootstrap.sh
unset ACLOCALFLAGS
./configure --prefix=$build/libstrophe-bin --with-expat=$build/expat-2.0.1-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Liboauth
curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz
tar xzf liboauth-0.9.1.tar.gz
cd liboauth-0.9.1
./configure PKG_CONFIG="$build/pkg-config-0.25-bin/bin/pkg-config" --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.28.0-bin/include" CURL_LIBS="-L$build/curl-7.28.0-bin/lib -lcurl"
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build mod_security
curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-apache_2.6.6.tar.gz
tar xzf modsecurity-apache_2.6.6.tar.gz
cd modsecurity-apache_2.6.6
./configure --prefix=$build/modsecurity-apache-2.6.6-bin --with-apxs=$build/httpd-2.4.3-bin/bin/apxs --with-apr=$build/apr-1.4.6-bin/bin/apr-1-config --with-apu=$build/apr-util-1.4.1-bin/bin/apu-1-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.28.0-bin --with-pcre=$build/pcre-8.12-bin LIBS="-L$build/expat-2.0.1-bin/lib" CFLAGS="-I$build/pcre-8.12-bin/include"
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-crs_2.2.5.tar.gz
tar xzf modsecurity-crs_2.2.5.tar.gz
cd modsecurity-crs_2.2.5
#curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch
#patch -p0 <modsecurity-crs_2.2.2.patch
cp -R base_rules $build/modsecurity-apache-2.6.6-bin
cp -R optional_rules $build/modsecurity-apache-2.6.6-bin
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build PostgreSQL and PgBouncer
curl -OL http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.gz
tar xzf postgresql-9.1.2.tar.gz
cd postgresql-9.1.2
./configure --prefix=$build/postgresql-9.1.2-bin --enable-thread-safety
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd contrib/pgbench
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
curl -OL http://pgfoundry.org/frs/download.php/3197/pgbouncer-1.5.tar.gz
tar xzf pgbouncer-1.5.tar.gz
cd pgbouncer-1.5
./configure --prefix=$build/pgbouncer-1.5-bin --with-libevent=$build/libevent-2.0.13-stable-bin
make
cp install-sh doc
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Python
curl -OL http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar xzf Python-2.7.3.tgz
cd Python-2.7.3
./configure --prefix=$build/python-2.7.3-bin --enable-shared --with-system-expat=$build/expat-2.0.1-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Apache Nuvem
git clone git://git.apache.org/nuvem.git
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Build Tuscany SCA
git clone git://git.apache.org/tuscany-sca-cpp.git
cd tuscany-sca-cpp
./bootstrap
./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.28.0-bin --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-httpd=$build/httpd-2.4.3-bin --with-memcached=$build/memcached-1.4.13-bin --with-tinycdb=$build/tinycdb-bin --with-jansson=$build/jansson-2.4-bin --enable-threads --enable-python --with-python=$build/python-2.7.3-bin --enable-opencl --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin
make
make install
if [ "$?" != "0" ]; then
exit $?
fi
cd $build
# Create src archive
tar czf tuscany-sca-cpp-1.0-src.tar.gz apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin autoconf-2.13 autoconf-2.13-bin autoconf-2.13.tar.gz c-ares-1.9.1 c-ares-1.9.1-bin c-ares-1.9.1.tar.gz curl-7.28.0 curl-7.28.0-bin curl-7.28.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz httpd-2.4.3 httpd-2.4.3.tar.gz httpd-2.4.3-bin jansson-2.4-bin jansson-2.4 jansson-2.4.tar.gz libevent-2.0.13-stable libevent-2.0.13-stable-bin libevent-2.0.13-stable.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz modsecurity-apache_2.6.6 modsecurity-apache-2.6.0-bin modsecurity-apache_2.6.0.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nuvem pcre-8.12 pcre-8.12-bin pcre-8.12.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz tinycdb tinycdb-bin tuscany-sca-cpp tuscany-sca-cpp-bin
# Create bin archive
tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin c-ares-1.9.1-bin curl-7.28.0-bin expat-2.0.1-bin httpd-2.4.3-bin jansson-2.4-bin libevent-2.0.13-stable-bin liboauth-0.9.1-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin modsecurity-apache-2.6.6-bin nuvem/nuvem-parallel pcre-8.12-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin tinycdb-bin tuscany-sca-cpp tuscany-sca-cpp-bin
|