6b281f5
Name:		lhapdf
8c5318c
Version:	6.5.4
e4c051d
Release:	5%{?dist}
6b281f5
Summary:	Les Houches Accord PDF Interface
6b281f5
8c5318c
License:	GPL-3.0-only
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
34adc86
BuildRequires:	make
6f9b0a4
BuildRequires:	gcc-c++
34adc86
BuildRequires:	python%{python3_pkgversion}-Cython
34adc86
%if %{?rhel}%{!?rhel:0} == 7
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
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
34adc86
%if %{?rhel}%{!?rhel:0} == 7
4426165
%package -n python2-%{name}
6f9b0a4
Summary:	Les Houches Accord PDF Interface - Python 2 module
8c5318c
%py_provides	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
8c5318c
%py_provides	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.
34adc86
%if %{?rhel}%{!?rhel:0} != 7
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
8c5318c
%package -n python%{?python3_other_pkgversion}-%{name}
ccc2ee7
Summary:	Les Houches Accord PDF Interface - Python 3 module
8c5318c
%py_provides	python%{python3_other_pkgversion}-%{name}
ccc2ee7
Requires:	%{name}%{?_isa} = %{version}-%{release}
ccc2ee7
8c5318c
%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
34adc86
%if %{?rhel}%{!?rhel:0} == 7
34adc86
sed 's!cython!cython%{python3_version}!' \
34adc86
    -i wrappers/python/Makefile.am wrappers/python/Makefile.in
34adc86
%endif
34adc86
806f848
# Fix shebangs
34adc86
%if %{?rhel}%{!?rhel:0} != 7
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
8c5318c
%configure --disable-static --disable-silent-rules PYTHON=%{__python3} --docdir=%{_pkgdocdir}
6f9b0a4
%make_build
6b281f5
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
34adc86
( cd wrappers/python ; %make_build PYTHON=%{__python2} )
ccc2ee7
( cd wrappers/python ; %make_build PYTHON=%{__python3_other} )
ccc2ee7
%endif
6b281f5
6f9b0a4
# Build doxygen documentation
6f9b0a4
%make_build doxy
6b281f5
6b281f5
%install
8c5318c
%make_install PYTHON_PATH=%{python3_sitearch}
8c5318c
8c5318c
cat << EOF > %{buildroot}%{python3_sitearch}/%{name}-%{version}.egg-info
8c5318c
Name: %{name}
8c5318c
Version: %{version}
8c5318c
EOF
6b281f5
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
8c5318c
( cd wrappers/python ; %make_install PYTHON=%{__python2} PYTHON_PATH=%{python2_sitearch} )
8c5318c
cat << EOF > %{buildroot}%{python2_sitearch}/%{name}-%{version}.egg-info
8c5318c
Name: %{name}
8c5318c
Version: %{version}
8c5318c
EOF
8c5318c
( cd wrappers/python ; %make_install PYTHON=%{__python3_other} PYTHON_PATH=%{python3_other_sitearch} )
8c5318c
cat << EOF > %{buildroot}%{python3_other_sitearch}/%{name}-%{version}.egg-info
8c5318c
Name: %{name}
8c5318c
Version: %{version}
8c5318c
EOF
ccc2ee7
%endif
6b281f5
6b281f5
rm %{buildroot}%{_libdir}/libLHAPDF.la
8c5318c
find %{buildroot}%{_pkgdocdir}/examples -type f -a '!' -name '*.*' -delete
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
34adc86
%if %{?rhel}%{!?rhel:0} == 7
ccc2ee7
%files -n python2-%{name}
6f9b0a4
%{_bindir}/%{name}
8c5318c
%{python2_sitearch}/%{name}-%{version}.egg-info
8c5318c
%{python2_sitearch}/%{name}
ccc2ee7
%endif
6f9b0a4
6f9b0a4
%files -n python%{python3_pkgversion}-%{name}
34adc86
%if %{?rhel}%{!?rhel:0} != 7
806f848
%{_bindir}/%{name}
806f848
%endif
8c5318c
%{python3_sitearch}/%{name}-%{version}.egg-info
8c5318c
%{python3_sitearch}/%{name}
6b281f5
ccc2ee7
%if %{?rhel}%{!?rhel:0} == 7
8c5318c
%files -n python%{?python3_other_pkgversion}-%{name}
8c5318c
%{python3_other_sitearch}/%{name}-%{version}.egg-info
8c5318c
%{python3_other_sitearch}/%{name}
ccc2ee7
%endif
ccc2ee7
6b281f5
%files doc
8c5318c
%doc %{_pkgdocdir}/doxygen
8c5318c
%doc %{_pkgdocdir}/examples
3d8eaf9
%license COPYING
6b281f5
6b281f5
%changelog
e4c051d
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-5
e4c051d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
e4c051d
fb80060
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-4
fb80060
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
fb80060
f3b0712
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.4-3
f3b0712
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
f3b0712
dba26b1
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 6.5.4-2
dba26b1
- Rebuilt for Python 3.12
dba26b1
8c5318c
* Mon Mar 13 2023 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.5.4-1
8c5318c
- Update to version 6.5.4
8c5318c
ce1b448
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-5
ce1b448
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
ce1b448
a87b489
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-4
a87b489
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
a87b489
d6d1855
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.4.0-3
d6d1855
- Rebuilt for Python 3.11
d6d1855
1e72a84
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.0-2
1e72a84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1e72a84
34adc86
* Sun Dec 19 2021 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.4.0-1
34adc86
- Update to version 6.4.0
34adc86
c7f1fe6
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.0-4
c7f1fe6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
c7f1fe6
4860d8a
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 6.3.0-3
4860d8a
- Rebuilt for Python 3.10
4860d8a
755c89b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.0-2
755c89b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
755c89b
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