Blame cantera.spec

162292f
# RPATH issues are standard paths and result from upstream
162292f
%global __brp_check_rpaths %{nil}
cce51dc
cce51dc
Name:          cantera
162292f
Version:       3.0.0
0e969b1
Release:       %{?autorelease}
cce51dc
Summary:       Chemical kinetics, thermodynamics, and transport tool suite
cce51dc
License:       BSD
0e969b1
URL:           https://github.com/Cantera/%{name}/
f190aa6
Source0:       %{url}archive/refs/tags/v%{version}.tar.gz
cce51dc
162292f
# Python 3.12 currently in pre-release and not officially supported
162292f
Patch0:        add-python3_12.patch
3025199
cce51dc
BuildRequires:  boost-devel
cce51dc
BuildRequires:  eigen3-devel
cce51dc
BuildRequires:  fmt-devel
cce51dc
BuildRequires:  gcc
cce51dc
BuildRequires:  gcc-c++
cce51dc
BuildRequires:  git
cce51dc
BuildRequires:  python3
cce51dc
BuildRequires:  python3-devel
cce51dc
BuildRequires:  python3-numpy
7dc49d3
BuildRequires:  python3-pip
cce51dc
BuildRequires:  python3-pytest
162292f
BuildRequires:  python3-scipy
7dc49d3
BuildRequires:  python3-wheel
cce51dc
BuildRequires:  sundials-devel
cce51dc
BuildRequires:  yaml-cpp-devel
cce51dc
0e969b1
0e969b1
%if 0%{?suse_version}
0e969b1
BuildRequires:  gmock
0e969b1
BuildRequires:  gtest
0e969b1
BuildRequires:  scons
0e969b1
BuildRequires:  python3-Cython
0e969b1
BuildRequires:  python3-numpy-devel
0e969b1
BuildRequires:  python3-Pint
0e969b1
BuildRequires:  python3-ruamel.yaml
0e969b1
%else
0e969b1
BuildRequires:  gmock-devel
0e969b1
BuildRequires:  gtest-devel
0e969b1
BuildRequires:  python3-cython
0e969b1
BuildRequires:  python3-pint
0e969b1
BuildRequires:  python3-scons
0e969b1
BuildRequires:  python3-ruamel-yaml
0e969b1
%endif
0e969b1
0e969b1
%if 0%{?fedora} || 0%{?suse_version}
cce51dc
BuildRequires:  gcc-fortran
0e969b1
BuildRequires:  python3-pandas
cce51dc
%else
cce51dc
BuildRequires:  gcc-gfortran
cce51dc
%endif
cce51dc
cce51dc
%global scons scons%{?rhel:-3}
cce51dc
d1c4274
ExcludeArch: %{ix86}
d1c4274
cce51dc
%global common_description %{expand: \
cce51dc
 Cantera is a suite of object-oriented software tools for solving problems
cce51dc
 involving chemical kinetics, thermodynamics, and/or transport processes.
cce51dc
 Cantera can be used for simulating time-dependent or steady reactor
cce51dc
 networks and one-dimensional reacting flows. Thermodynamic models for
cce51dc
 ideal gases, aqueous electrolytes, plasmas, and multiphase substances
cce51dc
 are provided.}
cce51dc
cce51dc
%description
cce51dc
%{common_description}
cce51dc
cce51dc
cce51dc
%package common
cce51dc
Summary: Common files needed for all Cantera interfaces
cce51dc
%description common
cce51dc
%{common_description}
cce51dc
 .
cce51dc
 This package includes programs for parsing and converting chemical
cce51dc
 mechanisms, a set of common mechanism files, and several sample problems.
cce51dc
cce51dc
cce51dc
%package -n python3-%{name}
cce51dc
Requires: %{name}-common%{_isa} = %{version}-%{release}
cce51dc
Summary: Python 3 user interface for Cantera
cce51dc
%description -n python3-%{name}
cce51dc
%{common_description}
cce51dc
 .
cce51dc
 This package includes the Cantera Python 3 module.
cce51dc
cce51dc
cce51dc
%package devel
cce51dc
Requires: %{name}-common%{_isa} = %{version}-%{release}
cce51dc
Summary: Header files and shared object libraries for Cantera
cce51dc
%description devel
cce51dc
%{common_description}
cce51dc
 .
cce51dc
 This package contains the header files and shared object libraries needed to
cce51dc
 develop applications with the C++ and Fortran interfaces of Cantera.
cce51dc
cce51dc
cce51dc
%package static
cce51dc
Requires: %{name}-common%{_isa} = %{version}-%{release}
cce51dc
Summary: Static libraries for Cantera
cce51dc
%description static
cce51dc
%{common_description}
cce51dc
 .
cce51dc
 This package contains the static libraries for the C++ and Fortran
cce51dc
 interfaces of Cantera.
cce51dc
cce51dc
cce51dc
%prep
162292f
%autosetup -n %{name}-%{version} -p1
cce51dc
cce51dc
%build
cce51dc
%set_build_flags
cce51dc
7387275
%scons build \
162292f
    extra_inc_dirs=%{_includedir}/eigen3 \
7387275
    f90_interface=y \
7387275
    libdirname=%{_lib} \
7387275
    prefix=%{_prefix} \
7387275
    python_package=full \
7387275
    python_prefix=%{_prefix} \
7387275
    renamed_shared_libraries=n \
7387275
    system_eigen=y \
7387275
    system_fmt=y \
7387275
    system_sundials=y \
7387275
    %{?_smp_mflags}
cce51dc
cce51dc
cce51dc
%install
7387275
%scons install \
7387275
    libdirname=%{_lib} \
7387275
    prefix=%{_prefix} \
7387275
    python_prefix=%{_prefix} \
7387275
    stage_dir=%{buildroot} \
7387275
    %{nil}
cce51dc
cce51dc
%check
e9a0ec2
%scons test %{?_smp_mflags}
cce51dc
cce51dc
cce51dc
%files common
cce51dc
%license %{_datadir}/%{name}/doc/LICENSE.txt
cce51dc
cce51dc
%doc AUTHORS README.rst
cce51dc
%doc %{_mandir}/man1/ck2yaml.1.gz
cce51dc
%doc %{_mandir}/man1/cti2yaml.1.gz
cce51dc
%doc %{_mandir}/man1/ctml2yaml.1.gz
162292f
%doc %{_mandir}/man1/yaml2ck.1.gz
cce51dc
cce51dc
%{_bindir}/ck2yaml
cce51dc
%{_bindir}/cti2yaml
cce51dc
%{_bindir}/ctml2yaml
162292f
%{_bindir}/yaml2ck
cce51dc
cce51dc
%{_datadir}/%{name}
cce51dc
de20f0d
#not required for packaged installations
de20f0d
%ghost %{_bindir}/setup_cantera
de20f0d
%ghost %{_bindir}/setup_cantera.csh
cce51dc
7dc49d3
cce51dc
%files -n python3-%{name}
cce51dc
%{python3_sitearch}/%{name}/
73938cd
%{python3_sitearch}/Cantera-%{version}.dist-info/
cce51dc
cce51dc
%files devel
cce51dc
%{_includedir}/%{name}
cce51dc
cce51dc
%{_libdir}/pkgconfig/cantera.pc
cce51dc
%{_libdir}/libcantera.so
162292f
%{_libdir}/libcantera.so.3
cce51dc
%{_libdir}/libcantera.so.%{version}
cce51dc
%{_libdir}/libcantera_fortran.so
162292f
%{_libdir}/libcantera_fortran.so.3
cce51dc
%{_libdir}/libcantera_fortran.so.%{version}
162292f
%{_libdir}/libcantera_python*.so
cce51dc
cce51dc
cce51dc
%files static
cce51dc
%{_libdir}/libcantera.a
cce51dc
%{_libdir}/libcantera_fortran.a
cce51dc
cce51dc
cce51dc
%changelog
000caac
%autochangelog