Blob Blame History Raw
Name:           mlpack
Version:        2.2.5
Release:        2%{?dist}
Summary:        Scalable, fast C++ machine learning library

Group:          System Environment/Libraries
License:        LGPLv3+
URL:            http://www.mlpack.org
Source0:        http://www.mlpack.org/files/%{name}-%{version}.tar.gz

# CMake by default doesn't provide support for specifying libdir on install
# (argh!) and this has to be done by hand in the CMake configuration.
Patch0:         cmake_libdir.patch

# By default the mlpack Doxyfile excludes all files in the directory pattern
# */build/*.  Well, on Koji, that's everything.  So we need to not exclude
# that.
Patch1:		no_exclude_build.patch

# Newer versions of Doxygen choke on the TreeTraits definitions for some reason.
Patch2:		doxygen.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Use cmake28 package on RHEL.
%if 0%{?rhel}
BuildRequires:  cmake28 >= 2.8.5
%else
BuildRequires:  cmake >= 2.8.5
%endif

BuildRequires:  armadillo-devel >= 4.200.0
BuildRequires:  boost-devel, boost-program-options, boost-math, boost-serialization >= 1.49
BuildRequires:  pkg-config

# For generating man pages (CMake configuration takes care of this assuming
# txt2man is installed).  It is possible that we could just add all the man
# pages, generated offline, as a patch to this SRPM, but txt2man seems to exist
# in repos.
BuildRequires:  txt2man
# For generation of Doxygen HTML documentation.
BuildRequires:  doxygen
BuildRequires:  graphviz

# something doesn't like size_t being unsigned long on s390
ExcludeArch:    s390

%description
mlpack is a C++ machine learning library with emphasis on scalability, speed,
and ease-of-use. Its aim is to make machine learning possible for novice users
by means of a simple, consistent API, while simultaneously exploiting C++
language features to provide maximum performance and maximum flexibility for
expert users. mlpack outperforms competing machine learning libraries by large
margins.

# Executables.
%package bin
Summary:        Command-line executables for mlpack (machine learning library)
Group:          Applications/Engineering
Requires:       %{name}%{_isa} = %{version}-%{release}

%description bin
mlpack is a C++ machine learning library with emphasis on scalability, speed,
and ease-of-use. Its aim is to make machine learning possible for novice users
by means of a simple, consistent API, while simultaneously exploiting C++
language features to provide maximum performance and maximum flexibility for
expert users. mlpack outperforms competing machine learning libraries by large
margins.  This package provides the command-line executables which run mlpack
methods and related documentation.

# Development headers.
%package devel
Summary:        Development headers for mlpack (C++ machine learning library)
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       armadillo-devel >= 4.200.0
Requires:       boost-devel, boost-program-options, boost-math
Requires:       libxml2-devel
Requires:       lapack-devel
Requires:	pkg-config

%description devel
mlpack is a C++ machine learning library with emphasis on scalability, speed,
and ease-of-use. Its aim is to make machine learning possible for novice users
by means of a simple, consistent API, while simultaneously exploiting C++
language features to provide maximum performance and maximum flexibility for
expert users. mlpack outperforms competing machine learning libraries by large
margins.  This package provides the headers to compile applications against
mlpack.



%package doc
Summary:        Doxygen documentation for mlpack (C++ machine learning library)
Group:          Documentation

%description doc
mlpack is a C++ machine learning library with emphasis on scalability, speed,
and ease-of-use.  Its aim is to make machine learning possible for novice users
by means of a simple, consistent API, while simultaneously exploiting C++
language features to provide maximum performance and maximum flexibility for
expert users.  mlpack outperforms competing machine learning libraries by large
margins.  This package provides the Doxygen-generated documentation for mlpack.

# For the F20 unversioned documentation change.  This evaluates to
# %{_pkgdocdir} if on F20 and %{_docdir}/%{name}-%{version} otherwise.
%global our_docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
%if 0%{?rhel}
# On RHEL6, the Boost CMake scripts fail for some reason.  I don't have the
# time (or patience) to investigate, but if we force CMake to find Boost "the
# hard way" by specifying Boost_NO_BOOST_CMAKE=1, it works.
%{cmake28} -D Boost_NO_BOOST_CMAKE=1 -D LIBDIR=%{_libdir} -D DEBUG=OFF -D PROFILE=OFF .
%else
%{cmake} -D LIBDIR=%{_libdir} -D DEBUG=OFF -D PROFILE=OFF .
%endif

make
# Build documentation ('doc' is not in the list of default targets).
make doc


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Put the license file and documentation in place.
if [ "%{our_docdir}" != "%{_docdir}/mlpack" ]; then
  mv $RPM_BUILD_ROOT/%{_docdir}/mlpack $RPM_BUILD_ROOT/%{our_docdir}
fi
mkdir -p $RPM_BUILD_ROOT/%{our_docdir}
cp LICENSE.txt $RPM_BUILD_ROOT/%{our_docdir}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%{_libdir}/libmlpack.so.2
%{_libdir}/libmlpack.so.2.2
%{our_docdir}/LICENSE.txt

%files bin
%defattr(-,root,root,-)
%{_bindir}/mlpack_adaboost
%{_bindir}/mlpack_allknn
%{_bindir}/mlpack_allkfn
%{_bindir}/mlpack_allkrann
%{_bindir}/mlpack_approx_kfn
%{_bindir}/mlpack_cf
%{_bindir}/mlpack_dbscan
%{_bindir}/mlpack_decision_stump
%{_bindir}/mlpack_decision_tree
%{_bindir}/mlpack_det
%{_bindir}/mlpack_emst
%{_bindir}/mlpack_fastmks
%{_bindir}/mlpack_gmm_generate
%{_bindir}/mlpack_gmm_probability
%{_bindir}/mlpack_gmm_train
%{_bindir}/mlpack_hmm_generate
%{_bindir}/mlpack_hmm_loglik
%{_bindir}/mlpack_hmm_train
%{_bindir}/mlpack_hmm_viterbi
%{_bindir}/mlpack_hoeffding_tree
%{_bindir}/mlpack_kernel_pca
%{_bindir}/mlpack_kfn
%{_bindir}/mlpack_kmeans
%{_bindir}/mlpack_knn
%{_bindir}/mlpack_krann
%{_bindir}/mlpack_lars
%{_bindir}/mlpack_linear_regression
%{_bindir}/mlpack_local_coordinate_coding
%{_bindir}/mlpack_logistic_regression
%{_bindir}/mlpack_lsh
%{_bindir}/mlpack_mean_shift
%{_bindir}/mlpack_nbc
%{_bindir}/mlpack_nca
%{_bindir}/mlpack_nmf
%{_bindir}/mlpack_pca
%{_bindir}/mlpack_perceptron
%{_bindir}/mlpack_preprocess_binarize
%{_bindir}/mlpack_preprocess_describe
%{_bindir}/mlpack_preprocess_imputer
%{_bindir}/mlpack_preprocess_split
%{_bindir}/mlpack_radical
%{_bindir}/mlpack_range_search
%{_bindir}/mlpack_softmax_regression
%{_bindir}/mlpack_sparse_coding
%{_mandir}/man1/mlpack_adaboost.1*
%{_mandir}/man1/mlpack_allknn.1*
%{_mandir}/man1/mlpack_allkfn.1*
%{_mandir}/man1/mlpack_allkrann.1*
%{_mandir}/man1/mlpack_approx_kfn.1*
%{_mandir}/man1/mlpack_cf.1*
%{_mandir}/man1/mlpack_dbscan.1*
%{_mandir}/man1/mlpack_decision_stump.1*
%{_mandir}/man1/mlpack_decision_tree.1*
%{_mandir}/man1/mlpack_det.1*
%{_mandir}/man1/mlpack_emst.1*
%{_mandir}/man1/mlpack_fastmks.1*
%{_mandir}/man1/mlpack_gmm_generate.1*
%{_mandir}/man1/mlpack_gmm_probability.1*
%{_mandir}/man1/mlpack_gmm_train.1*
%{_mandir}/man1/mlpack_hmm_generate.1*
%{_mandir}/man1/mlpack_hmm_loglik.1*
%{_mandir}/man1/mlpack_hmm_train.1*
%{_mandir}/man1/mlpack_hmm_viterbi.1*
%{_mandir}/man1/mlpack_hoeffding_tree.1*
%{_mandir}/man1/mlpack_kernel_pca.1*
%{_mandir}/man1/mlpack_kfn.1*
%{_mandir}/man1/mlpack_kmeans.1*
%{_mandir}/man1/mlpack_knn.1*
%{_mandir}/man1/mlpack_krann.1*
%{_mandir}/man1/mlpack_lars.1*
%{_mandir}/man1/mlpack_linear_regression.1*
%{_mandir}/man1/mlpack_local_coordinate_coding.1*
%{_mandir}/man1/mlpack_logistic_regression.1*
%{_mandir}/man1/mlpack_lsh.1*
%{_mandir}/man1/mlpack_mean_shift.1*
%{_mandir}/man1/mlpack_nbc.1*
%{_mandir}/man1/mlpack_nca.1*
%{_mandir}/man1/mlpack_nmf.1*
%{_mandir}/man1/mlpack_pca.1*
%{_mandir}/man1/mlpack_perceptron.1*
%{_mandir}/man1/mlpack_preprocess_binarize.1*
%{_mandir}/man1/mlpack_preprocess_describe.1*
%{_mandir}/man1/mlpack_preprocess_imputer.1*
%{_mandir}/man1/mlpack_preprocess_split.1*
%{_mandir}/man1/mlpack_radical.1*
%{_mandir}/man1/mlpack_range_search.1*
%{_mandir}/man1/mlpack_softmax_regression.1*
%{_mandir}/man1/mlpack_sparse_coding.1*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmlpack.so
%{_includedir}/mlpack/
%{_libdir}/pkgconfig/mlpack.pc

%files doc
%defattr(-,root,root,-)
%{our_docdir}

%changelog
* Fri Dec 01 2017 Ryan Curtin <ryan@ratml.org> - 2.2.5-2
- Rebuild for Armadillo soname bump.

* Wed Sep 13 2017 Ryan Curtin <ryan@ratml.org> - 2.2.5-1
- Update to latest stable version.
- Add pkg-config dependency.

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Jul 19 2017 Jonathan Wakely <jwakely@redhat.com> - 2.0.1-6
- Rebuilt for s390x binutils bug

* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 2.0.1-5
- Rebuilt for Boost 1.64

* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Jun 30 2016 José Matos <jamatos@fedoraproject.org> - 2.0.1-2
- Rebuild for armadillo 7.x and remove BR SuperLU as armadillo takes care of that

* Thu Feb 11 2016 Ryan Curtin <ryan@ratml.org> - 2.0.1-1
- Update to latest stable version.
- Add doxygen.patch for bug with newer Doxygen versions.

* Thu Feb 11 2016 José Matos <jamatos@fedoraproject.org> - 1.0.11-11
- rebuild for armadillo 6

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.11-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1.0.11-9
- Rebuilt for Boost 1.60

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 1.0.11-8
- Rebuilt for Boost 1.59

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.11-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 1.0.11-6
- rebuild for Boost 1.58

* Fri Jul  3 2015 José Matos <jamatos@fedoraproject.org> - 1.0.11-5
- Rebuild for armadillo 5(.xxx.y)

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.11-3
- Rebuilt for GCC 5 C++11 ABI change

* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.0.11-2
- Rebuild for boost 1.57.0

* Thu Dec 11 2014 Ryan Curtin <ryan@ratml.org> - 1.0.11-1
- Update to latest stable release.

* Fri Aug 29 2014 Ryan Curtin <ryan@ratml.org> - 1.0.10-1
- Update to latest stable release.

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jul 28 2014 Ryan Curtin <ryan@ratml.org> - 1.0.9-1
- Update to latest stable release.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.0.8-3
- Rebuild for boost 1.55.0

* Wed Mar 19 2014 José Matos <jamatos@fedoraproject.org> - 1.0.8-2
- Rebuild for Armadillo 4.1 on Fedora 19, 20 and rawhide.

* Fri Jan 10 2014 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.8-1
- Update to latest stable release.
- Rebuild for Armadillo 4.0 on rawhide.

* Sun Nov 03 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.7-1
- Update to latest stable release.

* Tue Aug 06 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.6-6
- Add no_exclude_build.patch so that Koji builds don't exclude all the code from Doxygen.

* Tue Aug 06 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.6-5
- Require graphviz (dot) for generation of Doxygen graphs.

* Tue Aug 06 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.6-4
- Use %{our_docdir} for F20 change to unversioned documentation directory names.
- Do not package HTML documentation in main package.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 27 2013 pmachata@redhat.com - 1.0.6-2
- Rebuild for boost 1.54.0

* Thu Jun 13 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.6-1
- Update to latest stable release.

* Sat May 25 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.5-1
- Update to latest stable release.
- Add new executables that version 1.0.5 provides.

* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.0.4-3
- Rebuild for Boost-1.53.0

* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.0.4-2
- Rebuild for Boost-1.53.0

* Fri Feb 08 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.4-1
- Update to latest stable release.
- Update dependencies to new minimum requirements.

* Wed Jan 02 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.3-4
- Use cmake28 in RHEL packages.

* Wed Jan 02 2013 Dan Horák <dan[at]danny.cz> - 1.0.3-3
- Exclude s390, something doesn't like size_t being unsigned long

* Tue Jan 01 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.3-2
- Add u64_s64.patch.
- Fix bogus dates in changelog.
- Add new executables and man pages to files list.

* Tue Jan 01 2013 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.3-1
- Update to version 1.0.3.
- Remove now-unnecessary packages.

* Wed Sep 26 2012 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.1-5
- Simplify LICENSE.txt installation.
- Install doxygen documentation.

* Sun Sep 16 2012 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.1-4
- Distribute LICENSE.txt.

* Sun Jul 29 2012 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.1-3
- Fix group names for packages.
- Comment patches more verbosely.
- Rename exectuables to mlpack_* to avoid possible naming conflicts.

* Sat Jul 21 2012 Sterling Lewis Peet <sterling.peet@gatech.edu> - 1.0.1-2
- Include GetKernelMatrix patch so that mlpack builds using fedora flags.

* Thu Mar 08 2012 Ryan Curtin <gth671b@mail.gatech.edu> - 1.0.1-1
- Initial packaging of mlpack.