[OpenNL] - Initial import

Ankur Sinha ankursinha at fedoraproject.org
Sun Jul 17 17:33:24 UTC 2011


commit 7f5708b62ad467b908402c032267c18936b009df
Author: Ankur Sinha <sanjay.ankur at gmail.com>
Date:   Sun Jul 17 23:02:33 2011 +0530

    - Initial import

 .gitignore                        |    1 +
 OpenNL-3.2.1-library_soname.patch |   57 +++++++++++++++++++
 OpenNL.spec                       |  109 +++++++++++++++++++++++++++++++++++++
 sources                           |    1 +
 4 files changed, 168 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6ef8b6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/OpenNL3.2.zip
diff --git a/OpenNL-3.2.1-library_soname.patch b/OpenNL-3.2.1-library_soname.patch
new file mode 100644
index 0000000..34b9169
--- /dev/null
+++ b/OpenNL-3.2.1-library_soname.patch
@@ -0,0 +1,57 @@
+diff -Naur OpenNL3.2.1.orig/CMakeLists.txt OpenNL3.2.1/CMakeLists.txt
+--- OpenNL3.2.1.orig/CMakeLists.txt	2010-09-03 15:39:10.000000000 -0500
++++ OpenNL3.2.1/CMakeLists.txt	2011-07-13 13:40:29.940322355 -0500
+@@ -22,6 +22,10 @@
+ #              Project
+ ######################################
+ PROJECT(OpenNL3)
++# Add version info
++SET(OpenNL3_VERSION_MAJOR 3)
++SET(OpenNL3_VERSION_MINOR 2)
++SET(OpenNL3_VERSION_PATCH 1)
+ 
+ SET(GEEX_BUILD_PATH ${PROJECT_BINARY_DIR})
+ SET(BINARIES_RELATIVE_PATH /binaries/bin/)
+@@ -30,6 +34,8 @@
+     SET(LIBRARIES_RELATIVE_PATH /binaries/bin/)
+ ELSE(WIN32)
+     SET(LIBRARIES_RELATIVE_PATH /binaries/lib/)
++    SET(LIBRARIES_SOVERSION ${OpenNL3_VERSION_MAJOR})
++    SET(LIBRARIES_VERSION ${OpenNL3_VERSION_MAJOR}.${OpenNL3_VERSION_MINOR}.${OpenNL3_VERSION_PATCH})
+ ENDIF(WIN32)
+ 
+ IF(WIN32)
+diff -Naur OpenNL3.2.1.orig/src/CMakeLists.txt OpenNL3.2.1/src/CMakeLists.txt
+--- OpenNL3.2.1.orig/src/CMakeLists.txt	2010-02-08 16:14:22.000000000 -0600
++++ OpenNL3.2.1/src/CMakeLists.txt	2011-07-13 13:41:12.334900997 -0500
+@@ -31,18 +31,23 @@
+ # creation of the library
+ IF(USE_CNC)
+     IF(WIN32)
+-	    CUDA_ADD_LIBRARY(nl ${SOURCES} ${HeaderFiles})
++	    CUDA_ADD_LIBRARY(opennl ${SOURCES} ${HeaderFiles})
+     ELSE(WIN32)
+-        CUDA_ADD_LIBRARY(nl ${SOURCES} )
+-        set_target_properties(nl PROPERTIES COMPILE_FLAGS "-malign-double")
++        CUDA_ADD_LIBRARY(opennl ${SOURCES} )
++        set_target_properties(opennl PROPERTIES
++                                     COMPILE_FLAGS "-malign-double"
++                             )
+     ENDIF(WIN32)
+-    CUDA_ADD_CUBLAS_TO_TARGET(nl)
++    CUDA_ADD_CUBLAS_TO_TARGET(opennl)
+ ELSE(USE_CNC)
+     IF(WIN32)
+-	    ADD_LIBRARY(nl ${SOURCES} ${HeaderFiles})
++	    ADD_LIBRARY(opennl ${SOURCES} ${HeaderFiles})
+     ELSE(WIN32)
+-	    ADD_LIBRARY(nl ${SOURCES} )
++	    ADD_LIBRARY(opennl ${SOURCES} )
+     ENDIF(WIN32)
+ ENDIF(USE_CNC)
+ 
+-
++set_target_properties(opennl PROPERTIES
++                      SOVERSION ${LIBRARIES_SOVERSION}
++                      VERSION   ${LIBRARIES_VERSION}
++                     )
diff --git a/OpenNL.spec b/OpenNL.spec
new file mode 100644
index 0000000..81e9c4f
--- /dev/null
+++ b/OpenNL.spec
@@ -0,0 +1,109 @@
+%global soname libopennl.so
+
+Name:           OpenNL
+Version:        3.2.1
+Release:        5%{?dist}
+Summary:        A library for solving sparse linear systems
+
+License:        BSD
+URL:            http://alice.loria.fr/index.php/software/4-library/23-opennl.html
+Source0:        https://gforge.inria.fr/frs/download.php/27459/OpenNL3.2.zip
+
+# Changes the soname from libnl.so to libopennl.so
+Patch0:         OpenNL-3.2.1-library_soname.patch
+
+BuildRequires:  cmake
+
+
+%description
+OpenNL (Open Numerical Library) is a library for solving sparse linear systems,
+especially designed for the Computer Graphics community. The goal for OpenNL is
+to be as small as possible, while offering the subset of functionalities
+required by this application field. The Makefiles of OpenNL can generate a
+single .c + .h file, very easy to integrate in other projects. The distribution
+includes an implementation of our Least Squares Conformal Maps parameterization
+method.
+
+New version: OpenNL 3.2.1, includes support for CUDA and Fermi architecture
+(Concurrent Number Cruncher and Nathan Bell's ELL formats)
+
+
+OpenNL offers the following set of functionalities:
+
+    Efficient sparse matrix data structure (for non-symmetric and symmetric
+matrices)
+    Iterative builder for sparse linear system
+    Iterative builder for sparse least-squares problems
+    Iterative solvers: conjugate gradient, BICGStab, GMRES
+    Preconditionners: Jacobi, SSOR
+    Iterative solver on the GPU (Concurrent Number Cruncher and Nathan Bell's
+ELL)
+    Sparse direct solvers: OpenNL can be linked with SuperLU
+    Simple demo program with LSCM (Least Squares Conformal Maps)
+
+%package devel
+Summary:    Development files for %{name}
+Requires:   %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the %{name} shared library that one can link against.
+
+%prep
+%setup -q -n %{name}%{version}
+%patch0 -p1
+
+%build
+mkdir -p build/linux-Release
+cd build/linux-Release
+%cmake -DCMAKE_BUILD_TYPE:STRING=Release ../../
+
+make %{?_smp_mflags}
+
+
+%install
+# Install library
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/
+install -p -m 0755  build/linux-Release/binaries/lib/libopennl.so.%{version} \
+$RPM_BUILD_ROOT/%{_libdir}/
+
+find  build/linux-Release/binaries/lib -type l -exec cp -a '{}' \
+$RPM_BUILD_ROOT/%{_libdir}/ \;
+
+# Correct encoding
+pushd examples
+    sed -i 's/\r//' make_test.bat
+popd
+
+# Install includes
+install -d $RPM_BUILD_ROOT/%{_includedir}/NL/
+cp -av src/NL/nl.h $RPM_BUILD_ROOT/%{_includedir}/
+find src/NL/ -name "*.h" ! -name "nl.h" -execdir cp -av '{}' $RPM_BUILD_ROOT/%{_includedir}/NL/ \;
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%doc doc/*
+%{_libdir}/%soname.*
+
+%files devel
+%doc examples
+%{_libdir}/%soname
+%{_includedir}/*
+
+%changelog
+* Sat Jul 16 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.2.1-5
+- fix doc macro usage
+
+* Fri Jul 15 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.2.1-4
+- Modify install section
+
+* Thu Jul 14 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.2.1-3
+- add version macros to soname etc.
+
+* Thu Jul 14 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.2.1-2
+- add patch to correct libname and versioning (courtesy of Richard Shaw)
+
+* Tue Jul 12 2011 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 3.2.1-1
+- initial rpmbuild
+
diff --git a/sources b/sources
index e69de29..dc2be99 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6e182f15bf9bc8ffe95547c1cdd7e7b4  OpenNL3.2.zip


More information about the scm-commits mailing list