]> SALOME platform Git repositories - tools/install.git/blob - config_files/metis-4.0.sh
Salome HOME
Add path to common libs into 'LD_LIBRARY_PATH'
[tools/install.git] / config_files / metis-4.0.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : metis-4.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 # No way to check version!
17 return 0
18 }
19
20 print_env_bin()
21 {
22 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
23 #$DELIM ${PRODUCT_TYPE} $DELIM 
24 export METISDIR=\${INSTALL_ROOT}/${PRODUCT}
25 ##
26 EOF
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}"
29 }
30
31 print_env_src()
32 {
33 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
34 #$DELIM ${PRODUCT_TYPE}_src $DELIM
35 # nothing to do
36 ##
37 EOF
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}"
40 }
41
42 try_preinstalled(){
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
45 return $?
46 }
47
48 install_source()
49 {
50 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
51 source ${INSTALL_WORK}/$SHRC
52
53 check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
54
55 # to generate environment scripts
56 try_preinstalled
57 }
58
59 install_source_and_build()
60 {
61 # install sources
62 install_source
63
64 # build sources
65
66 cd ${PRODUCT_DIR}_SRC
67 makedir ${PRODUCT_DIR}
68
69 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
70
71 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
72 cd ${PRODUCT_DIR};
73
74 # remove sources and temporary files after building
75 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
76     test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
77 fi
78
79 # to generate environment scripts
80 try_preinstalled
81 }
82
83 install_binary()
84 {
85 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
86 source ${INSTALL_WORK}/$SHRC
87
88 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
89
90 # to generate environment scripts
91 try_preinstalled
92 }
93
94 export PROCEDURE=$1;
95 export INSTALL_WORK=$2;
96 export SOURCE_DIR=$3;
97 export INSTALL_ROOT=$4;
98 export PRODUCT_SEQUENCE=$5;
99 export PRODUCT_TYPE=$6;
100 export INSTALL_PRODUCTS=$7;
101 SRC_DIR=$8;
102 shift
103 REMOVE_SRC_TMP=$8;
104 export PRODUCT="metis-4.0"
105 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
106 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
107 source ./common.sh
108 $PROCEDURE