%define _with_check -DEIGEN_BUILD_TESTS:BOOL=ON
%define bit b23437e61a07

Name:    eigen2
Summary: A lightweight C++ template library for vector and matrix math
Version: 2.0.17
Release: 1%{?_dist_release} 

Group:   System Environment/Libraries
License: GPLv2+ or LGPLv3+
URL:     http://eigen.tuxfamily.org/

Source0: http://bitbucket.org/eigen/eigen2/get/%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
BuildRequires: cmake
BuildRequires: pkgconfig
#docs
BuildRequires: doxygen graphviz

%description
%{summary}

%package devel
Summary: A lightweight C++ template library for vector and matrix math
Group:   Development/Libraries
# -devel subpkg only atm, compat with other distros
Provides: %{name} = %{version}-%{release}

%description devel
%{summary}


%prep
%setup -q -n eigen-eigen-%{bit}

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake ..
popd

make %{?_smp_mflags} -C %{_target_platform}

# docs
doxygen


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}

%clean 
rm -rf %{buildroot}


%files devel
%defattr(-,root,root,-)
%doc COPYING COPYING.LESSER
%doc html/
%{_includedir}/eigen2
%{_datadir}/pkgconfig/eigen2.pc

%changelog
* Sun Dec 14 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.0.17-1
- updated to 2.0.17

* Sat May 19 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.15-2
- rebuilt with rpm-4.8.1-3

* Sun Sep 26 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.15-1
- new upstream release
- built with rpm-4.8.1 for pkg-config

* Thu Nov 12 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.9-1
- new upstream release

* Mon Oct 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.6-1
- new upstream release

* Sat Sep  5 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.5-1
- Initial build for Vine Linux
