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

Comparing COMP/CMSDIST/onlinesystemtools.spec (file contents):
Revision 1.13 by muzaffar, Tue Feb 23 09:22:38 2010 UTC vs.
Revision 1.26 by fwyzard, Tue Apr 12 18:00:28 2011 UTC

# Line 1 | Line 1
1 < ### RPM external onlinesystemtools 2.2
1 > ### RPM external onlinesystemtools 3.2
2 > ## NOCOMPILER
3   Source: none
4 + Requires: oracle-env
5  
6 < # Here we are assuming that online release always uses system compiler:
5 < %define compilertools jcompiler
6 <
6 > %define compilertools %{nil}
7   %define onlinetools zlib curl openssl xerces-c xdaq xdaqheader mimetic oracle oracleocci
8   # Define variables used in non-scram-managed tools, that would be
9   # normally defined in package's init.sh/csh scrips.
10   # Set all versions as currently found on the system.
11   %define xdaq_root                       /opt/xdaq
12 < %define curl_version                    7.12.1
13 < ## INITENV SET CURL_VERSION             %curl_version
14 < %define zlib_version                    1.2.1.2
15 < ## INITENV SET ZLIB_VERSION             %zlib_version
16 < %define oracle_version                  10.2.1
17 < ## INITENV SET ORACLE_VERSION           %oracle_version
18 < ## INITENV SET ORACLE_ROOT              %xdaq_root
19 < %define openssl_version                 0.9.7e
20 < ## INITENV SET OPENSSL_VERSION          %openssl_version
21 < %define xerces_version                  2.7.0
22 < ## INITENV SET XERCES_C_VERSION         %xerces_version
23 < ## INITENV SET XERCES_C_ROOT            %xdaq_root
24 < %define xdaq_version                    3.32.1
25 < ## INITENV SET XDAQ_VERSION             %xdaq_version
26 < ## INITENV SET XDAQ_ROOT                %xdaq_root
27 < %define mimetic_version                 0.9.1
28 < ## INITENV SET MIMETIC_VERSION          %mimetic_version
29 <
30 < %define systemtools                     sockets opengl x11 %compilertools %onlinetools
31 < %define sockets_version                 1.0
32 < %define opengl_version                  XFree4.2
33 < %define x11_version                     R6
34 < ### why oh why is this hardwired??
35 < %define jcompiler_version               1.5.0.p6-CMS8
36 <
37 < ## INITENV SET SOCKETS_VERSION          %sockets_version
38 < ## INITENV SET OPENGL_VERSION           %opengl_version
39 < ## INITENV SET X11_VERSION              %x11_version
40 < ## INITENV SET JCOMPILER_VERSION        %jcompiler_version
41 < ## INITENV SET JCOMPILER_TOOL           java-jdk
42 < ## INITENV SET PKGTOOLS_SYSTEM_TOOLS    %systemtools
12 > %define curl_version                    7.15.5
13 > ## INITENV SETV CURL_VERSION            %curl_version
14 > %define zlib_version                    1.2.3
15 > ## INITENV SETV ZLIB_VERSION            %zlib_version
16 > %define uuid_version                    1.39
17 > ## INITENV SETV UUID_VERSION            %uuid_version
18 > %define sqlite_version                  3.7.5
19 > ## INITENV SETV SQLITE_VERSION          %sqlite_version
20 > %define oracle_version                  11.2.2
21 > ## INITENV SETV ORACLE_VERSION          %oracle_version
22 > ## INITENV SETV ORACLE_ROOT             %xdaq_root
23 > %define openssl_version                 0.9.8e
24 > ## INITENV SETV OPENSSL_VERSION         %openssl_version
25 > %define xerces_version                  2.8.0
26 > ## INITENV SETV XERCES_C_VERSION        %xerces_version
27 > ## INITENV SETV XERCES_C_ROOT           %xdaq_root
28 > %define xdaq_version                    3.34.1
29 > ## INITENV SETV XDAQ_VERSION            %xdaq_version
30 > ## INITENV SETV XDAQ_ROOT               %xdaq_root
31 > %define mimetic_version                 0.9.6
32 > ## INITENV SETV MIMETIC_VERSION         %mimetic_version
33 >
34 > %define systemtools                     sockets opengl x11 %compilertools %onlinetools
35 > %define sockets_version                 1.0
36 > %define opengl_version                  XFree4.2
37 > %define x11_version                     R6
38 >
39 > ## INITENV SETV SOCKETS_VERSION         %sockets_version
40 > ## INITENV SETV OPENGL_VERSION          %opengl_version
41 > ## INITENV SETV X11_VERSION             %x11_version
42 > ## INITENV SETV PKGTOOLS_SYSTEM_TOOLS   %systemtools
43  
44   %prep
45   %build
# Line 56 | Line 56 | cat << \EOF_TOOLFILE >>%i/etc/scram.d/so
56      <lib name="nsl"/>
57      <lib name="crypt"/>
58      <lib name="dl"/>
59 +    <lib name="rt"/>
60   EOF_TOOLFILE
61   ;;
62   osx10* )
# Line 72 | Line 73 | cat << \EOF_TOOLFILE >%i/etc/scram.d/ope
73      <lib name="GL"/>
74      <lib name="GLU"/>
75      <use name="x11"/>
76 +    <environment name="ORACLE_ADMINDIR" default="@ORACLE_ENV_ROOT@/etc"/>
77   EOF_TOOLFILE
78   case %cmsplatf in
79 < osx103* )
79 > osx* )
80   cat << \EOF_TOOLFILE >>%i/etc/scram.d/opengl.xml
81      <client>
82        <environment name="OPENGL_BASE" default="/System/Library/Frameworks/OpenGL.framework/Versions/A"/>
# Line 91 | Line 93 | cat << \EOF_TOOLFILE >%i/etc/scram.d/x11
93    <tool name="x11" version="%x11_version">
94   EOF_TOOLFILE
95   case %cmsplatf in
96 < slc3_* )
96 > slc3_*|osx* )
97   cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml
98      <client>
99        <environment name="INCLUDE" value="/usr/X11R6/include"/>
# Line 113 | Line 115 | cat << \EOF_TOOLFILE >>%i/etc/scram.d/x1
115    </tool>
116   EOF_TOOLFILE
117  
116 # JCompiler
117 %define compiler_ver        %(echo %jcompiler_version | sed -e "s|\\.||g")
118 cat << \EOF_TOOLFILE >>%i/etc/scram.d/jcompiler.xml
119  <tool name="jcompiler" version="%jcompiler_version" type="compiler">
120    <client>
121      <environment name="JAVA_BASE"/>
122      <environment name="JAVAC" value="$JAVA_BASE/bin/javac"/>
123    </client>
124    <flags javac_="$(JAVAC)"/>
125    <flags javac_o="$(JAVAC) -O"/>
126    <flags javac_d="$(JAVAC) -g"/>
127    <flags scram_compiler_name="jsdk%compiler_ver"/>
128    <flags scram_language_type="JAVA"/>
129    <runtime name="JAVA_HOME" default="$JAVA_BASE"/>
130  </tool>
131 EOF_TOOLFILE
132
118   # curl
119   cat << \EOF_TOOLFILE >%i/etc/scram.d/curl.xml
120    <tool name="Curl" version="%curl_version">
121      <lib name="curl"/>
122      <client>
123 <      <environment name="CURL_BASE" default="/usr/"/>
123 >      <environment name="CURL_BASE" default="/usr"/>
124        <environment name="INCLUDE" default="$CURL_BASE/include"/>
125      </client>
126    </tool>
127   EOF_TOOLFILE
128  
129 < #zlib
129 > # zlib
130   cat << \EOF_TOOLFILE >%i/etc/scram.d/zlib.xml
131    <tool name="zlib" version="%zlib_version">
132      <lib name="z"/>
# Line 152 | Line 137 | cat << \EOF_TOOLFILE >%i/etc/scram.d/zli
137    </tool>
138   EOF_TOOLFILE
139  
140 <
156 < #openssl
140 > # openssl
141   cat << \EOF_TOOLFILE >%i/etc/scram.d/openssl.xml
142    <tool name="openssl" version="%openssl_version">
143      <lib name="ssl"/>
# Line 165 | Line 149 | cat << \EOF_TOOLFILE >%i/etc/scram.d/ope
149    </tool>
150   EOF_TOOLFILE
151  
152 < #xerces-c
152 > # xerces-c
153   cat << \EOF_TOOLFILE >%i/etc/scram.d/xerces-c.xml
154    <tool name="xerces-c" version="%xerces_version">
155      <info url="http://xml.apache.org/xerces-c/"/>
# Line 178 | Line 162 | cat << \EOF_TOOLFILE >%i/etc/scram.d/xer
162    </tool>
163   EOF_TOOLFILE
164  
165 < #xdaq
165 > # xdaq
166   cat << \EOF_TOOLFILE >%i/etc/scram.d/xdaq.xml
167    <tool name="XDAQ" version="%xdaq_version">
168      <info url="http://home.cern.ch/xdaq"/>
# Line 221 | Line 205 | cat << \EOF_TOOLFILE >%i/etc/scram.d/xda
205    </tool>
206   EOF_TOOLFILE
207  
208 < #xdaqheader
208 > # xdaqheader
209   cat << \EOF_TOOLFILE >%i/etc/scram.d/xdaqheader.xml
210    <tool name="XDAQHEADER" version="%xdaq_version">
211      <info url="http://home.cern.ch/xdaq"/>
# Line 232 | Line 216 | cat << \EOF_TOOLFILE >%i/etc/scram.d/xda
216    </tool>
217   EOF_TOOLFILE
218  
219 < #mimetic
219 > # mimetic
220   cat << \EOF_TOOLFILE >%i/etc/scram.d/mimetic.xml
221    <tool name="mimetic" version="%mimetic_version">
222      <lib name="mimetic"/>
# Line 244 | Line 228 | cat << \EOF_TOOLFILE >%i/etc/scram.d/mim
228    </tool>
229   EOF_TOOLFILE
230  
231 + # uuid (from e2fsprogs-libs)
232 + cat << \EOF_TOOLFILE >%i/etc/scram.d/uuid.xml
233 +  <tool name="uuid" version="%uuid_version">
234 +    <lib name="uuid"/>
235 +    <client>
236 +      <environment name="UUID_BASE" default="/usr"/>
237 +      <environment name="INCLUDE" default="$UUID_BASE/include"/>
238 +    </client>
239 +    <use name="sockets"/>
240 +  </tool>
241 + EOF_TOOLFILE
242 +
243 + # sqlite
244 + cat << \EOF_TOOLFILE >%i/etc/scram.d/sqlite.xml
245 +  <tool name="sqlite" version="%sqlite_version">
246 +    <lib name="sqlite3"/>
247 +    <client>
248 +      <environment name="SQLITE_BASE" default="%xdaq_root"/>
249 +      <environment name="LIBDIR" default="$SQLITE_BASE/lib"/>
250 +      <environment name="BINDIR" default="$SQLITE_BASE/bin"/>
251 +      <environment name="INCLUDE" default="$SQLITE_BASE/include"/>
252 +    </client>
253 +    <runtime name="PATH" value="$BINDIR" type="path"/>
254 +  </tool>
255 + EOF_TOOLFILE
256 +
257 + # oracle
258   cat << \EOF_TOOLFILE >%i/etc/scram.d/oracle.xml
259    <tool name="oracle" version="%oracle_version">
260      <lib name="clntsh"/>
261      <lib name="nnz11"/>
262      <client>
263        <environment name="ORACLE_BASE" default="%xdaq_root"/>
264 <      <environment name="ORACLE_ADMINDIR"/>
264 >      <environment name="ORACLE_ADMINDIR" default="@ORACLE_ENV_ROOT@/etc"/>
265        <environment name="LIBDIR" value="$ORACLE_BASE/lib"/>
266        <environment name="BINDIR" value="$ORACLE_BASE/bin"/>
267        <environment name="INCLUDE" value="$ORACLE_BASE/include"/>
# Line 261 | Line 272 | cat << \EOF_TOOLFILE >%i/etc/scram.d/ora
272    </tool>
273   EOF_TOOLFILE
274  
275 + # oracleocci
276   cat << \EOF_TOOLFILE >%i/etc/scram.d/oracleocci.xml
277    <tool name="oracleocci" version="%oracle_version">
278      <lib name="occi"/>
# Line 268 | Line 280 | cat << \EOF_TOOLFILE >%i/etc/scram.d/ora
280    </tool>
281   EOF_TOOLFILE
282  
283 + export ORACLE_ENV_ROOT
284 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*.xml
285 +
286   %post
287 < cd $RPM_INSTALL_PREFIX/%pkgrel
273 < perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f)
287 > %{relocateConfig}etc/scram.d/*.xml

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines