Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 1 | Name: ceres-solver |
Sameer Agarwal | 50bbc6f | 2013-04-29 16:47:26 -0700 | [diff] [blame] | 2 | Version: 1.6.0 |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 3 | # 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-Jones | 0101020 | 2013-05-06 16:45:55 -0400 | [diff] [blame] | 6 | Release: 1%{?dist} |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 7 | Summary: A non-linear least squares minimizer |
| 8 | |
| 9 | Group: Development/Libraries |
| 10 | License: BSD |
| 11 | URL: http://code.google.com/p/ceres-solver/ |
Sameer Agarwal | ac62696 | 2013-05-06 07:04:26 -0700 | [diff] [blame] | 12 | Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.gz |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
| 14 | |
Taylor Braun-Jones | c3fd3b9 | 2013-02-26 00:30:35 -0500 | [diff] [blame] | 15 | %if (0%{?rhel} == 06) |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 16 | BuildRequires: cmake28 |
| 17 | %else |
| 18 | BuildRequires: cmake |
| 19 | %endif |
| 20 | BuildRequires: eigen3-devel |
| 21 | BuildRequires: suitesparse-devel |
| 22 | # Use atlas for BLAS and LAPACK |
| 23 | BuildRequires: atlas-devel |
| 24 | BuildRequires: protobuf-devel |
| 25 | BuildRequires: gflags-devel |
| 26 | BuildRequires: glog-devel |
| 27 | |
| 28 | %description |
| 29 | Ceres Solver is a portable C++ library that allows for modeling and solving |
| 30 | large 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 | |
| 44 | Notable use of Ceres Solver is for the image alignment in Google Maps and for |
| 45 | vehicle pose in Google Street View. |
| 46 | |
| 47 | |
| 48 | %package devel |
| 49 | Summary: A non-linear least squares minimizer |
| 50 | Group: Development/Libraries |
| 51 | Requires: %{name} = %{version}-%{release} |
| 52 | |
| 53 | %description devel |
| 54 | The %{name}-devel package contains libraries and header files for |
| 55 | developing applications that use %{name}. |
| 56 | |
| 57 | |
| 58 | %prep |
| 59 | %setup -q |
| 60 | |
| 61 | %build |
| 62 | mkdir build |
| 63 | pushd 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-Jones | c3fd3b9 | 2013-02-26 00:30:35 -0500 | [diff] [blame] | 68 | %if (0%{?rhel} == 06) |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 69 | %{cmake28} .. \ |
| 70 | %else |
| 71 | %{cmake} .. \ |
| 72 | %endif |
| 73 | -DBLAS_LIB:FILEPATH=%{_libdir}/atlas/libatlas.so \ |
| 74 | -DLAPACK_LIB:FILEPATH=%{_libdir}/atlas/liblapack.so |
| 75 | make %{?_smp_mflags} |
| 76 | |
| 77 | |
| 78 | %install |
| 79 | rm -rf $RPM_BUILD_ROOT |
| 80 | pushd build |
| 81 | make install DESTDIR=$RPM_BUILD_ROOT |
| 82 | find $RPM_BUILD_ROOT -name '*.la' -delete |
| 83 | |
| 84 | |
| 85 | %clean |
| 86 | rm -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-Jones | 0101020 | 2013-05-06 16:45:55 -0400 | [diff] [blame] | 108 | * Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-1 |
Sameer Agarwal | ac62696 | 2013-05-06 07:04:26 -0700 | [diff] [blame] | 109 | - Bump version |
| 110 | |
Sameer Agarwal | 0e0a454 | 2013-04-29 17:27:26 -0700 | [diff] [blame] | 111 | * Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.2.0 |
| 112 | - Bump version |
| 113 | |
Sameer Agarwal | 50bbc6f | 2013-04-29 16:47:26 -0700 | [diff] [blame] | 114 | * Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.1.0 |
| 115 | - Bump version |
| 116 | |
Taylor Braun-Jones | 7070174 | 2013-02-15 19:09:48 -0500 | [diff] [blame] | 117 | * 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 |