buildframework/helium/hlm
author wbernard
Wed, 23 Jun 2010 16:25:55 +0300
branchhelium-7.0.x
changeset 592 3215c239276a
parent 179 d8ac696cc51f
child 217 0f5e3a7fb6af
permissions -rw-r--r--
Creating helium-7.0.x branch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
#!/bin/bash
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
# All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
# This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
# under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
# which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
# Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
# Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
# Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
# Description: 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
if [ ! $HELIUM_HOME ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
    export HELIUM_HOME=$(dirname $(readlink /proc/$$/fd/255))
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
# For nokia specific enviroment configurations.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
if [ -f $HELIUM_HOME/extensions/nokia/env.sh ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
    . $HELIUM_HOME/extensions/nokia/env.sh
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
export LANG="en_US.UTF-8"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    28
export ANT_ARGS="-lib $HELIUM_HOME/extensions/nokia/external/antlibs -lib $HELIUM_HOME/extensions/nokia/external/helium-nokia-antlib/bin -lib $HELIUM_HOME/external/helium-antlib/bin -lib $HELIUM_HOME/external/antlibs -lib $HELIUM_HOME/tools/common/java/lib -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
PYTHON_VERSION=`python -c "import sys; print sys.version[:3]"`
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
PYTHON_VERSION2=$PYTHON_VERSION$HOSTTYPE
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
PYTHONLIB=$HELIUM_HOME/external/python/lib/linux/$PYTHON_VERSION2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    34
TEMP_PYTHONPATH="$PYTHONLIB:$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/tools/common/python/lib:$HELIUM_HOME/tools/common/python/scripts:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
if [ ! $PYTHONPATH ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
    export PYTHONPATH=$TEMP_PYTHONPATH
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
    export PYTHONPATH="$PYTHONPATH:$TEMP_PYTHONPATH"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
TEMP_JYTHONPATH="$HELIUM_HOME/external/python/lib/2.5/jython-2.5-py2.5.egg:$PYTHONPATH"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
if [ ! $JYTHONPATH ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
    export JYTHONPATH=$TEMP_JYTHONPATH
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
    export JYTHONPATH="$JYTHONPATH:$TEMP_JYTHONPATH"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
if [ ! $PERL5LIB ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
    PERL5LIB=$TEMP_PERL5LIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
    PERL5LIB="$PERL5LIB:$TEMP_PERL5LIB"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    56
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
if [ $HOST ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    59
    export COMPUTERNAME=$HOST
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    60
elif [ $HOSTNAME ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
    export COMPUTERNAME=$HOSTNAME
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
    export COMPUTERNAME=$(hostname)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
CWD=`pwd`
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    67
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
if [ ! -e "$PYTHONLIB" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
    mkdir $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
    cp $HELIUM_HOME/external/python/lib/linux/site.py $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
if [ ! -e "$PYTHONLIB/4Suite_XML-1.0.2.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    75
    tar xvfz $HELIUM_HOME/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    76
    cd $PYTHONLIB/4Suite-XML-1.0.2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    77
    python setup.py bdist_egg > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    78
    mv dist/*.egg $PYTHONLIB/4Suite_XML-1.0.2.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    79
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    80
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    81
if [ ! -e "$PYTHONLIB/lxml-1.3.6.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    82
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    83
    tar xvfz $HELIUM_HOME/external/python/lib/linux/lxml-1.3.6.tgz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    84
    cd $PYTHONLIB/lxml-1.3.6
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    85
    python setup.py bdist_egg > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    86
    mv dist/*.egg $PYTHONLIB/lxml-1.3.6.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    87
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    88
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    89
if [ ! -e "$PYTHONLIB/PyXML-0.8.4.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    90
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    91
    tar xvfz $HELIUM_HOME/external/python/lib/linux/PyXML-0.8.4.tar.gz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    92
    cd $PYTHONLIB/PyXML-0.8.4
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    93
    python setup.py bdist > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    94
    mv build/lib* $PYTHONLIB/PyXML-0.8.4.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    95
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    96
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    97
cd $CWD
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    98
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    99
export USERNAME=$USER
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   100
export SYMSEE_VERSION="not_in_use"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   101
export PID=$$
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   102
export TEMP="/tmp/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   103
if [ $JOB_ID ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   104
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER/$JOB_ID"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   105
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   106
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   107
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   108
export ANT_OPTS="-Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   109
export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   110
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   111
mkdir -p $HELIUM_CACHE_DIR
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   112
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   113
if [ ! $EPOCROOT ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   114
    export EPOCROOT="/"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   115
fi 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   116
exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$PYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $*