ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/systemtools.spec
Revision: 1.22
Committed: Thu Sep 23 08:21:41 2010 UTC (14 years, 7 months ago) by muzaffar
Branch: MAIN
CVS Tags: pe20101008c-for39Xrb, pe20101008b-for39Xrb, pe20101008a-for39Xrb, pe20101005a-for39Xrb, pe20101004a-for39Xrb, pe20101001b-for39Xrb, pe20101001a-for39Xrb, pe20100930c-for39Xrb, pe20100930b-for39Xrb, pe20100930a-for39Xrb, pe20100925a-for39Xrb, pe20100924b-for39Xrb, pe20100924a-for39Xrb, pe20100923c-for39Xrb, pe20100923b-for39Xrb, pe20100923a-for39Xrb
Changes since 1.21: +13 -28 lines
Log Message:
all <TOOL>_* variables are now non-env variables in init files. Added NOCOMPILER for tools which do not need gcc dependency

File Contents

# User Rev Content
1 elmer 1.11 ### RPM external systemtools 19
2 muzaffar 1.22 ## NOCOMPILER
3 muzaffar 1.1 Source: none
4 muzaffar 1.22 Requires: oracle-env
5 muzaffar 1.1
6 ratnik 1.7 %if "%{?use_system_gcc:set}" == "set"
7 muzaffar 1.22 %define compilertools ccompiler cxxcompiler f77compiler
8 ratnik 1.7 %else
9 muzaffar 1.22 %define compilertools %{nil}
10 ratnik 1.7 %endif
11    
12 muzaffar 1.15 %define systemtools sockets opengl x11 %compilertools
13 muzaffar 1.1 %define sockets_version 1.0
14     %define opengl_version XFree4.2
15     %define x11_version R6
16    
17 muzaffar 1.22 ## INITENV SETV SOCKETS_VERSION %sockets_version
18     ## INITENV SETV OPENGL_VERSION %opengl_version
19     ## INITENV SETV X11_VERSION %x11_version
20     ## INITENV SETV PKGTOOLS_SYSTEM_TOOLS %systemtools
21 muzaffar 1.1
22     %prep
23     %build
24     %install
25     # SCRAM ToolBox toolfile
26     mkdir -p %i/etc/scram.d
27     # Sockets
28 muzaffar 1.17 cat << \EOF_TOOLFILE >%i/etc/scram.d/sockets.xml
29     <tool name="sockets" version="%sockets_version">
30 muzaffar 1.1 EOF_TOOLFILE
31     case %cmsplatf in
32 elmer 1.14 slc3_* | slc4_* | slc4onl_* | slc5_* )
33 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml
34     <lib name="nsl"/>
35     <lib name="crypt"/>
36     <lib name="dl"/>
37 elmer 1.19 <lib name="rt"/>
38 muzaffar 1.1 EOF_TOOLFILE
39     ;;
40     osx10* )
41 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml
42     <lib name="dl"/>
43 muzaffar 1.1 EOF_TOOLFILE
44     ;;
45     esac
46 muzaffar 1.17 echo " </tool>" >>%i/etc/scram.d/sockets.xml
47 muzaffar 1.1
48     # OpenGL
49 muzaffar 1.17 cat << \EOF_TOOLFILE >%i/etc/scram.d/opengl.xml
50     <tool name="opengl" version="%opengl_version">
51     <lib name="GL"/>
52     <lib name="GLU"/>
53     <use name="x11"/>
54 muzaffar 1.22 <environment name="ORACLE_ADMINDIR" default="@ORACLE_ENV_ROOT@/etc"/>
55 muzaffar 1.1 EOF_TOOLFILE
56     case %cmsplatf in
57 muzaffar 1.22 osx103* )
58 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/opengl.xml
59     <client>
60     <environment name="OPENGL_BASE" default="/System/Library/Frameworks/OpenGL.framework/Versions/A"/>
61     <environment name="INCLUDE" default="$OPENGL_BASE/Headers"/>
62     <environment name="LIBDIR" default="$OPENGL_BASE/Libraries"/>
63     </client>
64 muzaffar 1.1 EOF_TOOLFILE
65     ;;
66     esac
67 muzaffar 1.17 echo " </tool>" >>%i/etc/scram.d/opengl.xml
68 muzaffar 1.1
69     # X11
70 muzaffar 1.17 cat << \EOF_TOOLFILE >%i/etc/scram.d/x11.xml
71     <tool name="x11" version="%x11_version">
72 muzaffar 1.1 EOF_TOOLFILE
73     case %cmsplatf in
74 muzaffar 1.22 slc3_* )
75 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml
76     <client>
77     <environment name="INCLUDE" value="/usr/X11R6/include"/>
78     <environment name="LIBDIR" value="/usr/X11R6/lib"/>
79     </client>
80     <lib name="Xt"/>
81     <lib name="Xpm"/>
82     <lib name="X11"/>
83     <lib name="Xi"/>
84     <lib name="Xext"/>
85     <lib name="Xmu"/>
86     <lib name="ICE"/>
87     <lib name="SM"/>
88 muzaffar 1.1 EOF_TOOLFILE
89     ;;
90     esac
91 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml
92     <use name="sockets"/>
93     </tool>
94 muzaffar 1.1 EOF_TOOLFILE
95    
96 muzaffar 1.22 export ORACLE_ENV_ROOT
97     perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*.xml
98 muzaffar 1.1
99     %post
100 muzaffar 1.18 %{relocateConfig}etc/scram.d/*.xml