forked from ceres-solver/ceres-solver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathceres-solver.spec
167 lines (125 loc) · 4.8 KB
/
ceres-solver.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
Name: ceres-solver
Version: 1.10.0
# Release candidate versions are messy. Give them a release of
# e.g. "0.1.0%{?dist}" for RC1 (and remember to adjust the Source0
# URL). Non-RC releases go back to incrementing integers starting at 1.
Release: 0.0.0%{?dist}
Summary: A non-linear least squares minimizer
Group: Development/Libraries
License: BSD
URL: http://ceres-solver.org/
Source0: http://%{name}.org/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if (0%{?rhel} == 06)
BuildRequires: cmake28
%else
BuildRequires: cmake
%endif
BuildRequires: eigen3-devel
# suitesparse <= 3.4.0-7 ships without *.hpp C++ headers
# https://bugzilla.redhat.com/show_bug.cgi?id=1001869
BuildRequires: suitesparse-devel > 3.4.0-7
# If the suitesparse package was built with TBB then we need TBB too
%ifarch %{ix86} x86_64 ia64
BuildRequires: tbb-devel
%endif
# Use atlas for BLAS and LAPACK
BuildRequires: atlas-devel
BuildRequires: gflags-devel
BuildRequires: glog-devel
%description
Ceres Solver is an open source C++ library for modeling and solving
large, complicated optimization problems. It is a feature rich, mature
and performant library which has been used in production at Google
since 2010. Notable use of Ceres Solver is for the image alignment in
Google Maps and for vehicle pose in Google Street View. Ceres Solver
can solve two kinds of problems.
1. Non-linear Least Squares problems with bounds constraints.
2. General unconstrained optimization problems.
Features include:
- A friendly API: build your objective function one term at a time
- Automatic and numeric differentiation
- Robust loss functions
- Local parameterizations
- Threaded Jacobian evaluators and linear solvers
- Trust region solvers with non-monotonic steps (Levenberg-Marquardt and Dogleg (Powell & Subspace))
- Line search solvers (L-BFGS and Nonlinear CG)
- Dense QR and Cholesky factorization (using Eigen) for small problems
- Sparse Cholesky factorization (using SuiteSparse) for large sparse problems
- Specialized solvers for bundle adjustment problems in computer vision
- Iterative linear solvers for general sparse and bundle adjustment problems
- Runs on Linux, Windows, Mac OS X, Android, and iOS
%package devel
Summary: A non-linear least squares minimizer
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%build
mkdir build
pushd build
# Disable the compilation flags that rpmbuild macros try to apply to all
# packages because it breaks the build since release 1.5.0rc1
%define optflags ""
%if (0%{?rhel} == 06)
%{cmake28} ..
%else
%{cmake} ..
%endif
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -delete
# Make the subdirectory in /usr/share match the name of this package
mv $RPM_BUILD_ROOT%{_datadir}/{Ceres,%{name}}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README LICENSE
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%{_datadir}/%{name}/*.cmake
%changelog
* Feb Dec 5 2014 Sameer Agarwal <[email protected]> - 1.10.0-0.0.0
- Bump version (and yes this is a downward revisio).
* Mon Nov 12 2014 Sameer Agarwal <[email protected]> - 1.10.0-0.2.0
- Bump version
* Mon Oct 6 2014 Sameer Agarwal <[email protected]> - 1.10.0-0.1.0
- Bump version
* Mon May 27 2014 Sameer Agarwal <[email protected]> - 1.9.0-0.2.0
- Bump version
* Fri May 16 2014 Sameer Agarwal <[email protected]> - 1.9.0-0.1.0
- Bump version
* Tue Nov 12 2013 Sameer Agarwal <[email protected]> - 1.8.0-0.3.0
- Bump version
* Wed Nov 6 2013 Sameer Agarwal <[email protected]> - 1.8.0-0.2.0
- Bump version
* Thu Oct 31 2013 Sameer Agarwal <[email protected]> - 1.8.0-0.1.0
- Bump version
* Thu Aug 29 2013 Taylor Braun-Jones <[email protected]> - 1.7.0-0.3.0
- Bump version
* Mon Aug 26 2013 Sameer Agarwal <[email protected]> - 1.7.0-0.2.0
- Bump version
* Mon Jul 18 2013 Sameer Agarwal <[email protected]> - 1.7.0-0.1.0
- Bump version
* Mon Apr 29 2013 Sameer Agarwal <[email protected]> - 1.6.0-1
- Bump version
* Mon Apr 29 2013 Sameer Agarwal <[email protected]> - 1.6.0-0.2.0
- Bump version
* Mon Apr 29 2013 Sameer Agarwal <[email protected]> - 1.6.0-0.1.0
- Bump version
* Sun Feb 24 2013 Taylor Braun-Jones <[email protected]> - 1.5.0-0.1.0
- Bump version.
* Sun Oct 14 2012 Taylor Braun-Jones <[email protected]> - 1.4.0-0
- Initial creation