e2a7b82
Name:           alglib
a894e08
Version:        3.9.0
a894e08
Release:        1%{?dist}
e2a7b82
Summary:        A numerical analysis and data processing library
e2a7b82
e2a7b82
License:        GPLv2+
e2a7b82
URL:            http://www.alglib.net/
a894e08
Source0:        http://www.alglib.net/translator/re/%{name}-%{version}.cpp.gpl.tgz
e2a7b82
Source1:        CMakeLists.txt
e2a7b82
# Extracted from manual.cpp.html
e2a7b82
Source2:        bsd.txt
e2a7b82
e2a7b82
BuildRequires:  cmake
e2a7b82
9e865b6
# As upstream doesn't support other archs, and package fails to build on secondary archs due test failure
9e865b6
ExclusiveArch: %{ix86} %{arm} x86_64
9e865b6
e2a7b82
%description
e2a7b82
ALGLIB is a cross-platform numerical analysis and data processing library.
e2a7b82
ALGLIB features include:
e2a7b82
 - Data analysis (classification/regression, including neural networks)
e2a7b82
 - Optimization and nonlinear solvers
e2a7b82
 - Interpolation and linear/nonlinear least-squares fitting
e2a7b82
 - Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear
e2a7b82
   solvers, Fast Fourier Transform and many other algorithms (numerical
e2a7b82
   integration, ODEs, statistics, special functions)
e2a7b82
e2a7b82
e2a7b82
e2a7b82
%package        devel
e2a7b82
Summary:        Development files for %{name}
e2a7b82
Requires:       %{name}%{?_isa} = %{version}-%{release}
e2a7b82
e2a7b82
%description    devel
e2a7b82
The %{name}-devel package contains libraries and header files for
e2a7b82
developing applications that use %{name}.
e2a7b82
e2a7b82
%package        doc
e2a7b82
Summary:        API documentation for %{name}
e2a7b82
License:        BSD
e2a7b82
BuildArch:      noarch
e2a7b82
e2a7b82
%description    doc
e2a7b82
The %{name}-doc package contains the %{name} API documentation.
e2a7b82
e2a7b82
e2a7b82
%prep
e0af201
%setup -q -n cpp
e2a7b82
cp %{SOURCE1} .
e2a7b82
cp %{SOURCE2} .
e2a7b82
e2a7b82
# Fix permissions and line endings
e2a7b82
chmod 644 gpl2.txt
e2a7b82
chmod 644 manual.cpp.html
e2a7b82
sed -i 's|\r||g' manual.cpp.html
e2a7b82
e2a7b82
e2a7b82
%build
e2a7b82
mkdir build
e2a7b82
(
e2a7b82
cd build
a894e08
%cmake -DALGLIB_VERSION=%{version} ..
e2a7b82
make %{?_smp_mflags}
e2a7b82
)
e2a7b82
e2a7b82
e2a7b82
%install
e2a7b82
%make_install -C build
a894e08
ln -s libalglib-%{version}.so %{buildroot}%{_libdir}/libalglib.so
a894e08
e2a7b82
e2a7b82
%check
e2a7b82
pushd build
e0af201
LD_LIBRARY_PATH=$PWD ./test_c || exit 1
e0af201
LD_LIBRARY_PATH=$PWD ./test_i || exit 1
e2a7b82
popd
e2a7b82
e2a7b82
e2a7b82
%post -p /sbin/ldconfig
e2a7b82
e2a7b82
%postun -p /sbin/ldconfig
e2a7b82
e2a7b82
e2a7b82
%files
e2a7b82
%doc gpl2.txt
a894e08
%{_libdir}/libalglib-%{version}.so
e2a7b82
e2a7b82
%files devel
e2a7b82
%{_includedir}/%{name}/
e2a7b82
%{_libdir}/libalglib.so
e2a7b82
e2a7b82
%files doc
e2a7b82
%doc bsd.txt manual.cpp.html
e2a7b82
e2a7b82
e2a7b82
%changelog
a894e08
* Sat Dec 13 2014 Sandro Mani <manisandro@gmail.com> - 3.9.0-1
a894e08
- Update to 3.9.0
a894e08
- Use version as library name suffix, not as soname
a894e08
e9e9483
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.2-6
e9e9483
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e9e9483
9e865b6
* Wed Jul 9 2014 Jakub ńĆajka <jcajka@redhat.com> - 3.8.2-5
9e865b6
- Made exlusive for primary archs
9e865b6
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-4
e2a7b82
- Add missing license tag
e2a7b82
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-3
e2a7b82
- Add bsd.txt to doc subpackage (license text extracted from manual.cpp.html)
e2a7b82
e2a7b82
* Wed Jun 18 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-2
e2a7b82
- Add doc subpackage with correct license
e2a7b82
- Run tests
e2a7b82
- Fix unversioned so included in main package
e2a7b82
- Fix manual.cpp.html permissions, line endings
e2a7b82
e2a7b82
* Sat Jun 14 2014 Sandro Mani <manisandro@gmail.com> - 3.8.2-1
e2a7b82
- Initial package