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.1 by ratnik, Tue Apr 3 11:07:48 2007 UTC vs.
Revision 1.23 by andreasp, Thu May 14 20:09:31 2009 UTC

# Line 1 | Line 1
1 < ### RPM external lhapdf 5.2.3
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 < Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}-%{v}-src.tgz
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}/%{v}
11 < ./configure
10 > %setup -q -n %{n}/%{realversion}
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 + ./configure --disable-pyext --enable-low-memory --prefix=%i --with-max-num-pdfsets=1
26 +
27 + which perl
28 + cp Makefile Makefile.orig
29 + perl -p -i -e 's|/usr/lib64/libm.a||g' config.status
30 + perl -p -i -e 's|/usr/lib64/libc.a||g' config.status
31 + perl -p -i -e 's|/usr/lib64/libm.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
32 + perl -p -i -e 's|/usr/lib64/libc.a||g' Makefile */Makefile */*/Makefile */*/*/Makefile
33   make
34  
35   %install
36 < tar -c lib bin PDFsets | tar -x -C %i
36 > make install
37 > # SCRAM ToolBox toolfile
38 > mkdir -p %i/etc/scram.d
39 > cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
40 > <doc type=BuildSystem::ToolDoc version=1.0>
41 > <Tool name=lhapdf version=%v>
42 > <lib name=LHAPDF>
43 > <Client>
44 > <Environment name=LHAPDF_BASE default="%i"></Environment>
45 > <Environment name=LIBDIR default="$LHAPDF_BASE/lib"></Environment>
46 > <Environment name=INCLUDE default="$LHAPDF_BASE/include"></Environment>
47 > <Environment name=LHAPATH default="$LHAPDF_BASE/share/lhapdf/PDFsets"></Environment>
48 > </Client>
49 > <Runtime name=LHAPATH value="$LHAPDF_BASE/share/lhapdf/PDFsets" type=path>
50 > <use name=f77compiler>
51 > </Tool>
52 > EOF_TOOLFILE
53 >
54 > cat << \EOF_TOOLFILE >%i/etc/scram.d/lhapdfwrap
55 > <doc type=BuildSystem::ToolDoc version=1.0>
56 > <Tool name=lhapdfwrap version=%v>
57 > <lib name=LHAPDFWrap>
58 > <use name=lhapdf>
59 > </Tool>
60 > EOF_TOOLFILE
61  
62 + %post
63 + %{relocateConfig}etc/scram.d/%n

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines