%global debug_package %{nil} Name: mshr Version: 2017.2.0 Release: 1%{?dist} Summary: mshr is the mesh generation component of FEniCS. License: GPL3 or later URL: https://bitbucket.org/fenics-project/mshr Source0: https://bitbucket.org/fenics-project/mshr/downloads/%{name}-%{version}.tar.gz Patch1: mshr-cache-cmake-install-dir.patch Patch2: mshr-optional-use-system-packages.patch Patch3: mshr-update-for-system-cgal.patch Patch4: mshr-update-for-system-tetgen.patch BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: sphinx BuildRequires: boost-devel BuildRequires: CGAL-devel >= 4.12 BuildRequires: gmp-devel BuildRequires: mpfr-devel BuildRequires: eigen3-devel BuildRequires: tetgen-devel BuildRequires: dolfin-devel %description mshr is the mesh generation component of FEniCS. It generates simplicial DOLFIN meshes in 2D and 3D from geometries described by Constructive Solid Geometry (CSG) or from surface files, utilizing CGAL and Tetgen as mesh generation backends. %package -n python3-mshr BuildRequires: python3-devel BuildRequires: python3-dolfin BuildRequires: pybind11-devel >= 2.2.2 Requires: python3-dolfin Summary: mshr is the mesh generation component of FEniCS. %description -n python3-mshr mshr is the mesh generation component of FEniCS. It generates simplicial DOLFIN meshes in 2D and 3D from geometries described by Constructive Solid Geometry (CSG) or from surface files, utilizing CGAL and Tetgen as mesh generation backends. %package devel Summary: mshr is the mesh generation component of FEniCS. Requires: boost-devel Requires: CGAL-devel >= 4.12 Requires: gmp-devel Requires: mpfr-devel Requires: eigen3-devel Requires: tetgen-devel Requires: dolfin-devel %description devel mshr is the mesh generation component of FEniCS. It generates simplicial DOLFIN meshes in 2D and 3D from geometries described by Constructive Solid Geometry (CSG) or from surface files, utilizing CGAL and Tetgen as mesh generation backends. %package demo Summary: mshr is the mesh generation component of FEniCS. %description demo mshr is the mesh generation component of FEniCS. It generates simplicial DOLFIN meshes in 2D and 3D from geometries described by Constructive Solid Geometry (CSG) or from surface files, utilizing CGAL and Tetgen as mesh generation backends. %prep %autosetup -p1 -n %{name}-%{version} %build rm -rf build && mkdir build && pushd build %cmake -DUSE_SYSTEM_TETGEN=ON -DUSE_SYSTEM_CGAL=ON -DENABLE_SWIG_BINDINGS=OFF -DINSTALL_CMAKE_DIR=%{_libdir}/cmake/mshr -DINSTALL_LIB_DIR=%{_libdir} .. make %{?_smp_mflags} popd pushd python %py3_build popd %install pushd build %make_install install -d %{buildroot}%{_datadir}/mshr/examples install %{_builddir}/%{name}-%{version}/demo/python/*.py %{buildroot}%{_datadir}/mshr/examples make %{?_smp_mflags} popd pushd python %py3_install popd %check %files %{_libdir}/libmshr.so* %files devel %{_includedir}/* %{_libdir}/cmake/mshr %files demo %{_datadir}/mshr/examples %files -n python3-mshr %{python3_sitearch}/* %license %doc %changelog * Tue Apr 17 2018 Eldar Yusupov - 2017.2.0.1 - Initial release.