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.7 by eulisse, Tue May 9 17:33:37 2006 UTC vs.
Revision 1.41 by muzaffar, Tue Mar 31 09:46:37 2009 UTC

# Line 1 | Line 1
1 < ### RPM external oracle 10.2.0.1
1 > ### RPM external oracle 10.2.0.3
2   ## INITENV SET ORACLE_HOME %i
3 ## INITENV +PATH SQLPATH %i/bin
4 Source0: http://oraclelon1.oracle.com/otn/linux/instantclient/10201/instantclient-basic-linux32-10.2.0.1-20050713.zip
5 Source1: http://oraclelon1.oracle.com/otn/linux/instantclient/10201/instantclient-sdk-linux32-10.2.0.1-20050713.zip
6 Source2: http://oraclelon1.oracle.com/otn/linux/instantclient/10201/instantclient-sqlplus-linux32-10.2.0.1-20050713.zip
3  
4 + # 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
16 + Source9: oracle-license
17 + 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
24 +
25 + ## INITENV +PATH SQLPATH %i/bin
26   %prep
27 < unzip -f %_sourcedir/instantclient-basic*.zip
28 < unzip -f %_sourcedir/instantclient-sdk*.zip
29 < unzip -f %_sourcedir/instantclient-sqlplus*.zip
27 > 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
61 >
62   %build
63   %install
64 < mkdir -p %i/bin %i/etc %i/lib %i/admin %i/java %i/demo %i/include
64 > mkdir -p %i/bin %i/etc/profile.d %i/lib %i/admin %i/java %i/demo %i/include
65 > cp %_sourcedir/oracle-license %{i}/oracle-license
66   cp -p instantclient*/lib* %i/lib
67   cp -p instantclient*/sqlplus %i/bin
68   cp -p instantclient*/glogin.sql %i/bin
69   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
129 +
130 + # SCRAM ToolBox toolfile
131 + mkdir -p %i/etc/scram.d
132 + cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
133 + <doc type=BuildSystem::ToolDoc version=1.0>
134 + <Tool name=%n version=%v>
135 + <lib name=clntsh>
136 + <lib name=occi>
137 + <lib name=nnz10>
138 + <Client>
139 + <Environment name=ORACLE_BASE default="%i"></Environment>
140 + <Environment name=ORACLE_ADMINDIR></Environment>
141 + <Environment name=LIBDIR value="$ORACLE_BASE/lib"></Environment>
142 + <Environment name=BINDIR value="$ORACLE_BASE/bin"></Environment>
143 + <Environment name=INCLUDE value="$ORACLE_BASE/include"></Environment>
144 + </Client>
145 + <use name=sockets>
146 + <Runtime name=PATH value="$BINDIR" type=path>
147 + <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>
153 + EOF_TOOLFILE
154 + %post
155 + echo ". $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init64.sh" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
156 + 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines