2 |
|
Source: none |
3 |
|
|
4 |
|
# Here we are assuming that online release always uses system compiler: |
5 |
< |
%define compilertools ccompiler cxxcompiler f77compiler jcompiler |
5 |
> |
%define compilertools jcompiler |
6 |
|
|
7 |
< |
#%define onlinetools curl libpng libtiff libungif mimetic mysql openssl oracle python elementtree qt xdaq xerces zlib |
8 |
< |
%define onlinetools zlib curl oracle openssl xerces-c xdaq mimetic |
7 |
> |
%define onlinetools zlib curl openssl xerces-c xdaq xdaqheader mimetic |
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. |
12 |
– |
%define compiler_version 3.4.6 |
13 |
– |
## INITENV SET CXXCOMPILER_VERSION %compiler_version |
14 |
– |
## INITENV SET CCOMPILER_VERSION %compiler_version |
15 |
– |
## INITENV SET F77COMPILER_VERSION %compiler_version |
11 |
|
%define curl_version 7.12.1 |
12 |
|
## INITENV SET CURL_VERSION %curl_version |
13 |
|
%define zlib_version 1.2.1.2 |
14 |
|
## INITENV SET ZLIB_VERSION %zlib_version |
15 |
< |
%define oracle_version 10.2.1 |
21 |
< |
## INITENV SET ORACLE_VERSION %oracle_version |
22 |
< |
## INITENV SET ORACLE_ROOT /opt/xdaq |
23 |
< |
%define openssl_version 0.9.7a |
15 |
> |
%define openssl_version 0.9.7e |
16 |
|
## INITENV SET OPENSSL_VERSION %openssl_version |
17 |
|
%define xerces_version 2.7.0 |
18 |
|
## INITENV SET XERCES_C_VERSION %xerces_version |
48 |
|
<Tool name=Sockets version=%sockets_version> |
49 |
|
EOF_TOOLFILE |
50 |
|
case %cmsplatf in |
51 |
< |
slc3_* | slc4_* | slc4onl_* ) |
51 |
> |
slc3_* | slc4_* | slc4onl_* | slc5onl_* ) |
52 |
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets |
53 |
|
<lib name=nsl> |
54 |
|
<lib name=crypt> |
130 |
|
</Tool> |
131 |
|
EOF_TOOLFILE |
132 |
|
|
141 |
– |
#cxxcompiler |
142 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler |
143 |
– |
<doc type=BuildSystem::ToolDoc version=1.1> |
144 |
– |
<tool name=cxxcompiler version=%compiler_version type=compiler> |
145 |
– |
<client> |
146 |
– |
<Environment name=GCC_BASE default="/usr"></Environment> |
147 |
– |
<Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment> |
148 |
– |
<Environment name=CXX value="$GCCBINDIR/c++"></Environment> |
149 |
– |
</client> |
150 |
– |
<Flags SCRAM_COMPILER_NAME="gcc345"> |
151 |
– |
<Flags CCcompiler="gcc3"> |
152 |
– |
<Flags MODULEFLAGS="-shared"> |
153 |
– |
<Flags CXXDEBUGFLAG="-g"> |
154 |
– |
<Flags CPPDEFINES="GNU_GCC"> |
155 |
– |
<Flags CPPDEFINES="_GNU_SOURCE"> |
156 |
– |
<Flags CXXSHAREDOBJECTFLAGS="-fPIC"> |
157 |
– |
<Flags CXXFLAGS="-pedantic -ansi -pthread -pipe"> |
158 |
– |
<Flags CXXFLAGS="-O2"> |
159 |
– |
<Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300"> |
160 |
– |
<Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses"> |
161 |
– |
<Flags LDFLAGS="-Wl,-E"> |
162 |
– |
<Flags CXXSHAREDFLAGS="-Wl,-E"> |
163 |
– |
<Flags SHAREDSUFFIX="so"> |
164 |
– |
<Flags SCRAM_LANGUAGE_TYPE="C++"> |
165 |
– |
<Runtime name=GCC_EXEC_PREFIX default="$GCC_BASE/lib/gcc-lib/"> |
166 |
– |
</tool> |
167 |
– |
EOF_TOOLFILE |
168 |
– |
#ccompiler |
169 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler |
170 |
– |
<doc type=BuildSystem::ToolDoc version=1.1> |
171 |
– |
<tool name=ccompiler version=%compiler_version type=compiler> |
172 |
– |
<client> |
173 |
– |
<Environment name=GCC_BASE default="/usr"></Environment> |
174 |
– |
<Environment name=GCCBINDIR value="$GCC_BASE/bin"></Environment> |
175 |
– |
<Environment name=CC value="$GCCBINDIR/gcc"></Environment> |
176 |
– |
</client> |
177 |
– |
<Flags CDEBUGFLAG="-g"> |
178 |
– |
<Flags CSHAREDOBJECTFLAGS="-fPIC"> |
179 |
– |
<Flags CFLAGS="-pthread"> |
180 |
– |
<Flags CFLAGS="-O2"> |
181 |
– |
<Flags LDFLAGS="-Wl,-E"> |
182 |
– |
<Flags CSHAREDFLAGS="-Wl,-E"> |
183 |
– |
<Flags SCRAM_COMPILER_NAME="gcc345"> |
184 |
– |
<Flags SCRAM_LANGUAGE_TYPE="C"> |
185 |
– |
</tool> |
186 |
– |
EOF_TOOLFILE |
187 |
– |
|
188 |
– |
#f77compiler |
189 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler |
190 |
– |
<doc type=BuildSystem::ToolDoc version=1.1> |
191 |
– |
<tool name=f77compiler version=%compiler_version type=compiler> |
192 |
– |
<lib name=g2c> |
193 |
– |
<lib name=m> |
194 |
– |
<client> |
195 |
– |
<Environment name=G77_BASE default="/usr"></Environment> |
196 |
– |
<Environment name=FC default="$G77_BASE/bin/g77"></Environment> |
197 |
– |
</client> |
198 |
– |
<Flags SCRAM_COMPILER_NAME="gcc345"> |
199 |
– |
<Flags FFLAGS="-fno-second-underscore -Wno-globals -Wunused -Wuninitialized"> |
200 |
– |
<Flags FCO2Flag="-O2"> |
201 |
– |
<Flags FCOPTIMISED="-O2"> |
202 |
– |
<Flags FCDEBUGFLAG="-g"> |
203 |
– |
<Flags FCSHAREDFCOBJECTFLAGS="-fPIC"> |
204 |
– |
<Flags SCRAM_LANGUAGE_TYPE="FORTRAN"> |
205 |
– |
</tool> |
206 |
– |
EOF_TOOLFILE |
207 |
– |
|
133 |
|
# curl |
134 |
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/curl |
135 |
|
<doc type=BuildSystem::ToolDoc version=1.0> |
138 |
|
<client> |
139 |
|
<Environment name=CURL_BASE default="/usr/"></Environment> |
140 |
|
<Environment name=INCLUDE default="$CURL_BASE/include"></Environment> |
216 |
– |
<Environment name=LIBDIR default="$CURL_BASE/lib"></Environment> |
141 |
|
</client> |
218 |
– |
<Runtime name=PATH value="$CURL_BASE/bin" type=path> |
142 |
|
</Tool> |
143 |
|
EOF_TOOLFILE |
144 |
|
|
150 |
|
<client> |
151 |
|
<Environment name=ZLIB_BASE default="/usr"></Environment> |
152 |
|
<Environment name=INCLUDE default="$ZLIB_BASE/include"></Environment> |
230 |
– |
<Environment name=LIBDIR default="$ZLIB_BASE/lib"></Environment> |
153 |
|
</client> |
154 |
|
</Tool> |
155 |
|
EOF_TOOLFILE |
156 |
|
|
235 |
– |
#oracle |
236 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/oracle |
237 |
– |
<doc type=BuildSystem::ToolDoc version=1.0> |
238 |
– |
<Tool name=oracle version=%oracle_version> |
239 |
– |
<lib name=clntsh> |
240 |
– |
<lib name=occi> |
241 |
– |
<lib name=nnz10> |
242 |
– |
<Client> |
243 |
– |
<Environment name=ORACLE_BASE default="/opt/xdaq"></Environment> |
244 |
– |
<Environment name=ORACLE_ADMINDIR default="."> </Environment> |
245 |
– |
<Environment name=LIBDIR value="$ORACLE_BASE/lib"></Environment> |
246 |
– |
<Environment name=BINDIR value="$ORACLE_BASE/bin"></Environment> |
247 |
– |
<Environment name=INCLUDE value="$ORACLE_BASE/include"></Environment> |
248 |
– |
</Client> |
249 |
– |
<use name=sockets> |
250 |
– |
<Runtime name=PATH value="$BINDIR" type=path> |
251 |
– |
<Runtime name=NLS_LANG value="american_america.WE8ISO8859P9"> |
252 |
– |
<Runtime name=NLS_DATE_FORMAT value="DD-MON-FXYYYY"> |
253 |
– |
<Runtime name=ORA_NLS33 default="$ORACLE_BASE/ocommon/nls/admin/data"> |
254 |
– |
<Runtime name=ORACLE_HOME default="$ORACLE_BASE"> |
255 |
– |
<Runtime name=TNS_ADMIN default="$ORACLE_ADMINDIR"> |
256 |
– |
</Tool> |
257 |
– |
EOF_TOOLFILE |
157 |
|
|
158 |
|
#openssl |
159 |
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/openssl |
164 |
|
<client> |
165 |
|
<Environment name=OPENSSL_BASE default="/usr"></Environment> |
166 |
|
<Environment name=INCLUDE default="$OPENSSL_BASE/include"></Environment> |
268 |
– |
<Environment name=LIBDIR default="$OPENSSL_BASE/lib"></Environment> |
167 |
|
</client> |
168 |
|
</Tool> |
169 |
|
EOF_TOOLFILE |
252 |
|
EOF_TOOLFILE |
253 |
|
|
254 |
|
%post |
255 |
< |
%{relocateConfig}etc/scram.d/sockets |
256 |
< |
%{relocateConfig}etc/scram.d/opengl |
257 |
< |
%{relocateConfig}etc/scram.d/x11 |
360 |
< |
%{relocateConfig}etc/scram.d/jcompiler |
361 |
< |
%{relocateConfig}etc/scram.d/cxxcompiler |
362 |
< |
%{relocateConfig}etc/scram.d/ccompiler |
363 |
< |
%{relocateConfig}etc/scram.d/f77compiler |
364 |
< |
%{relocateConfig}etc/scram.d/curl |
365 |
< |
%{relocateConfig}etc/scram.d/zlib |
366 |
< |
%{relocateConfig}etc/scram.d/oracle |
367 |
< |
%{relocateConfig}etc/scram.d/openssl |
368 |
< |
%{relocateConfig}etc/scram.d/xerces-c |
369 |
< |
%{relocateConfig}etc/scram.d/xdaq |
370 |
< |
%{relocateConfig}etc/scram.d/xdaqheader |
371 |
< |
%{relocateConfig}etc/scram.d/mimetic |
372 |
< |
|
255 |
> |
cd $RPM_INSTALL_PREFIX/%pkgrel |
256 |
> |
perl -p -i -e "s|%{instroot}|$RPM_INSTALL_PREFIX|g" $(find $RPM_INSTALL_PREFIX/%pkgrel/etc/scram.d -type f) |
257 |
> |
|