Sisyphus repository
Last update: 4 february 2023 | SRPMs: 18170 | Visits: 26642459
en ru br
ALT Linux repos

Group :: System/Libraries
RPM: liblevmar

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# BEGIN SourceDeps(oneline):
BuildRequires: gcc-c++
# END SourceDeps(oneline)
BuildRequires: libblas-devel
%add_optflags %optflags_shared
%define oldname levmar
# see
%define _localstatedir %{_var}
# SOlib major and minor version
%global major 2
%global minor 2

Name: liblevmar
Version: 2.5
Release: alt1_14
Summary: Levenberg-Marquardt nonlinear least squares algorithm


# Patch to fix compilation of the shared library and compile the demo program

# Sent to levmar author on 28-Jan-2010
Patch0: levmar-shared.patch

License: GPLv2+
Group: System/Libraries

BuildRequires: dos2unix
BuildRequires: liblapack-devel
Provides: levmar = %{version}-%{release}

levmar is a native ANSI C implementation of the Levenberg-Marquardt
optimization algorithm.  Both unconstrained and constrained (under linear
equations, inequality and box constraints) Levenberg-Marquardt variants are
included.  The LM algorithm is an iterative technique that finds a local
minimum of a function that is expressed as the sum of squares of nonlinear
functions.  It has become a standard technique for nonlinear least-squares
problems and can be thought of as a combination of steepest descent and the
Gauss-Newton method.  When the current solution is far from the correct on,
the algorithm behaves like a steepest descent method: slow, but guaranteed
to converge.  When the current solution is close to the correct solution, it
becomes a Gauss-Newton method.

%package devel
Summary: Development files for levmar library, and demo program
Group: Development/Other
Requires: liblevmar = %{version}-%{release}
Provides: levmar-devel = %{version}-%{release}

%description devel
Development files for the levmar library, and demo program.

%setup -n %{oldname}-%{version} -q
%patch -P 0 -p1 -b .shared
dos2unix -k README.txt

mkdir sobj
make CFLAGS="%{optflags} -funroll-loops -fPIC" %{?_smp_mflags} -f

install -D -p -m 755 sobj/{major}.%{minor} %{buildroot}%{_libdir}/{major}.%{minor}
install -D -p -m 644 levmar.h %{buildroot}%{_includedir}/levmar.h
install -D -p -m 755 lmdemo %{buildroot}%{_bindir}/lmdemo
ln -s{major}.%{minor} %{buildroot}%{_libdir}/{major}
ln -s{major}.%{minor} %{buildroot}%{_libdir}/


%files devel


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin