%global _docdir_fmt %{name}
Name: ignition-math
Version: 3.0.0
Release: 1%{?dist}
Summary: Small, Fast, High Performance Math Library
Group: Development/Libraries
License: ASL 2.0
URL: http://ignitionrobotics.org/libraries/math
Source0: http://gazebosim.org/distributions/ign-math/releases/%{name}3-%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: rubygem-ronn
# Patch to work around the fact that 'long double' is the same size as 'double' on arm
# Not yet submitted upstream
Patch1: %{name}-3.0.0-arm.patch
%description
Ignition Math is a component in the Ignition framework, a set of libraries
designed to rapidly develop robot applications. The library defines math
classes and functions used in other Ignition libraries and programs.
%package devel
Summary: Development files and libraries for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains the header files and libraries
for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel.
%package doc
Summary: Development documentation for %{name}
BuildArch: noarch
%description doc
Generated API and development documentation for %{name}
%prep
%setup -q -n %{name}3-%{version}
# Required to sneak in custom CFLAGS via CMAKE_C_FLAGS_ALL
sed -i 's/unset/#unset/g' CMakeLists.txt
%patch1 -p0 -b .arm
%build
mkdir build
pushd build
%cmake .. \
%ifnarch x86_64
-DSSE2_FOUND=FALSE \
%endif
-DSSE3_FOUND=FALSE \
-DSSSE3_FOUND=FALSE \
-DSSE4_1_FOUND=FALSE \
-DSSE4_2_FOUND=FALSE \
-DCMAKE_C_FLAGS_ALL="%{optflags}" \
-DCMAKE_CXX_FLAGS_ALL="%{optflags}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
popd
make -C build %{?_smp_mflags}
make -C build doc
%install
make -C build install DESTDIR=%{buildroot}
%check
make -C build test ARGS="-V"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING
%doc README.md Changelog.md
%{_libdir}/*.so.*
%files devel
%{_libdir}/pkgconfig
%{_libdir}/*.so
%{_libdir}/cmake
%{_includedir}/ignition
%files doc
%license COPYING
%doc build/doxygen/html
%changelog
* Sun Feb 19 2017 Rich Mattes <richmattes@gmail.com> - 3.0.0-1
- Update to release 3.0.0
- Fix FTBFS (rhbz#1423733)
- Remove upstreamed patch
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Jul 17 2016 Rich Mattes <richmattes@gmail.com> - 2.4.1-1
- Update to release 2.4.1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 15 2016 Rich Mattes <richmattes@gmail.com> - 2.3.0-1
- Update to release 2.3.0
* Tue Oct 20 2015 Rich Mattes <richmattes@gmail.com> - 2.2.3-1
- Update to release 2.2.3
* Thu Aug 20 2015 Rich Mattes <richmattes@gmail.com> - 2.2.2-1
- Update to release 2.2.2
* Fri May 22 2015 Rich Mattes <richmattes@gmail.com> - 1.0.0-1
- Initial release (rhbz#1224390)