]> SALOME platform Git repositories - tools/install.git/blob - config_files/DEBIANFORSALOME-3.1.sh
Salome HOME
Add path to common libs into 'LD_LIBRARY_PATH'
[tools/install.git] / config_files / DEBIANFORSALOME-3.1.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : DEBIANFORSALOME-3.1.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 DEBIANFORSALOME=\${INSTALL_ROOT}
25 export PATH=\${DEBIANFORSALOME}/bin:\${DEBIANFORSALOME}/bin/X11:\${PATH}
26 export LD_LIBRARY_PATH=\${DEBIANFORSALOME}/extralibs:\${DEBIANFORSALOME}/lib:\${DEBIANFORSALOME}/bin/X11:\${LD_LIBRARY_PATH}
27 export CPLUS_INCLUDE_PATH=\${DEBIANFORSALOME}/include/c++/3.3:\${DEBIANFORSALOME}/include/c++/3.3/i486-linux:\${DEBIANFORSALOME}/include/c++/3.3/backward
28 ##
29 EOF
30 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
31 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
32 }
33
34 print_env_src()
35 {
36 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
37 #$DELIM ${PRODUCT_TYPE}_src $DELIM
38 # nothing to do
39 ##
40 EOF
41 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
42 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
43 }
44
45 try_preinstalled(){
46 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
47 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
48 return $?
49 }
50
51 install_source()
52 {
53 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
54 source ${INSTALL_WORK}/$SHRC
55
56 check_jb tar xfz ${SRC_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
57
58 # to generate environment scripts
59 try_preinstalled
60 }
61
62 install_source_and_build()
63 {
64 # install sources
65 install_source
66
67 # build sources
68
69 # nothing to do
70
71 # to generate environment scripts
72 try_preinstalled
73 }
74
75 install_binary()
76 {
77 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
78 source ${INSTALL_WORK}/$SHRC
79
80 # nothing to do
81
82 # to generate environment scripts
83 try_preinstalled
84 }
85
86 export PROCEDURE=$1;
87 export INSTALL_WORK=$2;
88 export SOURCE_DIR=$3;
89 export INSTALL_ROOT=$4;
90 export PRODUCT_SEQUENCE=$5;
91 export PRODUCT_TYPE=$6;
92 export INSTALL_PRODUCTS=$7;
93 SRC_DIR=$8;
94 shift
95 REMOVE_SRC_TMP=$8;
96 export PRODUCT="DEBIANFORSALOME-3.1"
97 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
98 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
99 source ./common.sh
100 $PROCEDURE