ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/oracle.spec
(Generate patch)

Comparing COMP/CMSDIST/oracle.spec (file contents):
Revision 1.41 by muzaffar, Tue Mar 31 09:46:37 2009 UTC vs.
Revision 1.55 by muzaffar, Wed Jan 27 12:55:27 2010 UTC

# Line 1 | Line 1
1 < ### RPM external oracle 10.2.0.3
1 > ### RPM external oracle 11.2.0.1.0a
2   ## INITENV SET ORACLE_HOME %i
3 + ## BUILDIF case `uname`:`uname -p` in Linux:i*86 ) true ;; Linux:x86_64 ) true ;;  Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
4  
5 < # TODO:  actually there is an instantclient for OSX now...  we could make it deployable
5 < Provides: libgcc_s.so.1()(64bit)
6 < Provides: libgcc_s.so.1(GCC_3.0)(64bit)
7 < %if "%(echo %cmsplatf | cut -b 1,2,3 )" == "osx"
8 < Source0: none
9 < %else
10 < Source0: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/basic-%cmsos.zip
11 < Source1: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/sdk-%cmsos.zip
12 < Source2: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/sqlplus-%cmsos.zip
13 < Source3: none
14 < Source4: none
15 < Source5: none
5 > Source0: http://cmsrep.cern.ch/cmssw/oracle-mirror/%cmsos/%realversion/oracle_lcg.tgz
6   Source9: oracle-license
7 < Source10: http://www.oracle.com/technology/tech/oci/occi/downloads/occi_gcc343_102020.tar.gz
18 < %if "%{cmsos}" == "slc4_ia32"
19 < Source3: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/basic-slc4_amd64.zip
20 < Source4: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/sdk-slc4_amd64.zip
21 < Source5: http://cmsrep.cern.ch/cmssw/oracle-mirror/slc4_amd64/%realversion/sqlplus-slc4_amd64.zip
22 < %endif
23 < %endif
7 > Requires: fakesystem
8  
9   ## INITENV +PATH SQLPATH %i/bin
10 < %prep
11 < case %cmsos in
28 <    osx* )
29 <    ;;
30 <    slc4_ia32 )
31 <      rm -rf instantclient_*
32 <      rm -rf libocci.so.10.1 libocci10.a
33 <      unzip -o -u %_sourcedir/basic-%cmsos.zip
34 <      unzip -o -u %_sourcedir/sdk-%cmsos.zip
35 <      unzip -o -u %_sourcedir/sqlplus-%cmsos.zip
36 <      rm -rf oracle64; mkdir oracle64
37 <      cd oracle64
38 <      unzip -o -u %_sourcedir/basic-slc4_amd64.zip
39 <      unzip -o -u %_sourcedir/sdk-slc4_amd64.zip
40 <      unzip -o -u %_sourcedir/sqlplus-slc4_amd64.zip
41 <      cd ..
42 <      ;;
43 <    * )
44 <        rm -rf instantclient_*
45 <        rm -rf libocci.so.10.1 libocci10.a
46 <        unzip -o -u %_sourcedir/basic-%cmsos.zip
47 <        unzip -o -u %_sourcedir/sdk-%cmsos.zip
48 <        unzip -o -u %_sourcedir/sqlplus-%cmsos.zip
49 <    ;;
50 < esac
51 <
52 < %if "%{realversion}" == "10.2.0.3"
53 < case %cmsos in
54 <    slc4_ia32 )
55 <        tar xzvf %_sourcedir/occi_gcc343_102020.tar.gz
56 <        cd oracle64
57 <        tar xzvf %_sourcedir/occi_gcc343_102020.tar.gz
58 <    ;;
59 < esac
60 < %endif
10 > %prep
11 > %setup -n %realversion
12  
13   %build
14 +
15   %install
16 < mkdir -p %i/bin %i/etc/profile.d %i/lib %i/admin %i/java %i/demo %i/include
16 > mkdir -p %i/bin %i/lib %i/doc %i/include
17   cp %_sourcedir/oracle-license %{i}/oracle-license
18 < cp -p instantclient*/lib* %i/lib
19 < cp -p instantclient*/sqlplus %i/bin
20 < cp -p instantclient*/glogin.sql %i/bin
21 < cp -p instantclient*/*.jar %i/java
70 < cp -p instantclient*/sdk/demo/* %i/demo
71 < cp -p instantclient*/sdk/include/* %i/include
72 < %if "%cmsplatf" == "slc4_ia32_gcc345"
73 < echo Copying libocci libraries for slc4_ia32_gcc345
74 < [ -f libocci.so.10.1 ] && mv libocci.so.10.1 %i/lib
75 < [ -f libocci10.a ] && mv libocci10.a %i/lib
76 < mkdir %i/oracle64
77 < mkdir -p %i/oracle64/bin %i/oracle64/lib %i/oracle64/admin %i/oracle64/java %i/oracle64/demo %i/oracle64/include
78 < cp -p oracle64/instantclient*/lib* %i/oracle64/lib
79 < cp -p oracle64/instantclient*/sqlplus %i/oracle64/bin
80 < cp -p oracle64/instantclient*/glogin.sql %i/oracle64/bin
81 < cp -p oracle64/instantclient*/*.jar %i/oracle64/java
82 < cp -p oracle64/instantclient*/sdk/demo/* %i/oracle64/demo
83 < cp -p oracle64/instantclient*/sdk/include/* %i/oracle64/include
84 < (cd %i/oracle64/lib && ln -s libclntsh.* $(echo libclntsh.* | sed 's/[0-9.]*$//'))
85 < (cd %i/oracle64/lib && ln -s libocci.* $(echo libocci.* | sed 's/[0-9.]*$//'))
86 < cat << \EOF_SLC4_64BIT_ENV_SCRIPT_SH >%i/etc/profile.d/init64.sh
87 < #!/bin/sh
88 < bostype=`uname`:`uname -p`
89 < case $bostype in
90 <  Linux:i*86 )
91 <    if ldd /usr/bin/gcc | grep -q /lib64/ ; then
92 <      bostype=Linux:x86_64
93 <    fi
94 <  ;;
95 < esac
96 < case $bostype in
97 <  Linux:x86_64 )
98 <    PATH="%i/oracle64/bin:$PATH"; export PATH
99 <    LD_LIBRARY_PATH="%i/oracle64/lib:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH
100 <    DYLD_FALLBACK_LIBRARY_PATH="%i/oracle64/lib:$DYLD_FALLBACK_LIBRARY_PATH"; export DYLD_FALLBACK_LIBRARY_PATH
101 <    SQLPATH="%i/oracle64/bin:$SQLPATH"; export SQLPATH
102 <  ;;
103 < esac
104 < EOF_SLC4_64BIT_ENV_SCRIPT_SH
105 < cat << \EOF_SLC4_64BIT_ENV_SCRIPT_CSH >%i/etc/profile.d/init64.csh
106 < #!/bin/csh
107 < set bostype=`uname`:`uname -p`
108 < switch ($bostype)
109 <  case Linux:i*86:
110 <    ldd /usr/bin/gcc | grep -q /lib64/
111 <    if  ("X$?" == "X0") set bostype=Linux:x86_64
112 <    breaksw
113 < endsw
114 < switch ($bostype)
115 <  case Linux:x86_64:
116 <    setenv PATH "%i/oracle64/bin:$PATH"
117 <    setenv LD_LIBRARY_PATH "%i/oracle64/lib:$LD_LIBRARY_PATH"
118 <    setenv DYLD_FALLBACK_LIBRARY_PATH "%i/oracle64/lib:$DYLD_FALLBACK_LIBRARY_PATH"
119 <    setenv SQLPATH "%i/oracle64/bin:$SQLPATH"
120 <    breaksw
121 < endsw
122 < EOF_SLC4_64BIT_ENV_SCRIPT_CSH
123 < %endif
124 < (cd %i/lib && ln -s libclntsh.* $(echo libclntsh.* | sed 's/[0-9.]*$//'))
125 < (cd %i/lib && ln -s libocci.* $(echo libocci.* | sed 's/[0-9.]*$//'))
126 < chmod -R g-w %i
127 < touch %i/etc/profile.d/init64.sh
128 < touch %i/etc/profile.d/init64.csh
18 > cp -r bin/* %i/bin/
19 > cp -r lib/* %i/lib/
20 > cp -r doc/* %i/doc/
21 > cp -r include/* %i/include/
22  
23   # SCRAM ToolBox toolfile
24   mkdir -p %i/etc/scram.d
25 < cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
26 < <doc type=BuildSystem::ToolDoc version=1.0>
27 < <Tool name=%n version=%v>
28 < <lib name=clntsh>
29 < <lib name=occi>
30 < <lib name=nnz10>
31 < <Client>
32 < <Environment name=ORACLE_BASE default="%i"></Environment>
33 < <Environment name=ORACLE_ADMINDIR></Environment>
34 < <Environment name=LIBDIR value="$ORACLE_BASE/lib"></Environment>
35 < <Environment name=BINDIR value="$ORACLE_BASE/bin"></Environment>
36 < <Environment name=INCLUDE value="$ORACLE_BASE/include"></Environment>
37 < </Client>
38 < <use name=sockets>
39 < <Runtime name=PATH value="$BINDIR" type=path>
40 < <Runtime name=NLS_LANG value="american_america.WE8ISO8859P9">
148 < <Runtime name=NLS_DATE_FORMAT value="DD-MON-FXYYYY">
149 < <Runtime name=ORA_NLS33 default="$ORACLE_BASE/ocommon/nls/admin/data">
150 < <Runtime name=ORACLE_HOME default="$ORACLE_BASE">
151 < <Runtime name=TNS_ADMIN default="$ORACLE_ADMINDIR">
152 < </Tool>
25 >
26 > cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml
27 >  <tool name="oracle" version="%v">
28 >    <lib name="clntsh"/>
29 >    <lib name="nnz11"/>
30 >    <client>
31 >      <environment name="ORACLE_BASE" default="%i"/>
32 >      <environment name="ORACLE_ADMINDIR"/>
33 >      <environment name="LIBDIR" value="$ORACLE_BASE/lib"/>
34 >      <environment name="BINDIR" value="$ORACLE_BASE/bin"/>
35 >      <environment name="INCLUDE" value="$ORACLE_BASE/include"/>
36 >    </client>
37 >    <runtime name="PATH" value="$BINDIR" type="path"/>
38 >    <runtime name="TNS_ADMIN" default="$ORACLE_ADMINDIR"/>
39 >    <use name="sockets"/>
40 >  </tool>
41   EOF_TOOLFILE
42 +
43 + cat << \EOF_TOOLFILE >%i/etc/scram.d/oracleocci.xml
44 +  <tool name="oracleocci" version="%v">
45 +    <lib name="occi"/>
46 +    <use name="oracle"/>
47 +  </tool>
48 + EOF_TOOLFILE
49 +
50   %post
51 < echo ". $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init64.sh" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
52 < echo "source $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init64.csh" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh
157 < %{relocateConfig}etc/scram.d/%n
158 < %{relocateConfig}etc/profile.d/init64.sh
159 < %{relocateConfig}etc/profile.d/init64.csh
51 > %{relocateConfig}etc/scram.d/%n.xml
52 > %{relocateConfig}etc/scram.d/oracleocci.xml

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines