blob: 6bac43a0b34e9c4d58312c7e8e2ce2f8a96afbd1 [file] [log] [blame]
Taylor Braun-Jones70701742013-02-15 19:09:48 -05001Name: ceres-solver
Sameer Agarwal50bbc6f2013-04-29 16:47:26 -07002Version: 1.6.0
Taylor Braun-Jones70701742013-02-15 19:09:48 -05003# Release candidate versions are messy. Give them a release of
4# e.g. "0.1.0%{?dist}" for RC1 (and remember to adjust the Source0
5# URL). Non-RC releases go back to incrementing integers starting at 1.
Taylor Braun-Jones01010202013-05-06 16:45:55 -04006Release: 1%{?dist}
Taylor Braun-Jones70701742013-02-15 19:09:48 -05007Summary: A non-linear least squares minimizer
8
9Group: Development/Libraries
10License: BSD
11URL: http://code.google.com/p/ceres-solver/
Sameer Agarwalac626962013-05-06 07:04:26 -070012Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.gz
Taylor Braun-Jones70701742013-02-15 19:09:48 -050013BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
Taylor Braun-Jonesc3fd3b92013-02-26 00:30:35 -050015%if (0%{?rhel} == 06)
Taylor Braun-Jones70701742013-02-15 19:09:48 -050016BuildRequires: cmake28
17%else
18BuildRequires: cmake
19%endif
20BuildRequires: eigen3-devel
21BuildRequires: suitesparse-devel
22# Use atlas for BLAS and LAPACK
23BuildRequires: atlas-devel
24BuildRequires: protobuf-devel
25BuildRequires: gflags-devel
26BuildRequires: glog-devel
27
28%description
29Ceres Solver is a portable C++ library that allows for modeling and solving
30large complicated nonlinear least squares problems. Features include:
31
32 - A friendly API: build your objective function one term at a time
33 - Automatic differentiation
34 - Robust loss functions
35 - Local parameterizations
36 - Threaded Jacobian evaluators and linear solvers
37 - Levenberg-Marquardt and Dogleg (Powell & Subspace) solvers
38 - Dense QR and Cholesky factorization (using Eigen) for small problems
39 - Sparse Cholesky factorization (using SuiteSparse) for large sparse problems
40 - Specialized solvers for bundle adjustment problems in computer vision
41 - Iterative linear solvers for general sparse and bundle adjustment problems
42 - Runs on Linux, Windows, Mac OS X and Android. An iOS port is underway
43
44Notable use of Ceres Solver is for the image alignment in Google Maps and for
45vehicle pose in Google Street View.
46
47
48%package devel
49Summary: A non-linear least squares minimizer
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52
53%description devel
54The %{name}-devel package contains libraries and header files for
55developing applications that use %{name}.
56
57
58%prep
59%setup -q
60
61%build
62mkdir build
63pushd build
64
65# Disable the compilation flags that rpmbuild macros try to apply to all
66# packages because it breaks the build since release 1.5.0rc1
67%define optflags ""
Taylor Braun-Jonesc3fd3b92013-02-26 00:30:35 -050068%if (0%{?rhel} == 06)
Taylor Braun-Jones70701742013-02-15 19:09:48 -050069%{cmake28} .. \
70%else
71%{cmake} .. \
72%endif
73 -DBLAS_LIB:FILEPATH=%{_libdir}/atlas/libatlas.so \
74 -DLAPACK_LIB:FILEPATH=%{_libdir}/atlas/liblapack.so
75make %{?_smp_mflags}
76
77
78%install
79rm -rf $RPM_BUILD_ROOT
80pushd build
81make install DESTDIR=$RPM_BUILD_ROOT
82find $RPM_BUILD_ROOT -name '*.la' -delete
83
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88
89%post -p /sbin/ldconfig
90
91%postun -p /sbin/ldconfig
92
93
94%files
95%defattr(-,root,root,-)
96%doc
97%{_libdir}/*.so.*
98
99%files devel
100%defattr(-,root,root,-)
101%doc
102%{_includedir}/*
103%{_libdir}/*.so
104%{_libdir}/*.a
105
106
107%changelog
Taylor Braun-Jones01010202013-05-06 16:45:55 -0400108* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-1
Sameer Agarwalac626962013-05-06 07:04:26 -0700109- Bump version
110
Sameer Agarwal0e0a4542013-04-29 17:27:26 -0700111* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.2.0
112- Bump version
113
Sameer Agarwal50bbc6f2013-04-29 16:47:26 -0700114* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.1.0
115- Bump version
116
Taylor Braun-Jones70701742013-02-15 19:09:48 -0500117* Sun Feb 24 2013 Taylor Braun-Jones <taylor@braun-jones.org> - 1.5.0-0.1.0
118- Bump version.
119
120* Sun Oct 14 2012 Taylor Braun-Jones <taylor@braun-jones.org> - 1.4.0-0
121- Initial creation