forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccache-gcc-toolfile.spec
41 lines (34 loc) · 1.09 KB
/
ccache-gcc-toolfile.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
### RPM external ccache-gcc-toolfile 1.0
Requires: ccache
%prep
%build
%install
export CCACHE_ROOT
export CCACHE_VERSION
mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/ccache-cxxcompiler.xml
<tool name="ccache-cxxcompiler" version="@CCACHE_VERSION@" type="compiler">
<use name="gcc-cxxcompiler"/>
<client>
<environment name="CXX" value="@CCACHE_ROOT@/bin/c++"/>
<environment name="BUILDENV_CCACHE_BASEDIR" value="$LOCALTOP" handler="warn"/>
</client>
</tool>
EOF_TOOLFILE
cat << \EOF_TOOLFILE >%i/etc/scram.d/ccache-ccompiler.xml
<tool name="ccache-ccompiler" version="@CCACHE_VERSION@" type="compiler">
<use name="gcc-ccompiler"/>
<client>
<environment name="CC" value="@CCACHE_ROOT@/bin/gcc"/>
</client>
</tool>
EOF_TOOLFILE
cat << \EOF_TOOLFILE >%i/etc/scram.d/ccache-f77compiler.xml
<tool name="ccache-f77compiler" version="@CCACHE_VERSION@" type="compiler">
<use name="gcc-f77compiler"/>
<client>
<environment name="FC" default="@CCACHE_ROOT@/bin/gfortran"/>
</client>
</tool>
EOF_TOOLFILE
## IMPORT scram-tools-post