[alglib] Initial import

Sandro Mani smani at fedoraproject.org
Thu Jun 19 20:59:56 UTC 2014


commit e2a7b82f5fdd0d590fdcf441eb8b789f9088e9cb
Author: Sandro Mani <manisandro at gmail.com>
Date:   Thu Jun 19 22:59:29 2014 +0200

    Initial import

 .gitignore     |    1 +
 CMakeLists.txt |   22 ++++++++++++
 alglib.spec    |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 bsd.txt        |   17 +++++++++
 sources        |    1 +
 5 files changed, 146 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..afd3d21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/alglib-3.8.2.cpp.tgz
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..1410f48
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Set  the minimum  required version  of cmake  for a  project.
+cmake_minimum_required(VERSION 2.6)
+
+file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.h)
+file(GLOB_RECURSE SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/*.cpp)
+
+add_library(alglib SHARED ${SRC})
+set_target_properties(alglib PROPERTIES VERSION 3.8.2 SOVERSION 3)
+
+add_executable(test_c tests/test_c.cpp)
+add_executable(test_i tests/test_i.cpp)
+# add_executable(test_x tests/test_x.cpp)
+set_target_properties(test_c PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX")
+set_target_properties(test_i PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX")
+# set_target_properties(test_x PROPERTIES COMPILE_FLAGS "-DAE_USE_ALLOC_COUNTER -DAE_DEBUG4POSIX")
+include_directories(src/)
+target_link_libraries(test_c alglib)
+target_link_libraries(test_i alglib)
+# target_link_libraries(test_x alglib)
+
+install(TARGETS alglib LIBRARY DESTINATION lib${LIB_SUFFIX})
+install(FILES ${HDR} DESTINATION include/alglib)
diff --git a/alglib.spec b/alglib.spec
new file mode 100644
index 0000000..cba54aa
--- /dev/null
+++ b/alglib.spec
@@ -0,0 +1,105 @@
+Name:           alglib
+Version:        3.8.2
+Release:        4%{?dist}
+Summary:        A numerical analysis and data processing library
+
+License:        GPLv2+
+URL:            http://www.alglib.net/
+Source0:        http://www.alglib.net/translator/re/%{name}-%{version}.cpp.tgz
+Source1:        CMakeLists.txt
+# Extracted from manual.cpp.html
+Source2:        bsd.txt
+
+BuildRequires:  cmake
+
+%description
+ALGLIB is a cross-platform numerical analysis and data processing library.
+ALGLIB features include:
+ - Data analysis (classification/regression, including neural networks)
+ - Optimization and nonlinear solvers
+ - Interpolation and linear/nonlinear least-squares fitting
+ - Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear
+   solvers, Fast Fourier Transform and many other algorithms (numerical
+   integration, ODEs, statistics, special functions)
+
+
+
+%package        devel
+Summary:        Development files for %{name}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%package        doc
+Summary:        API documentation for %{name}
+License:        BSD
+BuildArch:      noarch
+
+%description    doc
+The %{name}-doc package contains the %{name} API documentation.
+
+
+%prep
+%autosetup -p1 -ncpp
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+
+# Fix permissions and line endings
+chmod 644 gpl2.txt
+chmod 644 manual.cpp.html
+sed -i 's|\r||g' manual.cpp.html
+
+
+%build
+mkdir build
+(
+cd build
+%cmake ..
+make %{?_smp_mflags}
+)
+
+
+%install
+%make_install -C build
+
+%check
+pushd build
+./test_c || exit 1
+./test_i || exit 1
+popd
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc gpl2.txt
+%{_libdir}/libalglib.so.*
+
+%files devel
+%{_includedir}/%{name}/
+%{_libdir}/libalglib.so
+
+%files doc
+%doc bsd.txt manual.cpp.html
+
+
+%changelog
+* Wed Jun 18 2014 Sandro Mani <manisandro at gmail.com> - 3.8.2-4
+- Add missing license tag
+
+* Wed Jun 18 2014 Sandro Mani <manisandro at gmail.com> - 3.8.2-3
+- Add bsd.txt to doc subpackage (license text extracted from manual.cpp.html)
+
+* Wed Jun 18 2014 Sandro Mani <manisandro at gmail.com> - 3.8.2-2
+- Add doc subpackage with correct license
+- Run tests
+- Fix unversioned so included in main package
+- Fix manual.cpp.html permissions, line endings
+
+* Sat Jun 14 2014 Sandro Mani <manisandro at gmail.com> - 3.8.2-1
+- Initial package
diff --git a/bsd.txt b/bsd.txt
new file mode 100644
index 0000000..5bd8ab5
--- /dev/null
+++ b/bsd.txt
@@ -0,0 +1,17 @@
+ Copyright 1994-2009 Sergey Bochkanov, ALGLIB Project. All rights reserved.
+
+Redistribution and use of this document (ALGLIB Reference Manual) with or
+without modification, are permitted provided that such redistributions will
+retain the above copyright notice, this condition and the following disclaimer
+as the first (or last) lines of this file.
+
+THIS DOCUMENTATION IS PROVIDED BY THE ALGLIB PROJECT "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE ALGLIB PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.  
diff --git a/sources b/sources
index e69de29..fc37d24 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a28827b5b9c98638dff7fcfa8f877ac7  alglib-3.8.2.cpp.tgz


More information about the scm-commits mailing list