]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Update and implementation of script for new products
authormaintenance team <salome-mnt@opencascade.com>
Mon, 23 Mar 2009 09:04:58 +0000 (09:04 +0000)
committermaintenance team <salome-mnt@opencascade.com>
Mon, 23 Mar 2009 09:04:58 +0000 (09:04 +0000)
config_files/docutils-0.4.0.sh [new file with mode: 0755]
config_files/metis-4.0.sh
config_files/omniORB-4.1.3.sh [new file with mode: 0755]
config_files/scotch-4.0.sh
config_files/sphinx-0.5.sh [new file with mode: 0755]

diff --git a/config_files/docutils-0.4.0.sh b/config_files/docutils-0.4.0.sh
new file mode 100755 (executable)
index 0000000..2fc1d6f
--- /dev/null
@@ -0,0 +1,150 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : docutils-0.4.0.sh
+#  Created   : Thu Dec 18 12:01:00 2002
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2008 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version(){
+# It is not necessary to check version!
+return 0
+}
+
+print_env_bin(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONPATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin:\${PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR} ; python setup.py install --prefix=${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR}/bin; 
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2latex.py > _rst2latex.py
+mv -f _rst2latex.py rst2latex.py
+chmod a+x rst2latex.py
+ln -sf rst2latex.py rst2latex
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2html.py > _rst2html.py
+mv -f _rst2html.py rst2html.py
+chmod a+x rst2html.py
+ln -sf rst2html.py rst2html
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2newlatex.py > _rst2newlatex.py
+mv -f _rst2newlatex.py rst2newlatex.py
+chmod a+x rst2newlatex.py
+ln -sf rst2newlatex.py rst2newlatex
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2pseudoxml.py > _rst2pseudoxml.py
+mv -f _rst2pseudoxml.py rst2pseudoxml.py
+chmod a+x rst2pseudoxml.py
+ln -sf rst2pseudoxml.py rst2pseudoxml
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2s5.py > _rst2s5.py
+mv -f _rst2s5.py rst2s5.py
+chmod a+x rst2s5.py
+ln -sf rst2s5.py rst2s5
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2xml.py > _rst2xml.py
+mv -f _rst2xml.py rst2xml.py
+chmod a+x rst2xml.py
+ln -sf rst2xml.py rst2xml
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+cd ${PRODUCT_DIR}/bin; 
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2latex.py > _rst2latex.py
+mv -f _rst2latex.py rst2latex.py
+chmod a+x rst2latex.py
+ln -sf rst2latex.py rst2latex
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2html.py > _rst2html.py
+mv -f _rst2html.py rst2html.py
+chmod a+x rst2html.py
+ln -sf rst2html.py rst2html
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="docutils-0.4.0"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
+source ./common.sh
+$PROCEDURE 
index f4fc04f8a73a4042cdcfd7870f2a114ab2e7ef9d..8c5dccb3359578d797364c060db4e722556b3df9 100755 (executable)
@@ -78,6 +78,8 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make
 cp -rf Doc Graphs libmetis.a pmetis kmetis oemetis onmetis partdmesh partnmesh mesh2dual mesh2nodal graphchk ${PRODUCT_DIR}
 ( mkdir -p ${PRODUCT_DIR}/Lib && cp Lib/*.h ${PRODUCT_DIR}/Lib )
 
+cd ${PRODUCT_DIR};
+
 # remove sources and temporary files after building
 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
     test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
diff --git a/config_files/omniORB-4.1.3.sh b/config_files/omniORB-4.1.3.sh
new file mode 100755 (executable)
index 0000000..f5b63e1
--- /dev/null
@@ -0,0 +1,218 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : omniORB-4.1.3.sh
+#  Created   : Mon Feb 09 16:21:00 2009
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2009 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version()
+{
+if [ -z "${OMNIORBDIR}" ]; then
+   #echo "OMNIORBDIR doesn't set"
+   return 1
+fi
+python_version="`python -c 'import sys; print sys.version[:3]'`"
+check_lib_version libomniORB4.so.1.3 ${OMNIORBDIR}/lib
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version _omnipymodule.so.3.3 ${OMNIORBDIR}/lib/python${python_version}/site-packages
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version libCOSNotify4.so.0.1 ${OMNIORBDIR}/lib
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+check_lib_version notifd ${OMNIORBDIR}/bin
+if [ "$?" -ne "0" ]; then
+   return 1
+fi
+return 0
+}
+
+print_env_bin()
+{
+
+if [ `uname -m` = "x86_64" ] && [ -d ${PRODUCT_DIR}/lib64 ] ; then 
+    OMNI_LIB_PREFIX=64
+elif [ -d ${PRODUCT_DIR}/lib ] ; then 
+    OMNI_LIB_PREFIX=""
+else 
+    OMNI_LIB_PREFIX=64
+fi
+
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export OMNIORBDIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export OMNIORB_CONFIG=\${OMNIORBDIR}/.omniORB.cfg
+export PYTHONPATH=\${OMNIORBDIR}/lib${OMNI_LIB_PREFIX}:\${OMNIORBDIR}/lib${OMNI_LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\$OMNIORBDIR/bin:\$PATH
+export LD_LIBRARY_PATH=\$OMNIORBDIR/lib:\$LD_LIBRARY_PATH 
+##
+EOF
+if [ $PROCEDURE != "try_preinstalled" ] && [ -w ${PRODUCT_DIR} ] ; then
+    cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
+InitRef = NameService=corbaname::`hostname`:2810
+EOF
+fi
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_SRC_DIR}
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/omniORBpy-3.3.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${PRODUCT_SRC_DIR}
+
+if test `uname -m` = "x86_64" ; then
+    if [ -f patches/omniNotify-2.1-lib64.patch ] ; then
+       cp patches/omniNotify-2.1-lib64.patch ${PRODUCT_SRC_DIR}/omniNotify-2.1_SRC
+       ( cd ${PRODUCT_SRC_DIR}/omniNotify-2.1_SRC ; patch -p1 < omniNotify-2.1-lib64.patch )
+    fi
+fi
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+# install omniORB
+cd ${PRODUCT_SRC_DIR}/omniORB-4.1.3_SRC
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
+
+# install omniORBpy
+cd ${PRODUCT_SRC_DIR}/omniORBpy-3.3_SRC
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
+    ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
+
+# install omniNotify
+cd ${PRODUCT_SRC_DIR}/omniNotify-2.1_SRC
+
+mkdir build
+cd build
+
+check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
+    ../configure --prefix=${PRODUCT_DIR}
+
+GCC=`which gcc`
+cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
+used gcc=$GCC
+EOF
+check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
+check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
+
+cd ${PRODUCT_DIR}/bin
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
+mv -f _omniidl omniidl
+chmod a+x omniidl
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
+mv -f _omniidlrun.py omniidlrun.py
+chmod a+x omniidlrun.py
+
+cd ${PRODUCT_DIR}
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+ln -sf ${PRODUCT_DIR} ${INST_ROOT}/omni
+
+cd ${PRODUCT_DIR}/bin
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
+mv -f _omniidl omniidl
+chmod a+x omniidl
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
+mv -f _omniidlrun.py omniidlrun.py
+chmod a+x omniidlrun.py
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="omniORB-4.1.3"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
+source ./common.sh
+$PROCEDURE 
index b5e5e12ff1a3f1f4629efbfedb9fdee3f12efaef..f3c9edbd1e2d199cdf0b3134bcdcc28b93b28c66 100755 (executable)
@@ -76,6 +76,10 @@ else
   ln -sf Make.inc/Makefile.inc.i686_pc_linux2.prof Makefile.inc
 fi
 
+sed -e "s%gmake%make%" Makefile.inc > _Makefile.inc
+mv -f _Makefile.inc Makefile.inc
+chmod a+x Makefile.inc
+
 # make
 check_job ${PRODUCT_DIR}/MAKE.LOG make
 
@@ -83,6 +87,8 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make
 cd ${PRODUCT_SRC_DIR}
 cp -rf bin doc grf tgt ${PRODUCT_DIR}
 
+cd ${PRODUCT_DIR};
+
 # remove sources and temporary files after building
 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
     test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
diff --git a/config_files/sphinx-0.5.sh b/config_files/sphinx-0.5.sh
new file mode 100755 (executable)
index 0000000..e2ac532
--- /dev/null
@@ -0,0 +1,170 @@
+#!/bin/bash -noprofile
+
+####################################################################################
+#  File      : sphinx-0.5.sh
+#  Created   : Thu Dec 18 12:01:00 2002
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2008 CEA
+#
+#  This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version(){
+# It is not necessary to check version!
+return 0
+}
+
+print_env_bin(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export PYTHONPATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
+export PATH=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin:\${PATH}
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+# nothing to do
+##
+EOF
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+makedir ${PRODUCT_SRC_DIR}
+# unpack
+check_jb tar xfz ${SOURCE_DIR}/sphinx-0.5.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/setuptools-0.6c9.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/jinja-1.2.tar.gz -C ${PRODUCT_SRC_DIR}
+check_jb tar xfz ${SOURCE_DIR}/pygments-1.0.tar.gz -C ${PRODUCT_SRC_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+mkdir ${PRODUCT_DIR}/bin
+mkdir ${PRODUCT_DIR}/lib
+mkdir ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}
+mkdir ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages
+
+export PYTHONPATH=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH}
+export PATH=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin:${PATH}
+
+# install omniORB
+cd ${PRODUCT_SRC_DIR}/setuptools-0.6c9_SRC ; python setup.py install --prefix=${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}/Pygments-1.0_SRC ; python setup.py install --prefix=${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}/Jinja-1.2_SRC ; python setup.py install --prefix=${PRODUCT_DIR}
+cd ${PRODUCT_SRC_DIR}/Sphinx-0.5_SRC ; python setup.py install --prefix=${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR}/bin; 
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install  > _easy_install
+mv -f _easy_install easy_install
+chmod a+x easy_install
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install-2.4  > _easy_install-2.4
+mv -f _easy_install-2.4 easy_install-2.4
+chmod a+x easy_install-2.4
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" pygmentize  > _pygmentize
+mv -f _pygmentize pygmentize
+chmod a+x pygmentize
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-build  > _sphinx-build
+mv -f _sphinx-build sphinx-build
+chmod a+x sphinx-build
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-quickstart  > _sphinx-quickstart
+mv -f _sphinx-quickstart sphinx-quickstart
+chmod a+x sphinx-quickstart
+
+cd ${PRODUCT_DIR}
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+    test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a product directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}
+
+cd ${PRODUCT_DIR}/bin; 
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install  > _easy_install
+mv -f _easy_install easy_install
+chmod a+x easy_install
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install-2.4  > _easy_install-2.4
+mv -f _easy_install-2.4 easy_install-2.4
+chmod a+x easy_install-2.4
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" pygmentize  > _pygmentize
+mv -f _pygmentize pygmentize
+chmod a+x pygmentize
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-build  > _sphinx-build
+mv -f _sphinx-build sphinx-build
+chmod a+x sphinx-build
+
+sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-quickstart  > _sphinx-quickstart
+mv -f _sphinx-quickstart sphinx-quickstart
+chmod a+x sphinx-quickstart
+
+# to generate environment script for sources
+try_preinstalled
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+shift
+REMOVE_SRC_TMP=$8;
+test $# == 10 && shift && SINGLE_DIR=$9
+export PRODUCT="sphinx-0.5"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT}_SRC
+source ./common.sh
+$PROCEDURE