ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/lhapdf.spec
(Generate patch)

Comparing COMP/CMSDIST/lhapdf.spec (file contents):
Revision 1.5 by ratnik, Thu Apr 19 23:02:12 2007 UTC vs.
Revision 1.24 by elmer, Mon Jul 20 20:05:43 2009 UTC

# Line 1 | Line 1
1 < ### RPM external lhapdf 5.2.3-cms
2 < Requires: gcc-wrapper
3 < %define gccwrapperarch slc4_ia32_gcc345
1 > ### RPM external lhapdf 5.6.0
2 > ## BUILDIF case $(uname):$(uname -p) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;;  Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac
3 >
4   %define realversion %(echo %v | cut -d- -f1)
5   Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{realversion}-src.tgz
6 + Patch0: lhapdf-5.6.0-g77
7 + Patch1: lhapdf-5.6.0-32bit-on-64bit-recheck-workaround
8 +  
9   %prep
10   %setup -q -n %{n}/%{realversion}
11 < ./configure
11 > # This applies both old and new fixes, probably the gcc4 ones can go (to check)
12 > 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 >  3.*)
19 > %patch0 -p2
20 >  ;;
21 > esac
22 > %patch1 -p2
23  
24   %build
25 < ## IMPORT gcc-wrapper
25 > ./configure --disable-pyext --enable-low-memory --prefix=%i --with-max-num-pdfsets=1
26 >
27 > 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 > 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   make
32  
33   %install
34 < tar -c lib include PDFsets | tar -x -C %i
34 > make install
35 > # 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 > # 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 > <lib name=LHAPDF>
53 > <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 > <Environment name=LHAPATH default="$LHAPDF_BASE/share/lhapdf/PDFsets"></Environment>
58 > </Client>
59 > <Runtime name=LHAPATH value="$LHAPDF_BASE/share/lhapdf/PDFsets" type=path>
60 > <use name=f77compiler>
61 > </Tool>
62 > EOF_TOOLFILE
63 >
64 > 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 > # 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 > %post
99 > %{relocateConfig}etc/scram.d/%n
100 > %{relocateConfig}etc/scram.d/%fullname

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines