]> git.pld-linux.org Git - packages/levmar.git/commitdiff
- new auto/th/levmar-2.6-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 24 Jan 2013 19:46:30 +0000 (20:46 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 24 Jan 2013 19:46:30 +0000 (20:46 +0100)
levmar-make.patch [new file with mode: 0644]
levmar.spec [new file with mode: 0644]

diff --git a/levmar-make.patch b/levmar-make.patch
new file mode 100644 (file)
index 0000000..c435bd4
--- /dev/null
@@ -0,0 +1,20 @@
+--- levmar-2.6/Makefile.so.orig        2009-12-04 22:26:31.000000000 +0100
++++ levmar-2.6/Makefile.so     2013-01-24 20:04:49.481824471 +0100
+@@ -6,7 +6,7 @@
+ # major & minor shared lib numbers
+ MAJ=2
+ MIN=2
+-ODIR=sobj # where to place object files for shared lib
++ODIR=sobj
+ CC=gcc
+ CONFIGFLAGS=-ULINSOLVERS_RETAIN_MEMORY
+ #ARCHFLAGS=-march=pentium4 # YOU MIGHT WANT TO UNCOMMENT THIS FOR P4
+@@ -21,7 +21,7 @@
+ LIBS=$(LAPACKLIBS)
+ $(ODIR)/liblevmar.so.$(MAJ).$(MIN): $(LIBOBJS)
+-      $(CC) -shared -Wl,-soname,liblevmar.so.$(MAJ) -o $(ODIR)/liblevmar.so.$(MAJ).$(MIN) $(LIBOBJS) #-llapack -lblas -lf2c
++      $(CC) -shared -Wl,-soname,liblevmar.so.$(MAJ) -o $(ODIR)/liblevmar.so.$(MAJ).$(MIN) $(LIBOBJS) $(LAPACKLIBS)
+ # implicit rule for generating *.o files in ODIR from *.c files
+ $(ODIR)/%.o : %.c
diff --git a/levmar.spec b/levmar.spec
new file mode 100644 (file)
index 0000000..584beb6
--- /dev/null
@@ -0,0 +1,118 @@
+# TODO: PLASMA parallel library (http://icl.cs.utk.edu/plasma/)
+#
+# Conditional build:
+%bcond_without static_libs     # don't build static libraries
+#
+Summary:       LEVMAR - Levenberg-Marquardt non-linear least squares algorithm
+Summary(pl.UTF-8):     LEVMAR - nieliniowy algorytm najmniejszych kwadratów Levenberga-Marquardta
+Name:          levmar
+Version:       2.6
+Release:       1
+License:       GPL v2+
+Group:         Libraries
+Source0:       http://www.ics.forth.gr/~lourakis/levmar/%{name}-%{version}.tgz
+# Source0-md5: 16bc34efa1617219f241eef06427f13f
+Patch0:                %{name}-make.patch
+URL:           http://www.ics.forth.gr/~lourakis/levmar/
+%{?with_static_libs:BuildRequires:     cmake >= 2.6}
+BuildRequires: blas-devel
+BuildRequires: lapack-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LEVMAR is a copylefted C/C++ implementation of the Levenberg-Marquardt
+non-linear least squares algorithm. LEVMAR includes double and single
+precision LM versions, both with analytic and finite difference
+approximated Jacobians. LEVMAR also has some support for constrained
+non-linear least squares, allowing linear equation, box and linear
+inequality constraints.
+
+%description -l pl.UTF-8
+LEVMAR to wydana na wolnej licencji implementacja w C/C++ nieliniowego
+algorytmu najmniejszych kwadratów Levenberga-Marquardta. LEVMAR
+zawiera wersje LM podwójnej i pojedynczej precyzji, z jakobianami
+zarówno analitycznymi, jak i aproksymowanymi metodą różnic
+skończonych. LEVMAR ma także obsługę w pewnym zakresie nieliniowego
+algorytmu najmniejszych kwadratów z ograniczeniami w postaci równań
+liniowych, przedziałów oraz nierówności liniowych.
+
+%package devel
+Summary:       Header files for LEVMAR library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki LEVMAR
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for LEVMAR library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LEVMAR.
+
+%package static
+Summary:       Static LEVMAR library
+Summary(pl.UTF-8):     Statyczna biblioteka LEVMAR
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static LEVMAR library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LEVMAR.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+# shared library (cmake suite doesn't support it)
+install -d sobj
+%{__make} -f Makefile.so \
+       CC="%{__cc}" \
+       CFLAGS='%{rpmcflags} %{rpmcppflags} $(CONFIGFLAGS) -Wall -fPIC' \
+       LAPACKLIBS="-llapack -lblas -lm"
+# now static
+%if %{with static_libs}
+install -d build
+cd build
+%cmake .. \
+       -DLAPACKBLAS_DIR=%{_libdir} \
+       -DF2C_LIB_NAME=m
+
+%{__make}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+
+install sobj/liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}
+ln -sf liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}/liblevmar.so.2
+ln -sf liblevmar.so.2.2 $RPM_BUILD_ROOT%{_libdir}/liblevmar.so
+cp -p levmar.h $RPM_BUILD_ROOT%{_includedir}
+%if %{with static_libs}
+install build/liblevmar.a $RPM_BUILD_ROOT%{_libdir}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.txt 
+%attr(755,root,root) %{_libdir}/liblevmar.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblevmar.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblevmar.so
+%{_includedir}/levmar.h
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/liblevmar.a
+%endif
This page took 0.702713 seconds and 4 git commands to generate.