Name: alglib
Version: 3.8.2
Release: 6%{?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
# As upstream doesn't support other archs, and package fails to build on secondary archs due test failure
ExclusiveArch: %{ix86} %{arm} x86_64
%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
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Jul 9 2014 Jakub ńĆajka <jcajka@redhat.com> - 3.8.2-5
- Made exlusive for primary archs
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-4
- Add missing license tag
* Wed Jun 18 2014 Sandro Mani <manisandro@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@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@gmail.com> - 3.8.2-1
- Initial package