ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lhapdf.spec
Revision: 1.24
Committed: Mon Jul 20 20:05:43 2009 UTC (15 years, 9 months ago) by elmer
Branch: MAIN
CVS Tags: DQMGUI_5_1_6, DQMGUI_5_1_5, dg20091203-comp-base, DQMGUI_5_1_5_pre1, DQMGUI_5_1_4, apFor333v0_sl5igcc4, apFor333v0_sl4igcc4, apFor333v0, CMSSW_3_3_2_ONLINE-slc5, sm091112c-slc5onl, sm091112b-slc5onl, sm091112a-slc5onl, sm091112-slc5onl, CMSSW_3_3_2_onlpatch2_ONLINE, CMSSW_3_3_2_ONLINE, CMSSW_3_3_2_onlpatch1_ONLINE, ap20091107-slc5onl, CMSSW_3_4_0_pre5-slc5-gcc434, CMSSW_3_4_0_pre5-slc4-gcc432, CMSSW_3_4_0_pre4-slc4-gcc432, CMSSW_3_4_0_pre5-slc4_gcc432, dl091106, DQMGUI_5_1_3, DQMGUI_5_1_2, ap-20091103a-slc5onl-bootstrap, ap-20091103-slc5onl-bootstrap, DQMGUI_5_1_1, CMSSW_3_3_2_FWLITE-slc5-gcc434, apFor332fwlv1, apFor332fwlv1-slc5-gcc434, apFor332fwlv0, eskFor340p4, CMSSW_3_3_2-slc5-gcc434, CMSSW_3_3_2-slc4-gcc432, CMSSW_3_3_2, DQMGUI_5_1_0, apFor332v0_sl4igcc4, apFor332v0_sl5igcc4, apFor332v0, pe20091030a-for34X, CMSSW_3_4_0_pre3, CouchDB_0_10_0, eskFor340p3, apFor331fwlv1-slc5gcc434, apFor331fwlv1, apFor331fwlv0, sm091023b-slc5onl, sm091023a-slc5onl, CMSSW_3_3_1-slc5-gcc434, CMSSW_3_3_1-slc4-gcc432, CMSSW_3_3_1, CMSSW_3_3_0_onlpatch2_ONLINE, for330op2, pe20091022a-ports, pe20091022a-ports5, pe20091022a-for33X, CMSSW_3_3_0_onlpatch1_ONLINE, pe20091021a-ports5, pe20091021a-ports, pe20091021a-for33X, CMSSW_3_4_0_pre2-432, CMSSW_3_4_0_pre1-432, CMSSW_3_4_0_pre2, pe20091018a-ports5, ge20091019, sm340p2, CERNOIDv01, ge20091015-comp-bootstrap, CMSSW_3_3_0-slc5, CMSSW_3_3_0-432, WMCORE-before-refactor, CMSSW_3_3_0_ONLINE, sm091013a, sm091012c, sm091012b, CMSSW_3_3_0, apFor330v0, pe20091009a-for33X, pe20091008d-ports5, pe20091008d-ports, pe20091008d-for33X, pe20091008c-ports5, ge20091008-fix-rpm-relocation, CMSSW_3_4_0_pre1, pe20091008b-ports5, pe20091008a-ports5, ge20091010-bootstrap, pe20091006e-ports5, ge20091006-bootstrap-3, pe20091006d-ports5, ge20091006-bootstrap-2, CMSSW_3_3_0_pre6-432, pe20091006c-ports5, ge20091006, pe20091006b-ports5, pe20091006a-ports5, pe20091006a-ports, pe20091006a-for33X, CMSSW_3_3_0_pre6, apFor330pre6v0, PerfSuiteDB_20090930, pe20090929a-ports, pe20090929a-for33X, ge20090929-amd64, ge20090929-ia32, ap20090929a-ports, ap20090929a-for33X, ap20090929-for33X, CMSSW_3_3_0_pre5-432, CMSSW_3_3_0_pre5, apFor330pre5v0, pe20090925a-ports, pe20090925a-for33X, pe20090924b-for33X, pe20090924a-ports, pe20090924a-for33X, pe20090923b-for33X, pe20090923b-ports, pe20090923a-ports, pe20090923a-for33X, pe20090922e-ports, pe20090922e-for33X, pe20090922d-ports, pe20090922c-ports, pe20090922c-for33X, pe20090922b-ports, pe20090922a-ports, pe20090922a-for33X, ge20090922-ports, pe20090921d-ports, pe20090921d-for33X, ge20090921-ports, pe20090921c-ports, pe20090921c-for33X, pe20090921b-for33X, pe20090921a-ports, CMSSW_3_3_0_pre4, apFor330pre4v0, pe20090918a-ports, PerfSuiteDB_20090916, pe20090912a-ports-xdaq, pe20090911a-ports-xdaq, CMSSW_3_3_0_pre3, apFor330pre3v0, pe20090907a-ports, pe20090907a-for33X, CMSSW_3_3_0_pre2, apFor330pre2v1, apFor330pre2v0, PerfSuiteDB_20090904_almost_stable, pe20090904a-ports, pe20090904a-for33X, PerfSuiteDB_20090904, pe20090903b-for33X, pe20090903b-ports, pe20090903a-ports, pe20090903-for33X, PerfSuiteDB_20090901, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, pe20090722a-31Xports-432
Changes since 1.23: +39 -2 lines
Log Message:
Changes from Fabian (with some fixes from me) to build also the "full"
version of the LHAPDF library and install it in a subdirectory. Some
monkeying around might still be necessary here to deal with how scram
symlinks the libraries to a single area for CMSSW. (Plus the redundant
bin, include and share (albeit sans PDFsets) areas can presumably be
eliminated.)

File Contents

# User Rev Content
1 elmer 1.15 ### RPM external lhapdf 5.6.0
2 andreasp 1.23 ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
3    
4 ratnik 1.2 %define realversion %(echo %v | cut -d- -f1)
5     Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz
6 elmer 1.15 Patch0: lhapdf-5.6.0-g77
7 elmer 1.17 Patch1: lhapdf-5.6.0-32bit-on-64bit-recheck-workaround
8 dlange 1.22
9 ratnik 1.1 %prep
10 ratnik 1.2 %setup -q -n %{n}/%{realversion}
11 elmer 1.16 # This applies both old and new fixes, probably the gcc4 ones can go (to check)
12 elmer 1.14 case %gccver in
13     4.*)
14     # Switch to gfortran
15     perl -p -i -e 's|^export F77\=g77|export F77=gfortran|' .scripts/platform_functions
16     perl -p -i -e 's| -Wno-globals||' configure
17     ;;
18 elmer 1.15 3.*)
19     %patch0 -p2
20     ;;
21 elmer 1.14 esac
22 elmer 1.17 %patch1 -p2
23 andreasp 1.23
24     %build
25 elmer 1.16 ./configure --disable-pyext --enable-low-memory --prefix=%i --with-max-num-pdfsets=1
26 ratnik 1.1
27 elmer 1.16 perl -p -i -e 's|/usr/lib64/libm.a||g' config.status
28     perl -p -i -e 's|/usr/lib64/libc.a||g' config.status
29 elmer 1.20 perl -p -i -e 's|/usr/lib64/libm.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
30     perl -p -i -e 's|/usr/lib64/libc.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
31 ratnik 1.1 make
32    
33     %install
34 elmer 1.16 make install
35 elmer 1.24 # do another install-round for full libs
36     make distclean
37     %define fulllibpath %(echo %i"/full")
38     %define fullname %(echo %n"full")
39     ./configure --disable-pyext --prefix=%fulllibpath --disable-pdfsets
40     perl -p -i -e 's|/usr/lib64/libm.a||g' config.status
41     perl -p -i -e 's|/usr/lib64/libc.a||g' config.status
42     perl -p -i -e 's|/usr/lib64/libm.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
43     perl -p -i -e 's|/usr/lib64/libc.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
44     make
45     make install
46    
47 muzaffar 1.9 # SCRAM ToolBox toolfile
48     mkdir -p %i/etc/scram.d
49     cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
50     <doc type=BuildSystem::ToolDoc version=1.0>
51     <Tool name=lhapdf version=%v>
52 elmer 1.21 <lib name=LHAPDF>
53 muzaffar 1.9 <Client>
54     <Environment name=LHAPDF_BASE default="%i"></Environment>
55     <Environment name=LIBDIR default="$LHAPDF_BASE/lib"></Environment>
56     <Environment name=INCLUDE default="$LHAPDF_BASE/include"></Environment>
57 elmer 1.18 <Environment name=LHAPATH default="$LHAPDF_BASE/share/lhapdf/PDFsets"></Environment>
58 muzaffar 1.9 </Client>
59 elmer 1.19 <Runtime name=LHAPATH value="$LHAPDF_BASE/share/lhapdf/PDFsets" type=path>
60 muzaffar 1.9 <use name=f77compiler>
61     </Tool>
62     EOF_TOOLFILE
63    
64 elmer 1.21 cat << \EOF_TOOLFILE >%i/etc/scram.d/lhapdfwrap
65     <doc type=BuildSystem::ToolDoc version=1.0>
66     <Tool name=lhapdfwrap version=%v>
67     <lib name=LHAPDFWrap>
68     <use name=lhapdf>
69     </Tool>
70     EOF_TOOLFILE
71    
72 elmer 1.24 # SCRAM ToolBox toolfiles for full libs
73     mkdir -p %i/etc/scram.d
74     cat << \EOF_TOOLFILE >%i/etc/scram.d/%fullname
75     <doc type=BuildSystem::ToolDoc version=1.0>
76     <Tool name=lhapdffull version=%v>
77     <lib name=LHAPDF>
78     <Client>
79     <Environment name=LHAPDF_BASE default="%i"></Environment>
80     <Environment name=LHAPATH_BASE default="%i"></Environment>
81     <Environment name=LIBDIR default="$LHAPDF_BASE/full/lib"></Environment>
82     <Environment name=INCLUDE default="$LHAPDF_BASE/include"></Environment>
83     <Environment name=LHAPATH default="$LHAPATH_BASE/share/lhapdf/PDFsets"></Environment>
84     </Client>
85     <Runtime name=LHAPATH value="$LHAPATH_BASE/share/lhapdf/PDFsets" type=path>
86     <use name=f77compiler>
87     </Tool>
88     EOF_TOOLFILE
89    
90     cat << \EOF_TOOLFILE >%i/etc/scram.d/lhapdfwrapfull
91     <doc type=BuildSystem::ToolDoc version=1.0>
92     <Tool name=lhapdfwrap version=%v>
93     <lib name=LHAPDFWrap>
94     <use name=lhapdffull>
95     </Tool>
96     EOF_TOOLFILE
97    
98 muzaffar 1.9 %post
99     %{relocateConfig}etc/scram.d/%n
100 elmer 1.24 %{relocateConfig}etc/scram.d/%fullname