]> SALOME platform Git repositories - tools/install.git/blob - config_files/Numeric-22.0.sh
Salome HOME
1) remove required size calculations for each product: just read its from XML and...
[tools/install.git] / config_files / Numeric-22.0.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : Numeric-22.0.sh
5 #  Created   : Thu Dec 18 12:01:00 2002
6 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
7 #  Project   : SALOME
8 #  Module    : Installation Wizard
9 #  Copyright : 2002-2007 CEA
10 #
11 #  This script is the part of the SALOME installation procedure.
12 #
13 ####################################################################################
14
15 check_version(){
16 ver=`python -c 'import Numeric; print Numeric.__version__' 2>/dev/null`
17 if [ "$ver" == "22.0" ]; then
18    return 0
19 fi
20 return 1
21 }
22
23 print_env_bin(){
24 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
25 #$DELIM ${PRODUCT_TYPE} $DELIM
26 export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages/Numeric:\${PYTHONPATH}
27 ##
28 EOF
29 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
30 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
31 }
32
33 print_env_src()
34 {
35 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
36 #$DELIM ${PRODUCT_TYPE}_src $DELIM
37 # nothing to do
38 ##
39 EOF
40 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
41 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
42 }
43
44 try_preinstalled(){
45 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
46 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
47 return $?
48 }
49
50 install_source()
51 {
52 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
53 source ${INSTALL_WORK}/$SHRC
54
55 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
56
57 # to generate environment scripts
58 try_preinstalled
59 }
60
61 install_source_and_build()
62 {
63 # install sources
64 install_source
65
66 # build sources
67 makedir ${PRODUCT_DIR}
68 cd ${PRODUCT_DIR}_SRC
69
70 check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR}
71
72 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
73 cd ${PRODUCT_DIR};
74
75 # remove sources and temporary files after building
76 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
77     test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
78 fi
79
80 # to generate environment scripts
81 try_preinstalled
82 }
83
84 install_binary()
85 {
86 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
87
88 # to generate environment scripts
89 try_preinstalled
90 }
91
92 export PROCEDURE=$1;
93 export INSTALL_WORK=$2;
94 export SOURCE_DIR=$3;
95 export INSTALL_ROOT=$4;
96 export PRODUCT_SEQUENCE=$5;
97 export PRODUCT_TYPE=$6;
98 export INSTALL_PRODUCTS=$7;
99 shift
100 REMOVE_SRC_TMP=$8;
101 export PRODUCT="Numeric-22.0"
102 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
103 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
104 source ./common.sh
105 $PROCEDURE