ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lhapdf.spec
Revision: 1.16
Committed: Sat Dec 13 10:54:01 2008 UTC (16 years, 4 months ago) by elmer
Branch: MAIN
CVS Tags: WEBTOOLS-APPS_20090130, WEBTOOLS-APPS_20090129, PRODAGENT_0_12_10_20090122, PRODAGENT_0_12_10_pre1_MISC, sw_20090115a, sw_20090115, pe20081213b-30Xports, pe20081213a-30Xports
Changes since 1.15: +8 -5 lines
Log Message:
Commit the lhapdf.spec file with the 32bit-on-64bit workaround patch

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.16 Patch1: lhapdf-5.6.0-32bit-on-64bit-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.16 %patch1 -p0
21     ./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     <Environment name=LHAPATH default="$LHAPDF_BASE/PDFsets"></Environment>
44     </Client>
45     <Runtime name=LHAPATH value="$LHAPDF_BASE/PDFsets" type=path>
46     <use name=f77compiler>
47     </Tool>
48     EOF_TOOLFILE
49    
50     %post
51     %{relocateConfig}etc/scram.d/%n