%{?rhel: %global cmake %cmake3}
Name: smesh
Version: 6.7.2
Release: 2%{?dist}
Summary: OpenCascade based MESH framework
License: LGPLv2
URL: https://github.com/tpaviot/smesh
Source0: https://github.com/tpaviot/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake%{?rhel:3} gcc-c++
BuildRequires: doxygen graphviz
BuildRequires: OCE-devel
%if ! 0%{?fedora} && 0%{?rhel} < 7
BuildRequires: boost148-devel
%else
BuildRequires: boost-devel
%endif
BuildRequires: gcc-gfortran
BuildRequires: f2c f2c-devel
BuildRequires: dos2unix
# New BRs
BuildRequires: tbb-devel
BuildRequires: libSM-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: freetype-devel
BuildRequires: freeimage-devel
# Dependencies for optional NETGENPlugin library.
#BuildRequires: netgen-mesher-devel
#BuildRequires: netgen-mesher-devel-private
%description
A complete OpenCascade based MESH framework.
%package doc
Summary: Development documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Development documentation for %{name}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files and headers for %{name}.
%prep
%autosetup -p1
rm -rf boost\-*
dos2unix -k LICENCE.lgpl.txt
%build
rm -rf build && mkdir build && pushd build
LDFLAGS='-Wl,--as-needed'; export LDFLAGS
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DMONOLITHIC_BUILD=OFF \
-DSMESH_TESTING=ON \
%if 0%{?rhel} && 0%{?rhel} < 7
-DBoost_INCLUDE_DIR=%{_includedir}/boost148 \
%endif
../
make %{?_smp_mflags}
# Build documentation
make doc
%install
pushd build
%make_install
# Install documentation
#mkdir -p %{buildroot}%{_docdir}/smesh
#mv doc/html %{buildroot}%{_docdir}/smesh/
%check
pushd build
make test
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license LICENCE.lgpl.txt
%{_libdir}/*.so.*
%exclude %{_docdir}/smesh/html
%files doc
%{_docdir}/smesh/html
%files devel
%{_includedir}/*
%{_libdir}/*.so
%changelog
* Tue Jul 04 2017 Jonathan Wakely <jwakely@redhat.com> - 6.7.2-2
- Rebuilt for Boost 1.64
* Wed May 10 2017 Richard Shaw <hobbes1069@gmail.com> - 6.7.2-1
- Update to latest upstream release.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 6.6-2
- Rebuilt for Boost 1.63
* Mon Jul 18 2016 Richard Shaw <hobbes1069@gmail.com> - 6.7-1
- Update to latest upstream release.
* Tue Apr 5 2016 Richard Shaw <hobbes1069@gmail.com> - 6.6-1
- Update to latest upstream release.
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.3.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 6.5.3.1-10
- Rebuilt for Boost 1.60
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 6.5.3.1-9
- Rebuilt for Boost 1.59
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.5.3.1-8
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 6.5.3.1-7
- rebuild for Boost 1.58
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.5.3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 6.5.3.1-5
- Rebuilt for GCC 5 C++11 ABI change
* Wed Apr 29 2015 Jiri Kastner <jkastner@redhat.com> - 6.5.3.1-4
- fix build for ppc64 on rhel6 and OCE-0.16.1
* Wed Apr 29 2015 Jiri Kastner <jkastner@redhat.com> - 6.5.3.1-3
- fix problems with boost on rhel6
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 6.5.3.1-2
- Rebuild for boost 1.57.0
* Tue Dec 9 2014 Richard Shaw <hobbes1069@gmail.com> - 6.5.3.1-1
- Update to latest upstream release.
* Fri Nov 28 2014 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.4-1
- Move to forked project as original is no longer maintained.
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Tue Jul 22 2014 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-13
- Add patch for freecad specific tweaks.
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 5.1.2.2-11.svn55
- Rebuild for boost 1.55.0
* Thu May 15 2014 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-10.svn55
- Fix license reference in spec file.
* Fri Feb 14 2014 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-9.svn55
- Bump revision to update package license reference.
* Thu Oct 10 2013 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-8.svn55
- Rebuild for OCE-0.13.
* Mon Jul 15 2013 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-7.svn55
- Rebuild for updated OCE.
* Fri Jun 21 2013 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-6.svn55
- Rebuild for OCE 0.12.
* Fri Feb 15 2013 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-1.svn55
- Update for compatibility with new OCE.
* Mon Oct 22 2012 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-5.svn54
- Remove build requirement for fortran (f2c).
- Initial packaging for EPEL 6.
* Wed Sep 26 2012 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-4.svn54
- Rebuild due to package not being signed in F-18 repo.
* Thu Mar 08 2012 Nicolas Chauvet <kwizart@gmail.com> - 5.1.2.2-3.svn54
- Rebuilt for c++ ABI breakage
* Thu Jan 19 2012 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-2.svn54
- Minor updates to spec file.
* Tue Dec 20 2011 Richard Shaw <hobbes1069@gmail.com> - 5.1.2.2-1.svn54
- Initial release.