-
Notifications
You must be signed in to change notification settings - Fork 176
/
lhapdf6.spec
53 lines (42 loc) · 1.65 KB
/
lhapdf6.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
### RPM external lhapdf6 6.1.2
%define realversion %(echo %{v} | cut -d- -f1)
Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}/%{n}-%{realversion}-src.tgz
Source1: lhapdf6_makeLinks
Source2: http://www.hepforge.org/archive/lhapdf/pdfsets/6.1/cteq6l1.tar.gz
Source3: http://www.hepforge.org/archive/lhapdf/pdfsets/6.1/CT10.tar.gz
Source4: http://www.hepforge.org/archive/lhapdf/pdfsets/6.1/MSTW2008nlo68cl.tar.gz
Requires: boost yaml-cpp python cython
BuildRequires: autotools
%if "%{?cms_cxx:set}" != "set"
%define cms_cxx c++
%endif
%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -O2 -std=c++0x
%endif
%prep
%setup -q -n %{n}/%{realversion}
./configure --prefix=%{i} --with-boost=${BOOST_ROOT} --with-yaml-cpp=${YAML-CPP_ROOT} PYTHON=${PYTHON_ROOT}/bin/python CYTHON=${CYTHON_ROOT}/bin/cython PYTHONPATH=${CYTHON_ROOT}/lib/python@PYTHONV@/site-packages
%build
make all %makeprocesses PYTHONPATH=${CYTHON_ROOT}/lib/python@PYTHONV@/site-packages
%install
make install PYTHONPATH=${CYTHON_ROOT}/lib/python@PYTHONV@/site-packages
mkdir -p %{i}/share/LHAPDF/PDFsets
cd %{i}/share/LHAPDF/PDFsets
ln -fs ../pdfsets.index pdfsets.index
ln -fs ../lhapdf.conf lhapdf.conf
#wget http://www.hepforge.org/archive/lhapdf/pdfsets/6.0/cteq6l1.tar.gz
cp %{_sourcedir}/cteq6l1.tar.gz .
cp %{_sourcedir}/CT10.tar.gz .
cp %{_sourcedir}/MSTW2008nlo68cl.tar.gz .
tar xvfz cteq6l1.tar.gz
tar xvfz CT10.tar.gz
tar xvfz MSTW2008nlo68cl.tar.gz
rm -f cteq6l1.tar.gz
rm -f CT10.tar.gz
rm -f MSTW2008nlo68cl.tar.gz
chmod a+x %{_sourcedir}/lhapdf6_makeLinks
%{_sourcedir}/lhapdf6_makeLinks
cd -
%post
%{relocateConfig}bin/lhapdf-config
%{relocateConfig}full/bin/lhapdf-config