Home | History | Annotate | Download | only in scripts
      1 Name:           ceres-solver
      2 Version:        1.9.0
      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.
      6 Release:        0.2.0%{?dist}
      7 Summary:        A non-linear least squares minimizer
      8 
      9 Group:          Development/Libraries
     10 License:        BSD
     11 URL:            http://ceres-solver.org/
     12 Source0:        http://%{name}.org/%{name}-%{version}.tar.gz
     13 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
     14 
     15 %if (0%{?rhel} == 06)
     16 BuildRequires:  cmake28
     17 %else
     18 BuildRequires:  cmake
     19 %endif
     20 BuildRequires:  eigen3-devel
     21 # suitesparse <= 3.4.0-7 ships without *.hpp C++ headers
     22 # https://bugzilla.redhat.com/show_bug.cgi?id=1001869
     23 BuildRequires:  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
     26 BuildRequires:  tbb-devel
     27 %endif
     28 # Use atlas for BLAS and LAPACK
     29 BuildRequires:  atlas-devel
     30 BuildRequires:  gflags-devel
     31 BuildRequires:  glog-devel
     32 
     33 %description
     34 Ceres Solver is a portable C++ library that allows for modeling and solving
     35 large complicated nonlinear least squares problems. Features include:
     36 
     37   - A friendly API: build your objective function one term at a time
     38   - Automatic and numeric differentiation
     39   - Robust loss functions
     40   - Local parameterizations
     41   - Threaded Jacobian evaluators and linear solvers
     42   - Trust region solvers with non-monotonic steps (Levenberg-Marquardt and Dogleg (Powell & Subspace))
     43   - Line search solvers (L-BFGS and Nonlinear CG)
     44   - 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
     48   - Runs on Linux, Windows, Mac OS X, Android, and iOS
     49 
     50 Notable use of Ceres Solver is for the image alignment in Google Maps and for
     51 vehicle pose in Google Street View.
     52 
     53 
     54 %package        devel
     55 Summary:        A non-linear least squares minimizer
     56 Group:          Development/Libraries
     57 Requires:       %{name} = %{version}-%{release}
     58 
     59 %description    devel
     60 The %{name}-devel package contains libraries and header files for
     61 developing applications that use %{name}.
     62 
     63 
     64 %prep
     65 %setup -q
     66 
     67 %build
     68 mkdir build
     69 pushd 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)
     75 %{cmake28} ..
     76 %else
     77 %{cmake} ..
     78 %endif
     79 make %{?_smp_mflags}
     80 
     81 
     82 %install
     83 rm -rf $RPM_BUILD_ROOT
     84 pushd build
     85 make install DESTDIR=$RPM_BUILD_ROOT
     86 find $RPM_BUILD_ROOT -name '*.la' -delete
     87 
     88 # Make the subdirectory in /usr/share match the name of this package
     89 mv $RPM_BUILD_ROOT%{_datadir}/{Ceres,%{name}}
     90 
     91 
     92 %clean
     93 rm -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,-)
    103 %doc README LICENSE
    104 %{_libdir}/*.so.*
    105 
    106 %files devel
    107 %defattr(-,root,root,-)
    108 %{_includedir}/*
    109 %{_libdir}/*.so
    110 %{_datadir}/%{name}/*.cmake
    111 
    112 
    113 %changelog
    114 * 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 
    129 * 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
    136 - 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
    152