1 |
< |
### RPM external lhapdf 5.2.3-cms |
2 |
< |
Requires: gcc-wrapper |
3 |
< |
%define gccwrapperarch slc4_ia32_gcc345 |
1 |
> |
### RPM external lhapdf 5.2.3-CMS19 |
2 |
|
%define realversion %(echo %v | cut -d- -f1) |
3 |
|
Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz |
4 |
|
%prep |
5 |
|
%setup -q -n %{n}/%{realversion} |
6 |
+ |
case %gccver in |
7 |
+ |
4.*) |
8 |
+ |
# Switch to gfortran |
9 |
+ |
perl -p -i -e 's|^export F77\=g77|export F77=gfortran|' .scripts/platform_functions |
10 |
+ |
perl -p -i -e 's| -Wno-globals||' configure |
11 |
+ |
;; |
12 |
+ |
esac |
13 |
|
./configure |
14 |
|
|
15 |
|
%build |
11 |
– |
## IMPORT gcc-wrapper |
16 |
|
make |
17 |
|
|
18 |
|
%install |
19 |
|
tar -c lib include PDFsets | tar -x -C %i |
20 |
+ |
# SCRAM ToolBox toolfile |
21 |
+ |
mkdir -p %i/etc/scram.d |
22 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
23 |
+ |
<doc type=BuildSystem::ToolDoc version=1.0> |
24 |
+ |
<Tool name=lhapdf version=%v> |
25 |
+ |
<lib name=lhapdf> |
26 |
+ |
<lib name=lhapdf_dummy> |
27 |
+ |
<Client> |
28 |
+ |
<Environment name=LHAPDF_BASE default="%i"></Environment> |
29 |
+ |
<Environment name=LIBDIR default="$LHAPDF_BASE/lib"></Environment> |
30 |
+ |
<Environment name=INCLUDE default="$LHAPDF_BASE/include"></Environment> |
31 |
+ |
<Environment name=LHAPATH default="$LHAPDF_BASE/PDFsets"></Environment> |
32 |
+ |
</Client> |
33 |
+ |
<Runtime name=LHAPATH value="$LHAPDF_BASE/PDFsets" type=path> |
34 |
+ |
<use name=f77compiler> |
35 |
+ |
</Tool> |
36 |
+ |
EOF_TOOLFILE |
37 |
+ |
|
38 |
+ |
%post |
39 |
+ |
%{relocateConfig}etc/scram.d/%n |