806f848
%if %{?fedora}%{!?fedora:0} >= 29 || %{?rhel}%{!?rhel:0} >= 8
806f848
%global py3default 1
806f848
%else
806f848
%global py3default 0
806f848
%endif
806f848
6b281f5
Name:		lhapdf
de5282d
Version:	6.3.0
de5282d
Release:	1%{?dist}
6b281f5
Summary:	Les Houches Accord PDF Interface
6b281f5
6f9b0a4
License:	GPLv3+
6f9b0a4
URL:		https://lhapdf.hepforge.org/
de5282d
Source0:	https://www.hepforge.org/archive/lhapdf/LHAPDF-%{version}.tar.gz
6f9b0a4
#		Add soname to the shared library, cf. SuSE's spec file.
6f9b0a4
Patch0:		%{name}-soname.patch
6f9b0a4
6f9b0a4
BuildRequires:	gcc-c++
6f9b0a4
BuildRequires:	/usr/bin/cython
ccc2ee7
%if ! %{py3default}
4426165
BuildRequires:	python2-devel
ccc2ee7
%endif
2f68c28
BuildRequires:	python%{python3_pkgversion}-devel
de5282d
%if %{?rhel}%{!?rhel:0} == 7
ce06474
BuildRequires:	python%{python3_other_pkgversion}-devel
6f9b0a4
%endif
6b281f5
BuildRequires:	doxygen
6f9b0a4
6f9b0a4
#		Obsolete LHAPDF5 packages not provided by LHAPDF6
6f9b0a4
Obsoletes:	octave-lhapdf < 6
6f9b0a4
Obsoletes:	lhapdf-pdfsets-minimal < 6
ccc2ee7
%if %{py3default}
ccc2ee7
Obsoletes:	python2-lhapdf < %{version}-%{release}
ccc2ee7
%endif
6b281f5
6b281f5
%description
6f9b0a4
LHAPDF is a general purpose C++ interpolator, used for evaluating PDFs
6f9b0a4
from discretized data files. Previous versions of LHAPDF were written
6f9b0a4
in Fortran 77/90 and are documented at http://lhapdf.hepforge.org/lhapdf5/.
6f9b0a4
6f9b0a4
LHAPDF6 vastly reduces the memory overhead of the Fortran LHAPDF (from
6f9b0a4
gigabytes to megabytes!), entirely removes restrictions on numbers of
6f9b0a4
concurrent PDFs, allows access to single PDF members without needing
6f9b0a4
to load whole sets, and separates a new standardized PDF data format
6f9b0a4
from the code library so that new PDF sets may be created and released
6f9b0a4
easier and faster. The C++ LHAPDF6 also permits arbitrary parton
6f9b0a4
contents via the standard PDG ID code scheme, is computationally more
6f9b0a4
efficient (particularly if only one or two flavors are required at
6f9b0a4
each phase space point, as in PDF reweighting), and uses a flexible
6f9b0a4
metadata system which fixes many fundamental metadata and concurrency
6f9b0a4
bugs in LHAPDF5.
6f9b0a4
6f9b0a4
Compatibility routines are provided as standard for existing C++ and
6f9b0a4
Fortran codes using the LHAPDF5 and PDFLIB legacy interfaces, so you
6f9b0a4
can keep using your existing codes. But the new interface is much more
6f9b0a4
powerful and pleasant to work with, so we think you'll want to switch
6f9b0a4
once you've used it!
6f9b0a4
6f9b0a4
LHAPDF6 is documented in more detail in http://arxiv.org/abs/1412.7420
6b281f5
6b281f5
%package devel
6b281f5
Summary:	Les Houches Accord PDF Interface - development files
6b281f5
Requires:	%{name}%{?_isa} = %{version}-%{release}
6b281f5
6b281f5
%description devel
6b281f5
This package provides development files of LHAPDF, including C++ bindings.
6b281f5
ccc2ee7
%if ! %{py3default}
4426165
%package -n python2-%{name}
6f9b0a4
Summary:	Les Houches Accord PDF Interface - Python 2 module
4426165
%{?python_provide:%python_provide python2-%{name}}
6b281f5
Requires:	%{name}%{?_isa} = %{version}-%{release}
6b281f5
4426165
%description -n python2-%{name}
6f9b0a4
This package provides Python 2 bindings for LHAPDF.
ccc2ee7
6f9b0a4
This package also provides a script called "lhapdf" which can be used
806f848
to query the catalog of PDF sets and to install and update them from
6f9b0a4
the command line. It accepts commands "list", "update", "install" and
6f9b0a4
"upgrade". Please run "lhapdf help" for full usage instructions.
806f848
%endif
6f9b0a4
6f9b0a4
%package -n python%{python3_pkgversion}-%{name}
6f9b0a4
Summary:	Les Houches Accord PDF Interface - Python 3 module
6f9b0a4
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
6f9b0a4
Requires:	%{name}%{?_isa} = %{version}-%{release}
6b281f5
6f9b0a4
%description -n python%{python3_pkgversion}-%{name}
6f9b0a4
This package provides Python 3 bindings for LHAPDF.
806f848
%if %{py3default}
806f848
This package also provides a script called "lhapdf" which can be used
806f848
to query the catalog of PDF sets and to install and update them from
806f848
the command line. It accepts commands "list", "update", "install" and
806f848
"upgrade". Please run "lhapdf help" for full usage instructions.
806f848
%endif
6b281f5
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
ccc2ee7
%package -n python%{python3_other_pkgversion}-%{name}
ccc2ee7
Summary:	Les Houches Accord PDF Interface - Python 3 module
ccc2ee7
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{name}}
ccc2ee7
Requires:	%{name}%{?_isa} = %{version}-%{release}
ccc2ee7
ccc2ee7
%description -n python%{python3_other_pkgversion}-%{name}
ccc2ee7
This package provides Python 3 bindings for LHAPDF.
ccc2ee7
%endif
ccc2ee7
6b281f5
%package doc
6b281f5
Summary:	Les Houches Accord PDF Interface - documentation
6b281f5
BuildArch:	noarch
6b281f5
6b281f5
%description doc
6f9b0a4
This package provides API documentation and examples for LHAPDF.
6b281f5
6b281f5
%prep
6f9b0a4
%setup -q -n LHAPDF-%{version}
6b281f5
%patch0 -p1
6b281f5
6f9b0a4
# Remove cython generated file
6f9b0a4
rm wrappers/python/lhapdf.cpp
6f9b0a4
806f848
# Fix shebangs
806f848
%if %{py3default}
de5282d
sed 's!/usr/bin/env python!%{__python3}!' -i bin/lhapdf examples/*.py
806f848
%else
de5282d
sed 's!/usr/bin/env python!%{__python2}!' -i bin/lhapdf examples/*.py
806f848
%endif
6f9b0a4
sed 's!/usr/bin/env bash!/bin/bash!' -i bin/lhapdf-config.in
1be9407
6b281f5
%build
ccc2ee7
%if %{py3default}
ccc2ee7
export PYTHON=%{__python3}
ccc2ee7
%else
6f9b0a4
export PYTHON=%{__python2}
ccc2ee7
%endif
6f9b0a4
%configure --disable-static --disable-silent-rules
6f9b0a4
6f9b0a4
%make_build
6b281f5
ccc2ee7
%if ! %{py3default}
6f9b0a4
( cd wrappers/python ; %make_build PYTHON=%{__python3} )
ccc2ee7
%endif
ccc2ee7
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
ccc2ee7
( cd wrappers/python ; %make_build PYTHON=%{__python3_other} )
ccc2ee7
%endif
6b281f5
6f9b0a4
# Build doxygen documentation
6f9b0a4
%make_build doxy
6b281f5
6b281f5
%install
6f9b0a4
%make_install
6b281f5
ccc2ee7
%if ! %{py3default}
6f9b0a4
( cd wrappers/python ; %make_install PYTHON=%{__python3} )
ccc2ee7
%endif
ccc2ee7
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
ccc2ee7
( cd wrappers/python ; %make_install PYTHON=%{__python3_other} )
ccc2ee7
%endif
6b281f5
6b281f5
rm %{buildroot}%{_libdir}/libLHAPDF.la
b1487e5
6f9b0a4
rm examples/Makefile*
7cf276e
6b281f5
%check
6f9b0a4
%make_build check
6b281f5
3d8eaf9
%ldconfig_scriptlets
6b281f5
6b281f5
%files
6f9b0a4
%{_libdir}/libLHAPDF-%{version}.so
6f9b0a4
%{_datadir}/LHAPDF
6f9b0a4
%doc AUTHORS ChangeLog
3d8eaf9
%license COPYING
6b281f5
6b281f5
%files devel
6f9b0a4
%{_bindir}/%{name}-config
6b281f5
%{_includedir}/LHAPDF
6b281f5
%{_libdir}/libLHAPDF.so
6f9b0a4
%{_libdir}/pkgconfig/%{name}.pc
6b281f5
806f848
%if ! %{py3default}
ccc2ee7
%files -n python2-%{name}
6f9b0a4
%{_bindir}/%{name}
6f9b0a4
%{python2_sitearch}/LHAPDF-*.egg-info
6f9b0a4
%{python2_sitearch}/%{name}.so
ccc2ee7
%endif
6f9b0a4
6f9b0a4
%files -n python%{python3_pkgversion}-%{name}
806f848
%if %{py3default}
806f848
%{_bindir}/%{name}
806f848
%endif
6f9b0a4
%{python3_sitearch}/LHAPDF-*.egg-info
6f9b0a4
%{python3_sitearch}/%{name}.*.so
6b281f5
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
ccc2ee7
%files -n python%{python3_other_pkgversion}-%{name}
ccc2ee7
%{python3_other_sitearch}/LHAPDF-*.egg-info
ccc2ee7
%{python3_other_sitearch}/%{name}.*.so
ccc2ee7
%endif
ccc2ee7
6b281f5
%files doc
6f9b0a4
%doc doc/doxygen
6f9b0a4
%doc examples
3d8eaf9
%license COPYING
6b281f5
6b281f5
%changelog
de5282d
* Sun Aug 23 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.3.0-1
de5282d
- Update to version 6.3.0
de5282d
- Drop patch lhapdf-cython-configure.patch (previously backported)
de5282d
a2e7ee0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-11
a2e7ee0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a2e7ee0
a530a55
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 6.2.1-10
a530a55
- Rebuilt for Python 3.9
a530a55
1837b70
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-9
1837b70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1837b70
e4324d4
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 6.2.1-8
e4324d4
- Rebuilt for Python 3.8
e4324d4
543e371
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-7
543e371
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
543e371
2f68c28
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 6.2.1-6
2f68c28
- Rebuilt to change main python from 3.4 to 3.6
2f68c28
c44a3d4
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-6
c44a3d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c44a3d4
ccc2ee7
* Sat Nov 10 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.2.1-5
ccc2ee7
- Drop Python 2 bindings for Fedora 29+
ccc2ee7
- Make Cython checking script usable with Python3 (backport)
ccc2ee7
- Add Python 3.6 package for EPEL 7
ccc2ee7
19307ff
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 6.2.1-4
19307ff
- Rebuild with fixed binutils
19307ff
806f848
* Sun Jul 29 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.2.1-3
806f848
- Move lhapdf script to python3 package for Fedora 29+
806f848
a11aeed
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-2
a11aeed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a11aeed
6f9b0a4
* Wed Jul 04 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.2.1-1
6f9b0a4
- Update to version 6.2.1
6f9b0a4
- Change license tag from GPLv2+ to GPLv3+
6f9b0a4
- Add Python 3 bindings
6f9b0a4
- Drop packages not provided by LHAPDF6: octave-lhapdf, lhapdf-pdfsets-minimal
6f9b0a4
3d8eaf9
* Wed Feb 07 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 5.9.1-23
3d8eaf9
- Compile with -std=legacy when using gfortran >= 8
3d8eaf9
4426165
* Thu Aug 10 2017 Mattias Ellert <mattias.ellert@physics.uu.se> - 5.9.1-22
4426165
- Rename python package
4426165
- EPEL 5 End-Of-Life specfile clean-up
4426165
  - Remove Group and BuildRoot tags
4426165
  - Don't clear the buildroot in the install section
4426165
  - Remove the clean section
4426165
  - Remove octave packaging macro definitions
4426165
a9bc03e
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.1-21
a9bc03e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a9bc03e
015877d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.1-20
015877d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
015877d
8f7454e
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-19
8f7454e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
8f7454e
caaa5e3
* Wed Feb 08 2017 Kalev Lember <klember@redhat.com> - 5.9.1-18
caaa5e3
- Rebuilt for libgfortran soname bump
caaa5e3
Orion Poplawski 140508b
* Wed Dec 07 2016 Orion Poplawski <orion@cora.nwra.com> - 5.9.1-17
Orion Poplawski 140508b
- Rebuild for octave 4.2
Orion Poplawski 140508b
99ce6a8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-16
99ce6a8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
99ce6a8
4a01aec
* Wed Feb 17 2016 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-15
4a01aec
- Disable octave support for EPEL 6 ppc64 - octave no longer available
4a01aec
2a87ede
* Mon Feb 08 2016 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-14
2a87ede
- Disable tests on arm
2a87ede
ef46d9c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.1-13
ef46d9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ef46d9c
de5282d
* Mon Jul 06 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.1-12
Orion Poplawski 003feb1
- Rebuild for octave 4.0
Orion Poplawski 003feb1
3aac3a9
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-11
3aac3a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3aac3a9
9ae3d5a
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 5.9.1-10
9ae3d5a
- Rebuilt for GCC 5 C++11 ABI change
9ae3d5a
b2fd7fb
* Sat Mar 07 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-9
b2fd7fb
- Fix lhacontrol common block in example
b2fd7fb
b200700
* Sun Oct 12 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-8
b200700
- Re-enable octave for EPEL 7
b200700
39607a5
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-7
39607a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
39607a5
0d1085d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.1-6
0d1085d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0d1085d
b1487e5
* Tue Jun 03 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-5
b1487e5
- Disable octave for EPEL 7 - not yet available
b1487e5
7cf276e
* Tue Jan 07 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-4
7cf276e
- Add "pkg load lhapdf" to octave example
7cf276e
- Fixes for EPEL 5
7cf276e
0387028
* Sat Dec 28 2013 Kevin Fenzi <kevin@scrye.com> - 5.9.1-3
0387028
- Rebuild to fix broken deps
0387028
1be9407
* Thu Nov 21 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-2
1be9407
- Remove bundled swig generated sources
1be9407
e487ae4
* Tue Oct 29 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.9.1-1
e487ae4
- Update to version 5.9.1
e487ae4
ee35ef0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.9-5
ee35ef0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ee35ef0
9c8e4bb
* Tue Jun 18 2013 Dan Horák <dan[at]danny.cz> - 5.8.9-4
9c8e4bb
- don't run check on s390 - OOM when loading the library in Octave
9c8e4bb
6b281f5
* Wed Jun 05 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.8.9-3
6b281f5
- Make doc package independent
6b281f5
6b281f5
* Wed May 22 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.8.9-2
6b281f5
- Reduce libtool overlinking
6b281f5
- Add isa to dependencies
6b281f5
6b281f5
* Sat May 18 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.8.9-1
e487ae4
- Update to version 5.8.9
6b281f5
6b281f5
* Wed Nov 14 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 5.8.8-1
6b281f5
- Initial build