1 |
muzaffar |
1.1 |
### RPM virtual systemtools 1.0
|
2 |
|
|
Source: none
|
3 |
|
|
|
4 |
|
|
%define systemtools sockets opengl x11 jcompiler
|
5 |
|
|
%define sockets_version 1.0
|
6 |
|
|
%define opengl_version XFree4.2
|
7 |
|
|
%define x11_version R6
|
8 |
|
|
%define jcompiler_version 1.5.0.p6
|
9 |
|
|
|
10 |
|
|
## INITENV SET SOCKETS_VERSION %sockets_version
|
11 |
|
|
## INITENV SET OPENGL_VERSION %opengl_version
|
12 |
|
|
## INITENV SET X11_VERSION %x11_version
|
13 |
|
|
## INITENV SET JCOMPILER_VERSION %jcompiler_version
|
14 |
|
|
## INITENV SET JCOMPILER_TOOL java-jdk
|
15 |
|
|
## INITENV SET PKGTOOLS_SYSTEM_TOOLS %systemtools
|
16 |
|
|
|
17 |
|
|
%prep
|
18 |
|
|
%build
|
19 |
|
|
%install
|
20 |
|
|
# SCRAM ToolBox toolfile
|
21 |
|
|
mkdir -p %i/etc/scram.d
|
22 |
|
|
# Sockets
|
23 |
|
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/sockets
|
24 |
|
|
<doc type=BuildSystem::ToolDoc version=1.1>
|
25 |
|
|
<Tool name=Sockets version=%sockets_version>
|
26 |
|
|
EOF_TOOLFILE
|
27 |
|
|
case %cmsplatf in
|
28 |
|
|
slc3_* | slc4_* )
|
29 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets
|
30 |
|
|
<lib name=nsl>
|
31 |
|
|
<lib name=crypt>
|
32 |
|
|
<lib name=dl>
|
33 |
|
|
EOF_TOOLFILE
|
34 |
|
|
;;
|
35 |
|
|
osx10* )
|
36 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets
|
37 |
|
|
<lib name=dl>
|
38 |
|
|
EOF_TOOLFILE
|
39 |
|
|
;;
|
40 |
|
|
esac
|
41 |
|
|
echo "</Tool>" >>%i/etc/scram.d/sockets
|
42 |
|
|
|
43 |
|
|
# OpenGL
|
44 |
|
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/opengl
|
45 |
|
|
<doc type=BuildSystem::ToolDoc version=1.1>
|
46 |
|
|
<Tool name=OpenGL version=%opengl_version>
|
47 |
|
|
<use name=X11>
|
48 |
|
|
<lib name=GL>
|
49 |
|
|
<lib name=GLU>
|
50 |
|
|
EOF_TOOLFILE
|
51 |
|
|
case %cmsplatf in
|
52 |
|
|
osx103* )
|
53 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/opengl
|
54 |
|
|
<Client>
|
55 |
|
|
<Environment name=OPENGL_BASE default="/System/Library/Frameworks/OpenGL.framework/Versions/A"></Environment>
|
56 |
|
|
<Environment name=INCLUDE default="$OPENGL_BASE/Headers"></Environment>
|
57 |
|
|
<Environment name=LIBDIR default="$OPENGL_BASE/Libraries"></Environment>
|
58 |
|
|
</Client>
|
59 |
|
|
EOF_TOOLFILE
|
60 |
|
|
;;
|
61 |
|
|
esac
|
62 |
|
|
echo "</Tool>" >>%i/etc/scram.d/opengl
|
63 |
|
|
|
64 |
|
|
# X11
|
65 |
|
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/x11
|
66 |
|
|
<doc type=BuildSystem::ToolDoc version=1.1>
|
67 |
|
|
<Tool name=X11 version=%x11_version>
|
68 |
|
|
EOF_TOOLFILE
|
69 |
|
|
case %cmsplatf in
|
70 |
|
|
slc3_* )
|
71 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11
|
72 |
|
|
<Client>
|
73 |
|
|
<Environment name=INCLUDE value="/usr/X11R6/include"></Environment>
|
74 |
|
|
<Environment name=LIBDIR value="/usr/X11R6/lib"></Environment>
|
75 |
|
|
</Client>
|
76 |
|
|
<lib name=Xt>
|
77 |
|
|
<lib name=Xpm>
|
78 |
|
|
<lib name=X11>
|
79 |
|
|
<lib name=Xi>
|
80 |
|
|
<lib name=Xext>
|
81 |
|
|
<lib name=Xmu>
|
82 |
|
|
<lib name=ICE>
|
83 |
|
|
<lib name=SM>
|
84 |
|
|
EOF_TOOLFILE
|
85 |
|
|
;;
|
86 |
|
|
esac
|
87 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11
|
88 |
|
|
<use name=sockets>
|
89 |
|
|
</Tool>
|
90 |
|
|
EOF_TOOLFILE
|
91 |
|
|
|
92 |
|
|
# JCompiler
|
93 |
|
|
%define compiler_ver %(echo %jcompiler_version | sed -e "s|\\.||g")
|
94 |
|
|
cat << \EOF_TOOLFILE >>%i/etc/scram.d/jcompiler
|
95 |
|
|
<doc type=BuildSystem::ToolDoc version=1.1>
|
96 |
|
|
<Tool name=jcompiler version=%jcompiler_version type=compiler>
|
97 |
|
|
<Client>
|
98 |
|
|
<Environment name=JAVA_BASE></Environment>
|
99 |
|
|
<Environment name=JAVAC value="$JAVA_BASE/bin/javac"></Environment>
|
100 |
|
|
</Client>
|
101 |
|
|
<Runtime name=JAVA_HOME default="$JAVA_BASE">
|
102 |
|
|
<flags JAVAC_="$(JAVAC)">
|
103 |
|
|
<flags JAVAC_o="$(JAVAC) -O">
|
104 |
|
|
<flags JAVAC_d="$(JAVAC) -g">
|
105 |
|
|
<Flags SCRAM_COMPILER_NAME="jsdk%compiler_ver">
|
106 |
|
|
<Flags SCRAM_LANGUAGE_TYPE="JAVA">
|
107 |
|
|
</Tool>
|
108 |
|
|
EOF_TOOLFILE
|
109 |
|
|
|
110 |
|
|
%post
|
111 |
|
|
%{relocateConfig}etc/scram.d/sockets
|
112 |
|
|
%{relocateConfig}etc/scram.d/opengl
|
113 |
|
|
%{relocateConfig}etc/scram.d/x11
|
114 |
|
|
%{relocateConfig}etc/scram.d/jcompiler
|