blob: 1e5c7c0287a8e0ceace39abc16faed171e04bacd [file] [log] [blame]
Sascha Haeberling1d2624a2013-07-23 19:00:21 -07001Name: ceres-solver
Carlos Hernandez79397c22014-08-07 17:51:38 -07002Version: 1.9.0
Sascha Haeberling1d2624a2013-07-23 19:00:21 -07003# 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.
Carlos Hernandez79397c22014-08-07 17:51:38 -07006Release: 0.2.0%{?dist}
Sascha Haeberling1d2624a2013-07-23 19:00:21 -07007Summary: A non-linear least squares minimizer
8
9Group: Development/Libraries
10License: BSD
Carlos Hernandez79397c22014-08-07 17:51:38 -070011URL: http://ceres-solver.org/
12Source0: http://%{name}.org/%{name}-%{version}.tar.gz
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070013BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14
15%if (0%{?rhel} == 06)
16BuildRequires: cmake28
17%else
18BuildRequires: cmake
19%endif
20BuildRequires: eigen3-devel
Scott Ettinger399f7d02013-09-09 12:54:43 -070021# suitesparse <= 3.4.0-7 ships without *.hpp C++ headers
22# https://bugzilla.redhat.com/show_bug.cgi?id=1001869
23BuildRequires: suitesparse-devel > 3.4.0-7
24# If the suitesparse package was built with TBB then we need TBB too
25%ifarch %{ix86} x86_64 ia64
26BuildRequires: tbb-devel
27%endif
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070028# Use atlas for BLAS and LAPACK
29BuildRequires: atlas-devel
30BuildRequires: gflags-devel
31BuildRequires: glog-devel
32
33%description
34Ceres Solver is a portable C++ library that allows for modeling and solving
35large complicated nonlinear least squares problems. Features include:
36
37 - A friendly API: build your objective function one term at a time
Carlos Hernandez79397c22014-08-07 17:51:38 -070038 - Automatic and numeric differentiation
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070039 - Robust loss functions
40 - Local parameterizations
41 - Threaded Jacobian evaluators and linear solvers
Carlos Hernandez79397c22014-08-07 17:51:38 -070042 - Trust region solvers with non-monotonic steps (Levenberg-Marquardt and Dogleg (Powell & Subspace))
43 - Line search solvers (L-BFGS and Nonlinear CG)
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070044 - Dense QR and Cholesky factorization (using Eigen) for small problems
45 - Sparse Cholesky factorization (using SuiteSparse) for large sparse problems
46 - Specialized solvers for bundle adjustment problems in computer vision
47 - Iterative linear solvers for general sparse and bundle adjustment problems
Carlos Hernandez79397c22014-08-07 17:51:38 -070048 - Runs on Linux, Windows, Mac OS X, Android, and iOS
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070049
50Notable use of Ceres Solver is for the image alignment in Google Maps and for
51vehicle pose in Google Street View.
52
53
54%package devel
55Summary: A non-linear least squares minimizer
56Group: Development/Libraries
57Requires: %{name} = %{version}-%{release}
58
59%description devel
60The %{name}-devel package contains libraries and header files for
61developing applications that use %{name}.
62
63
64%prep
65%setup -q
66
67%build
68mkdir build
69pushd build
70
71# Disable the compilation flags that rpmbuild macros try to apply to all
72# packages because it breaks the build since release 1.5.0rc1
73%define optflags ""
74%if (0%{?rhel} == 06)
Scott Ettinger399f7d02013-09-09 12:54:43 -070075%{cmake28} ..
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070076%else
Scott Ettinger399f7d02013-09-09 12:54:43 -070077%{cmake} ..
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070078%endif
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070079make %{?_smp_mflags}
80
81
82%install
83rm -rf $RPM_BUILD_ROOT
84pushd build
85make install DESTDIR=$RPM_BUILD_ROOT
86find $RPM_BUILD_ROOT -name '*.la' -delete
87
Scott Ettinger399f7d02013-09-09 12:54:43 -070088# Make the subdirectory in /usr/share match the name of this package
89mv $RPM_BUILD_ROOT%{_datadir}/{Ceres,%{name}}
90
Sascha Haeberling1d2624a2013-07-23 19:00:21 -070091
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95
96%post -p /sbin/ldconfig
97
98%postun -p /sbin/ldconfig
99
100
101%files
102%defattr(-,root,root,-)
Scott Ettinger399f7d02013-09-09 12:54:43 -0700103%doc README LICENSE
Sascha Haeberling1d2624a2013-07-23 19:00:21 -0700104%{_libdir}/*.so.*
105
106%files devel
107%defattr(-,root,root,-)
Sascha Haeberling1d2624a2013-07-23 19:00:21 -0700108%{_includedir}/*
109%{_libdir}/*.so
Scott Ettinger399f7d02013-09-09 12:54:43 -0700110%{_datadir}/%{name}/*.cmake
Sascha Haeberling1d2624a2013-07-23 19:00:21 -0700111
112
113%changelog
Carlos Hernandez79397c22014-08-07 17:51:38 -0700114* Mon May 27 2014 Sameer Agarwal <sameeragarwal@google.com> - 1.9.0-0.2.0
115- Bump version
116
117* Fri May 16 2014 Sameer Agarwal <sameeragarwal@google.com> - 1.9.0-0.1.0
118- Bump version
119
120* Tue Nov 12 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.8.0-0.3.0
121- Bump version
122
123* Wed Nov 6 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.8.0-0.2.0
124- Bump version
125
126* Thu Oct 31 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.8.0-0.1.0
127- Bump version
128
Scott Ettinger399f7d02013-09-09 12:54:43 -0700129* Thu Aug 29 2013 Taylor Braun-Jones <taylor@braun-jones.org> - 1.7.0-0.3.0
130- Bump version
131
132* Mon Aug 26 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.7.0-0.2.0
133- Bump version
134
135* Mon Jul 18 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.7.0-0.1.0
Sascha Haeberling1d2624a2013-07-23 19:00:21 -0700136- Bump version
137
138* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-1
139- Bump version
140
141* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.2.0
142- Bump version
143
144* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.1.0
145- Bump version
146
147* Sun Feb 24 2013 Taylor Braun-Jones <taylor@braun-jones.org> - 1.5.0-0.1.0
148- Bump version.
149
150* Sun Oct 14 2012 Taylor Braun-Jones <taylor@braun-jones.org> - 1.4.0-0
151- Initial creation