1 |
elmer |
1.16 |
### RPM external gccxml 0.6.0-CMS19
|
2 |
elmer |
1.15 |
# or gccxml 0.7.0_20070615-CMS18
|
3 |
elmer |
1.14 |
%define gccxmlmajorver %(echo %realversion | cut -f1,2 -d.)
|
4 |
eulisse |
1.1 |
Requires: cmake
|
5 |
elmer |
1.15 |
# The next 5 lines are needed for 0.6.0
|
6 |
|
|
Source: http://www.gccxml.org/files/v0.6/%n-%realversion.tar.gz
|
7 |
|
|
Patch1: gccxml1
|
8 |
|
|
Patch2: gccxml2
|
9 |
|
|
Patch3: gccxml3
|
10 |
|
|
Patch4: gccxml4
|
11 |
|
|
# The next 2 lines are needed for 0.7.0_20070615
|
12 |
elmer |
1.14 |
#Source: http://www.gccxml.org/files/v0.6/%n-%realversion.tar.gz
|
13 |
elmer |
1.15 |
#Patch5: gccxml-0.7.0-version
|
14 |
eulisse |
1.1 |
|
15 |
|
|
%prep
|
16 |
elmer |
1.15 |
%setup -n %{n}-%{realversion} # for 0.6.0 (this and next line)
|
17 |
|
|
%patch2 -p1
|
18 |
|
|
# For 0.7.0 (next 2 lines)
|
19 |
|
|
#%setup -n %{n}
|
20 |
|
|
#%patch5 -p1
|
21 |
eulisse |
1.1 |
|
22 |
|
|
%build
|
23 |
|
|
mkdir gccxml-build
|
24 |
|
|
cd gccxml-build
|
25 |
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=%i ..
|
26 |
eulisse |
1.2 |
make %makeprocesses
|
27 |
eulisse |
1.1 |
|
28 |
|
|
%install
|
29 |
|
|
cd gccxml-build
|
30 |
|
|
make install
|
31 |
|
|
cd %i
|
32 |
elmer |
1.15 |
# For 0.6.0 (next 4 lines)
|
33 |
|
|
patch -p1 <%{_sourcedir}/gccxml1
|
34 |
|
|
patch -p1 <%{_sourcedir}/gccxml3
|
35 |
|
|
cd share/gccxml-0.6
|
36 |
|
|
patch -p3 <%{_sourcedir}/gccxml4
|
37 |
|
|
|
38 |
eulisse |
1.1 |
|
39 |
muzaffar |
1.9 |
# SCRAM ToolBox toolfile
|
40 |
|
|
mkdir -p %i/etc/scram.d
|
41 |
|
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
|
42 |
|
|
<doc type=BuildSystem::ToolDoc version=1.0>
|
43 |
|
|
<Tool name=%n version=%v>
|
44 |
|
|
<Client>
|
45 |
|
|
<Environment name=GCCXML_BASE default="%i"></Environment>
|
46 |
|
|
</Client>
|
47 |
|
|
<Runtime name=PATH value="$GCCXML_BASE/bin" type=path>
|
48 |
|
|
</Tool>
|
49 |
|
|
EOF_TOOLFILE
|
50 |
|
|
|
51 |
eulisse |
1.4 |
%post
|
52 |
elmer |
1.14 |
%{relocateConfig}share/gccxml-%{gccxmlmajorver}/gccxml_config
|
53 |
muzaffar |
1.9 |
%{relocateConfig}etc/scram.d/%n
|