ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lhapdf.spec
Revision: 1.19
Committed: Fri Feb 6 08:24:10 2009 UTC (16 years, 2 months ago) by elmer
Branch: MAIN
Changes since 1.18: +1 -1 lines
Log Message:
Fix also the Runtime LHAPDF to correspond to version 5.6.0

File Contents

# User Rev Content
1 elmer 1.15 ### RPM external lhapdf 5.6.0
2 ratnik 1.2 %define realversion %(echo %v | cut -d- -f1)
3     Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz
4 elmer 1.15 Patch0: lhapdf-5.6.0-g77
5 elmer 1.17 Patch1: lhapdf-5.6.0-32bit-on-64bit-recheck-workaround
6 elmer 1.15
7 ratnik 1.1 %prep
8 ratnik 1.2 %setup -q -n %{n}/%{realversion}
9 elmer 1.16 # This applies both old and new fixes, probably the gcc4 ones can go (to check)
10 elmer 1.14 case %gccver in
11     4.*)
12     # Switch to gfortran
13     perl -p -i -e 's|^export F77\=g77|export F77=gfortran|' .scripts/platform_functions
14     perl -p -i -e 's| -Wno-globals||' configure
15     ;;
16 elmer 1.15 3.*)
17     %patch0 -p2
18     ;;
19 elmer 1.14 esac
20 elmer 1.17 %patch1 -p2
21 elmer 1.16 ./configure --disable-pyext --enable-low-memory --prefix=%i --with-max-num-pdfsets=1
22 ratnik 1.1
23     %build
24 elmer 1.16 which perl
25 elmer 1.15 cp Makefile Makefile.orig
26 elmer 1.16 perl -p -i -e 's|/usr/lib64/libm.a||g' config.status
27     perl -p -i -e 's|/usr/lib64/libc.a||g' config.status
28 ratnik 1.1 make
29    
30     %install
31 elmer 1.16 make install
32 muzaffar 1.9 # SCRAM ToolBox toolfile
33     mkdir -p %i/etc/scram.d
34     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
35     <doc type=BuildSystem::ToolDoc version=1.0>
36     <Tool name=lhapdf version=%v>
37     <lib name=lhapdf>
38     <lib name=lhapdf_dummy>
39     <Client>
40     <Environment name=LHAPDF_BASE default="%i"></Environment>
41     <Environment name=LIBDIR default="$LHAPDF_BASE/lib"></Environment>
42     <Environment name=INCLUDE default="$LHAPDF_BASE/include"></Environment>
43 elmer 1.18 <Environment name=LHAPATH default="$LHAPDF_BASE/share/lhapdf/PDFsets"></Environment>
44 muzaffar 1.9 </Client>
45 elmer 1.19 <Runtime name=LHAPATH value="$LHAPDF_BASE/share/lhapdf/PDFsets" type=path>
46 muzaffar 1.9 <use name=f77compiler>
47     </Tool>
48     EOF_TOOLFILE
49    
50     %post
51     %{relocateConfig}etc/scram.d/%n