ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/systemtools.spec
Revision: 1.18
Committed: Tue Aug 10 15:25:08 2010 UTC (14 years, 8 months ago) by muzaffar
Branch: MAIN
CVS Tags: pe20100907c-for39Xrb, pe20100907b-for39Xrb, pe20100907a-for39Xrb, pe20100906a-for39Xrb, pe20100902a-for39Xrb, pe20100901b-for39Xrb, pe20100901a-for39Xrb, pe20100830c-for39Xrb, pe20100830b-for39Xrb, pe20100830a-for39Xrb, pe20100829a-for39Xrb, pe20100827a-for39Xrb, sm100826a, pe20100826a-for39Xrb, pe20100825b-for39Xrb, pe20100825a-for39Xrb, pe20100824c-for39Xrb, pe20100824b-for39Xrb, sm100824a, pe20100824a-for39Xrb, sm100811b, sm100811a, sm20100810a
Changes since 1.17: +1 -4 lines
Log Message:
cleanup for toolfiles which are now in separate spec files to avoid re-build of the external in case tool definition needs update

File Contents

# User Rev Content
1 elmer 1.11 ### RPM external systemtools 19
2 muzaffar 1.1 Source: none
3    
4 ratnik 1.7 %if "%{?use_system_gcc:set}" == "set"
5     %define compilertools ccompiler cxxcompiler f77compiler jcompiler
6     %else
7     %define compilertools %jcompiler
8     %endif
9    
10 muzaffar 1.15 %define systemtools sockets opengl x11 %compilertools
11 muzaffar 1.1 %define sockets_version 1.0
12     %define opengl_version XFree4.2
13     %define x11_version R6
14 dlange 1.2 ### why oh why is this hardwired??
15 elmer 1.8 %define jcompiler_version 1.5.0.p6-CMS18
16 muzaffar 1.1
17     ## INITENV SET SOCKETS_VERSION %sockets_version
18     ## INITENV SET OPENGL_VERSION %opengl_version
19     ## INITENV SET X11_VERSION %x11_version
20     ## INITENV SET JCOMPILER_VERSION %jcompiler_version
21     ## INITENV SET JCOMPILER_TOOL java-jdk
22     ## INITENV SET PKGTOOLS_SYSTEM_TOOLS %systemtools
23    
24     %prep
25     %build
26     %install
27     # SCRAM ToolBox toolfile
28     mkdir -p %i/etc/scram.d
29     # Sockets
30 muzaffar 1.17 cat << \EOF_TOOLFILE >%i/etc/scram.d/sockets.xml
31     <tool name="sockets" version="%sockets_version">
32 muzaffar 1.1 EOF_TOOLFILE
33     case %cmsplatf in
34 elmer 1.14 slc3_* | slc4_* | slc4onl_* | slc5_* )
35 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml
36     <lib name="nsl"/>
37     <lib name="crypt"/>
38     <lib name="dl"/>
39 muzaffar 1.1 EOF_TOOLFILE
40     ;;
41     osx10* )
42 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml
43     <lib name="dl"/>
44 muzaffar 1.1 EOF_TOOLFILE
45     ;;
46     esac
47 muzaffar 1.17 echo " </tool>" >>%i/etc/scram.d/sockets.xml
48 muzaffar 1.1
49     # OpenGL
50 muzaffar 1.17 cat << \EOF_TOOLFILE >%i/etc/scram.d/opengl.xml
51     <tool name="opengl" version="%opengl_version">
52     <lib name="GL"/>
53     <lib name="GLU"/>
54     <use name="x11"/>
55 muzaffar 1.1 EOF_TOOLFILE
56     case %cmsplatf in
57     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     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     # JCompiler
97     %define compiler_ver %(echo %jcompiler_version | sed -e "s|\\.||g")
98 muzaffar 1.17 cat << \EOF_TOOLFILE >>%i/etc/scram.d/jcompiler.xml
99     <tool name="jcompiler" version="%jcompiler_version" type="compiler">
100     <client>
101     <environment name="JAVA_BASE"/>
102     <environment name="JAVAC" value="$JAVA_BASE/bin/javac"/>
103     </client>
104     <flags javac_="$(JAVAC)"/>
105     <flags javac_o="$(JAVAC) -O"/>
106     <flags javac_d="$(JAVAC) -g"/>
107     <flags scram_compiler_name="jsdk%compiler_ver"/>
108     <flags scram_language_type="JAVA"/>
109     <runtime name="JAVA_HOME" default="$JAVA_BASE"/>
110     </tool>
111 muzaffar 1.1 EOF_TOOLFILE
112    
113     %post
114 muzaffar 1.18 %{relocateConfig}etc/scram.d/*.xml