Blob Blame History Raw
%global _docdir_fmt %{name}

Name:		ignition-math
Version:	2.2.3
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}2-%{version}.tar.bz2
# This patch modifies the equality helper test to use an intermediate variable
# to test for equality.  
# Upstream:  https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/58/change-equality-helper-to-work-with-387-fp/diff
Patch0:		%{name}-2.2.2-387.patch
BuildRequires:	cmake
BuildRequires:	doxygen
BuildRequires:	graphviz
BuildRequires:	rubygem-ronn


%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}2-%{version}
%patch0 -p0 -b .387
# Required to sneak in custom CFLAGS via CMAKE_C_FLAGS_ALL
sed -i 's/unset/#unset/g' CMakeLists.txt

%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_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 || (cat build/Testing/Temporary/LastTest.log && exit 1)

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%license COPYING
%doc README.md
%{_libdir}/*.so.*

%files devel
%{_libdir}/pkgconfig
%{_libdir}/*.so
%{_libdir}/cmake
%{_includedir}/ignition

%files doc
%license COPYING
%doc build/doxygen/html

%changelog
* 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)