git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1156555 13f79535-47bb-0310-9956-ffa450edef68
284 lines
10 KiB
Text
Executable file
284 lines
10 KiB
Text
Executable file
# 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 a fresh MacOS 10.6.7
|
|
# system.
|
|
|
|
# Display commands as they are executed
|
|
set -x
|
|
|
|
# Build and install in the current directory
|
|
build=`pwd`
|
|
|
|
# Install core dev tools missing on MacOS
|
|
|
|
# Install and use GCC 4.6, required for c++0x
|
|
#curl -OL http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz
|
|
#sudo tar -xf $build/gcc-snwleo-intel-bin.tar.gz -C /
|
|
|
|
# Install pkg-config
|
|
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 HTTP server
|
|
svn co -r 1051230 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x
|
|
cd apr-1.4.x
|
|
./buildconf
|
|
./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.10-alpha.tar.gz
|
|
tar xzf httpd-2.3.10-alpha.tar.gz
|
|
cd httpd-2.3.10
|
|
./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.x-bin --with-expat=$build/expat-2.0.1-bin --with-pcre=$build/pcre-8.12-bin --prefix=$build/httpd-2.3.10-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build libevent
|
|
curl -OL http://www.monkey.org/~provos/libevent-2.0.12-stable.tar.gz
|
|
tar xzf libevent-2.0.12-stable.tar.gz
|
|
cd libevent-2.0.12-stable
|
|
./configure --prefix=$build/libevent-2.0.12-stable-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build Memcached
|
|
curl -OL http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
|
|
tar xzf memcached-1.4.5.tar.gz
|
|
cd memcached-1.4.5
|
|
./configure --with-libevent=$build/libevent-2.0.12-stable-bin --prefix=$build/memcached-1.4.5-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://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 --without-libidn
|
|
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 SpiderMonkey
|
|
curl -OL http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.5.tar.gz
|
|
tar xzf js185-1.0.0.tar.gz
|
|
cd js-1.8.5/js/src
|
|
./configure --prefix=$build/js-1.8.5-bin
|
|
make
|
|
make install
|
|
ln -s $build/js-1.8.5-bin/lib/libmozjs185.dylib $build/js-1.8.5-bin/lib/libmozjs.dylib
|
|
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 HTML Tidy
|
|
cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy
|
|
cd tidy
|
|
sh build/gnuauto/setup.sh
|
|
./configure --prefix=$build/htmltidy-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build Libopkele
|
|
git clone git://github.com/jsdelfino/libopkele.git
|
|
cd libopkele
|
|
mkdir aclocal.d
|
|
cp $build/pkg-config-0.25-bin/share/aclocal/pkg.m4 aclocal.d
|
|
./autogen.bash
|
|
./configure --prefix=$build/libopkele-bin OPENSSL_CFLAGS=-I/usr/include OPENSSL_LIBS=-lssl --with-curl=$build/curl-7.19.5-bin --with-expat=$build/expat-2.0.1-bin --with-htmltidy=$build/htmltidy-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build Mod_auth_openid
|
|
git clone git://github.com/jsdelfino/mod_auth_openid.git
|
|
cd mod_auth_openid
|
|
./autogen.sh
|
|
./configure --prefix=$build/mod-auth-openid-bin CXXFLAGS="-I$build/pcre-8.12-bin/include" --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.10-bin --with-curl=$build/curl-7.19.5-bin --with-pcre=$build/pcre-8.12-bin --with-libopkele=$build/libopkele-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.19.5-bin/include" CURL_LIBS="-L$build/curl-7.19.5-bin/lib -R$build/curl-7.19.5-bin/lib -lcurl"
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build mod_security
|
|
curl -OL http://cdnetworks-us-1.dl.sourceforge.net/project/mod-security/modsecurity-apache/2.6.0/modsecurity-apache_2.6.0.tar.gz
|
|
tar xzf modsecurity-apache_2.6.0.tar.gz
|
|
cd modsecurity-apache_2.6.0
|
|
./configure --prefix=$build/modsecurity-apache-2.6.0-bin --with-apxs=$build/httpd-2.3.10-bin/bin/apxs --with-apr=$build/apr-1.4.x-bin/bin/apr-2-config --with-apu=$build/apr-1.4.x-bin/bin/apr-2-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.19.5-bin --with-pcre=$build/pcre-8.12-bin LIBS="-L$build/expat-2.0.1-bin/lib -R$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://cdnetworks-us-1.dl.sourceforge.net/project/mod-security/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.0.tar.gz
|
|
tar xzf modsecurity-crs_2.2.0.tar.gz
|
|
cp -R $build/modsecurity-crs_2.2.0/base_rules $build/modsecurity-apache-2.6.0-bin
|
|
cp -R $build/modsecurity-crs_2.2.0/optional_rules $build/modsecurity-apache-2.6.0-bin
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Build Apache Libcloud
|
|
curl -OL http://archive.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.4.2.tar.bz2
|
|
tar xjf apache-libcloud-incubating-0.4.2.tar.bz2
|
|
cd apache-libcloud-incubating-0.4.2
|
|
python setup.py build
|
|
python setup.py install --home $build/libcloud-0.4.2-bin
|
|
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 CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.10-bin --with-memcached=$build/memcached-1.4.5-bin --with-tinycdb=$build/tinycdb-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.0-bin
|
|
make
|
|
make install
|
|
if [ "$?" != "0" ]; then
|
|
exit $?
|
|
fi
|
|
cd $build
|
|
|
|
# Create src archive
|
|
tar czf tuscany-sca-cpp-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin autoconf-2.13 autoconf-2.13-bin autoconf-2.13.tar.gz curl-7.19.5 curl-7.19.5-bin curl-7.19.5.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz htmltidy-bin httpd-2.3.10 httpd-2.3.10-alpha.tar.gz httpd-2.3.10-bin libcloud-0.4.2-bin libevent-2.0.12-stable libevent-2.0.12-stable-bin libevent-2.0.12-stable.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.5 memcached-1.4.5-bin memcached-1.4.5.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.0 modsecurity-apache-2.6.0-bin modsecurity-apache_2.6.0.tar.gz modsecurity-crs_2.2.0 modsecurity-crs_2.2.0.tar.gz nuvem pcre-8.12 pcre-8.12-bin pcre-8.12.zip pkg-config-0.25 pkg-config-0.25-bin pkg-config-0.25.tar.gz tidy tinycdb tinycdb-bin tracemonkey-bin tracemonkey-e4364736e170 tracemonkey-e4364736e170.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin
|
|
|
|
# Create bin archive
|
|
tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.x-bin curl-7.19.5-bin expat-2.0.1-bin htmltidy-bin httpd-2.3.10-bin libcloud-0.4.2-bin libevent-2.0.12-stable-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.5-bin mod-auth-openid-bin modsecurity-apache-2.6.0-bin nuvem/nuvem-parallel pcre-8.12-bin tinycdb-bin tracemonkey-bin tuscany-sca-cpp tuscany-sca-cpp-bin
|
|
|