3 ####################################################################################
4 # File : docutils-0.3.9.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
16 # It is not necessary to check version!
21 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
22 #$DELIM ${PRODUCT_TYPE} $DELIM
23 export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
24 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
27 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
28 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
33 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
34 #$DELIM ${PRODUCT_TYPE}_src $DELIM
38 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
39 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
43 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
44 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
50 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
51 source ${INSTALL_WORK}/$SHRC
54 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
56 # to generate environment scripts
60 install_source_and_build()
66 makedir ${PRODUCT_DIR}
67 cd ${PRODUCT_DIR}_SRC ; python setup.py install --prefix=${PRODUCT_DIR}
69 cd ${PRODUCT_DIR}/bin;
71 sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2latex.py > _rst2latex.py
72 mv -f _rst2latex.py rst2latex.py
73 chmod a+x rst2latex.py
74 ln -sf rst2latex.py rst2latex
76 sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2html.py > _rst2html.py
77 mv -f _rst2html.py rst2html.py
79 ln -sf rst2html.py rst2html
81 if test `uname -m` = "x86_64" ; then
82 cd ${PRODUCT_DIR}; ln -sf lib64 lib
85 # remove sources and temporary files after building
86 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
87 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
90 # to generate environment scripts
96 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
97 source ${INSTALL_WORK}/$SHRC
99 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
100 cd ${PRODUCT_DIR}/bin;
102 sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2latex.py > _rst2latex.py
103 mv -f _rst2latex.py rst2latex.py
104 chmod a+x rst2latex.py
105 ln -sf rst2latex.py rst2latex
107 sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2html.py > _rst2html.py
108 mv -f _rst2html.py rst2html.py
109 chmod a+x rst2html.py
110 ln -sf rst2html.py rst2html
112 # to generate environment script for sources
117 export INSTALL_WORK=$2;
118 export SOURCE_DIR=$3;
119 export INSTALL_ROOT=$4;
120 export PRODUCT_SEQUENCE=$5;
121 export PRODUCT_TYPE=$6;
122 export INSTALL_PRODUCTS=$7;
125 export PRODUCT="docutils-0.3.9"
126 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
127 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}