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 |
elmer |
1.19 |
<lib name="rt"/>
|
40 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
41 |
|
|
;;
|
42 |
|
|
osx10* )
|
43 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml
|
44 |
|
|
<lib name="dl"/>
|
45 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
46 |
|
|
;;
|
47 |
|
|
esac
|
48 |
muzaffar |
1.17 |
echo " </tool>" >>%i/etc/scram.d/sockets.xml
|
49 |
muzaffar |
1.1 |
|
50 |
|
|
# OpenGL
|
51 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >%i/etc/scram.d/opengl.xml
|
52 |
|
|
<tool name="opengl" version="%opengl_version">
|
53 |
|
|
<lib name="GL"/>
|
54 |
|
|
<lib name="GLU"/>
|
55 |
|
|
<use name="x11"/>
|
56 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
57 |
|
|
case %cmsplatf in
|
58 |
eulisse |
1.20 |
osx10* )
|
59 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >>%i/etc/scram.d/opengl.xml
|
60 |
|
|
<client>
|
61 |
|
|
<environment name="OPENGL_BASE" default="/System/Library/Frameworks/OpenGL.framework/Versions/A"/>
|
62 |
|
|
<environment name="INCLUDE" default="$OPENGL_BASE/Headers"/>
|
63 |
|
|
<environment name="LIBDIR" default="$OPENGL_BASE/Libraries"/>
|
64 |
|
|
</client>
|
65 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
66 |
|
|
;;
|
67 |
|
|
esac
|
68 |
muzaffar |
1.17 |
echo " </tool>" >>%i/etc/scram.d/opengl.xml
|
69 |
muzaffar |
1.1 |
|
70 |
|
|
# X11
|
71 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >%i/etc/scram.d/x11.xml
|
72 |
|
|
<tool name="x11" version="%x11_version">
|
73 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
74 |
|
|
case %cmsplatf in
|
75 |
|
|
slc3_* )
|
76 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml
|
77 |
|
|
<client>
|
78 |
|
|
<environment name="INCLUDE" value="/usr/X11R6/include"/>
|
79 |
|
|
<environment name="LIBDIR" value="/usr/X11R6/lib"/>
|
80 |
|
|
</client>
|
81 |
|
|
<lib name="Xt"/>
|
82 |
|
|
<lib name="Xpm"/>
|
83 |
|
|
<lib name="X11"/>
|
84 |
|
|
<lib name="Xi"/>
|
85 |
|
|
<lib name="Xext"/>
|
86 |
|
|
<lib name="Xmu"/>
|
87 |
|
|
<lib name="ICE"/>
|
88 |
|
|
<lib name="SM"/>
|
89 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
90 |
|
|
;;
|
91 |
|
|
esac
|
92 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml
|
93 |
|
|
<use name="sockets"/>
|
94 |
|
|
</tool>
|
95 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
96 |
|
|
|
97 |
|
|
# JCompiler
|
98 |
|
|
%define compiler_ver %(echo %jcompiler_version | sed -e "s|\\.||g")
|
99 |
muzaffar |
1.17 |
cat << \EOF_TOOLFILE >>%i/etc/scram.d/jcompiler.xml
|
100 |
|
|
<tool name="jcompiler" version="%jcompiler_version" type="compiler">
|
101 |
|
|
<client>
|
102 |
|
|
<environment name="JAVA_BASE"/>
|
103 |
|
|
<environment name="JAVAC" value="$JAVA_BASE/bin/javac"/>
|
104 |
|
|
</client>
|
105 |
|
|
<flags javac_="$(JAVAC)"/>
|
106 |
|
|
<flags javac_o="$(JAVAC) -O"/>
|
107 |
|
|
<flags javac_d="$(JAVAC) -g"/>
|
108 |
|
|
<flags scram_compiler_name="jsdk%compiler_ver"/>
|
109 |
|
|
<flags scram_language_type="JAVA"/>
|
110 |
|
|
<runtime name="JAVA_HOME" default="$JAVA_BASE"/>
|
111 |
|
|
</tool>
|
112 |
muzaffar |
1.1 |
EOF_TOOLFILE
|
113 |
|
|
|
114 |
|
|
%post
|
115 |
muzaffar |
1.18 |
%{relocateConfig}etc/scram.d/*.xml
|