2014-04-17 07:18:22 +02:00
#
# spec file for package apfel
#
2020-05-06 00:48:16 +02:00
# Copyright (c) 2020 SUSE LLC
2014-04-17 07:18:22 +02:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2019-01-14 11:41:55 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2014-04-17 07:18:22 +02:00
#
2020-05-06 00:48:16 +02:00
# PYTHON BINDINGS INCOMPATIBLE WITH PYTHON3
%if 0%{?suse_version} >= 1550
%bcond_with pywrap
%else
%bcond_without pywrap
%endif
%define skip_python3 1
2014-04-17 07:18:22 +02:00
%define soname libAPFEL0
Name : apfel
2019-06-25 17:57:03 +02:00
Version : 3.0.4
2014-04-17 07:18:22 +02:00
Release : 0
2016-02-15 14:29:51 +01:00
Summary : A Probability Distribution Function Evolution Library
2018-07-17 15:22:10 +02:00
License : GPL-3.0-or-later
2014-04-17 07:18:22 +02:00
Group : Development/Libraries/C and C++
2019-01-13 17:17:36 +01:00
URL : http://apfel.hepforge.org/
2015-03-23 17:44:38 +01:00
Source : https://github.com/scarrazza/%{name} /archive/%{version} .tar.gz
2020-05-06 00:48:16 +02:00
# PATCH-FIX-UPSTREAM apfel-allow-disabling-pywrap.patch badshah400@gmail.com -- Allow building with python extension disabled, for example due to lack of python2 support in the system
Patch0 : apfel-allow-disabling-pywrap.patch
2015-03-23 17:44:38 +01:00
BuildRequires : LHAPDF-devel
2014-04-17 07:18:22 +02:00
BuildRequires : gcc-c++
BuildRequires : gcc-fortran
2017-04-11 15:36:50 +02:00
BuildRequires : libboost_headers-devel
2020-05-06 00:48:16 +02:00
BuildRequires : libtool
BuildRequires : python-rpm-macros
%if %{with pywrap}
BuildRequires : %{python_module LHAPDF}
BuildRequires : %{python_module devel}
2017-04-11 15:36:50 +02:00
%endif
2020-05-06 00:48:16 +02:00
Requires : python-LHAPDF
%python_subpackages
2014-04-17 07:18:22 +02:00
%description
2019-01-13 17:17:36 +01:00
APFEL is a library to perform the combined QCD+QED DGLAP
2016-02-15 14:29:51 +01:00
evolution of parton distributions.
2014-04-17 07:18:22 +02:00
%package -n %{soname}
2016-02-15 14:29:51 +01:00
Summary : A Probability Distribution Function Evolution Library
Group : System/Libraries
2014-04-17 07:18:22 +02:00
%description -n %{soname}
2019-01-13 17:17:36 +01:00
APFEL is a library to perform the combined QCD+QED DGLAP
2016-02-15 14:29:51 +01:00
evolution of parton distributions.
2014-04-17 07:18:22 +02:00
This package provides the shared libraries for %{name} .
2020-05-06 00:48:16 +02:00
%package -n %{name}-devel
2016-02-15 14:29:51 +01:00
Summary : Development files for Apfel, a PDF Evolution Library
2014-04-17 07:18:22 +02:00
Group : Development/Libraries/C and C++
Requires : %{soname} = %{version}
2015-03-23 17:44:38 +01:00
Requires : LHAPDF-devel
2019-01-13 17:17:36 +01:00
Recommends: %{name} -doc = %{version}
2014-04-17 07:18:22 +02:00
2020-05-06 00:48:16 +02:00
%description -n %{name}-devel
2019-01-13 17:17:36 +01:00
APFEL is a library to perform the combined QCD+QED DGLAP
2016-02-15 14:29:51 +01:00
evolution of parton distributions.
2014-04-17 07:18:22 +02:00
This package provides the source files required to develop
applications with %{name} .
2020-05-06 00:48:16 +02:00
%package -n %{name}-doc
2019-01-14 11:41:55 +01:00
Summary : Documentation for APFEL, a PDF evolution library
2019-01-13 17:17:36 +01:00
Group : Documentation/Other
2020-05-06 00:48:16 +02:00
%description -n %{name}-doc
2019-01-14 11:41:55 +01:00
This package provides documentation for APFEL in PDF (Portable
Document Format), a PDF (Probability Distribution Function) evolution
2019-01-13 17:17:36 +01:00
library.
2014-04-17 07:18:22 +02:00
%prep
2020-05-06 00:48:16 +02:00
%autosetup -p1
2014-04-17 07:18:22 +02:00
%build
2020-05-06 00:48:16 +02:00
autoreconf -fvi
%configure \
--disable-static \
%{!?with_pywrap:--disable-pywrap}
2014-04-17 07:18:22 +02:00
make %{?_smp_mflags}
%install
%make_install
# REMOVE libtool ARCHIVES
2019-01-13 17:17:36 +01:00
find %{buildroot} -type f -name " * . l a " -delete -print
# FIX env BASED SCRIPT INTERPRETER
sed -Ei " 1 { s | # \ ! \ s * / u s r / b i n / e n v b a s h | # \ ! / b i n / b a s h | } " %{buildroot} %{_bindir} /apfel-config
2014-04-17 07:18:22 +02:00
2020-05-06 00:48:16 +02:00
# REMOVE INSTALLED README, INSTALL IT USING %%doc INSTEAD
rm -fr %{buildroot} %{_datadir} /doc/apfel/README
2016-08-09 07:58:01 +02:00
rm -fr %{buildroot} %{_datadir} /apfel/README
2014-04-17 07:18:22 +02:00
2016-02-15 14:29:51 +01:00
%post -n %{soname} -p /sbin/ldconfig
%postun -n %{soname} -p /sbin/ldconfig
2014-04-17 07:18:22 +02:00
%files -n %{soname}
%{_libdir} /*.so.*
2020-05-06 00:48:16 +02:00
%files -n %{name}-devel
2014-04-17 07:18:22 +02:00
%{_includedir} /APFEL/
2019-01-13 17:17:36 +01:00
%license COPYING
%doc AUTHORS ChangeLog NEWS README
2016-02-06 14:45:14 +01:00
%{_bindir} /CheckAPFEL
2014-04-17 07:18:22 +02:00
%{_bindir} /%{name} -config
2019-01-13 17:17:36 +01:00
%{_bindir} /ListFunctions
2014-04-17 07:18:22 +02:00
%{_libdir} /*.so
2020-05-06 00:48:16 +02:00
%if %{with pywrap}
%files %{python_files}
%{_bindir} /apfel
%{python_sitearch} /*
%endif
2014-04-17 07:18:22 +02:00
2020-05-06 00:48:16 +02:00
%files -n %{name}-doc
2019-01-13 17:17:36 +01:00
%doc doc/pdfs/manual.pdf
2014-04-17 07:18:22 +02:00
%changelog