[shogun] updated to new snapshot git20141223.c32937574df1c560ce7c10f1b8860679ce011a8b added BR: ocl-icd-devel
by Björn 'besser82' Esser
commit 21b0f5d7c86778980cc21467130414336fd4928f
Author: Björn Esser <bjoern.esser(a)gmail.com>
Date: Tue Dec 23 09:26:05 2014 +0100
updated to new snapshot git20141223.c32937574df1c560ce7c10f1b8860679ce011a8b
added BR: ocl-icd-devel, opencl-headers
enabled OpenCV-features and R-shogun
purged light-scrubber.sh from repo, now shipped with tarball
updated documentation-files
build mono-shogun on %%{mono_arches}, only
install documentation-files to %%{_pkgdocdir}
light-scrubber.sh | 69 ----------
shogun.spec | 355 +++++++++++++++++++++++++++++++++++------------------
sources | 2 +-
3 files changed, 236 insertions(+), 190 deletions(-)
---
diff --git a/shogun.spec b/shogun.spec
index 3a92cce..3fbf4e6 100644
--- a/shogun.spec
+++ b/shogun.spec
@@ -2,8 +2,8 @@
#%%global rel_build 1
# Settings used for build from snapshots.
-%{!?rel_build:%global commit 705b7dea7093cb094fe90fcebac20b7e7d1debcd}
-%{!?rel_build:%global commit_date 20140901}
+%{!?rel_build:%global commit c32937574df1c560ce7c10f1b8860679ce011a8b}
+%{!?rel_build:%global commit_date 20141223}
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
%{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}}
%{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}}
@@ -15,15 +15,24 @@
# Filter all provides from bindings and private libs.
%global __provides_exclude_from ^(%{_libdir}/.*/.*%{name}\\.so|%{_libdir}/libmod%{name}.so)
+# Turn off the brp-python-bytecompile script. We don't want stuff in %%{_pkgdocdir} to be byte-compiled.
+%global __os_install_post %(echo '%{__os_install_post}' | %{__sed} -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
+
+# Setup _pkgdocdir if not defined already.
+%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
+# CMake-builds go out-of-tree. Tests are not run in %%{buildroot}.
+%global _cmake_build_subdir build-%{?_arch}%{?dist}
+%global _cmake_testinstall_dir install-%{?_arch}%{?dist}
+
# There's no Python3 on older distributions.
-%if (0%{?fedora} && 0%{?fedora} <= 12) || (0%{?rhel} && 0%{?rhel} <= 6)
+%if (0%{?fedora} && 0%{?fedora} <= 12) || (0%{?rhel} && 0%{?rhel} <= 7)
%global without_python3 1
%endif
# Some bindings are globally disabled by default, because they either FTBFS
# or testsuite fails for them. We disable them here until they will build.
%global without_perl 1 # not fully implemented by upstream,yet.
-%global without_r 1 # Testsuite chokes, build broken for R >= 3.0.0.
# Mono-bindings are currently segfaulting during testsuite on arm.
# See rhbz# 1043941: https://bugzilla.redhat.com/show_bug.cgi?id=1043941
@@ -31,7 +40,12 @@
# Temporarily disabling the build of mono-shogun for all arm-arches.
%ifarch %{arm}
%global without_mono 1
-%endif
+%endif # ifarch %%{arm}
+
+# Some arches do not support Mono.
+%ifnarch %{mono_arches}
+%global without_mono 1
+%endif # ifnarch %%{mono_arches}
# Some switches to control build of SWIGed-bindings and testsuite. You still
# can pass overriding defines `-D 'with_XXX 1'` or `-D 'without_XXX 1'` to
@@ -80,7 +94,7 @@ of it's 'no-redistribute', 'no-commercial-use' license.
Name: shogun
Version: %{branch}.0.1
-Release: 0.29%{?gitrel}%{?dist}
+Release: 0.30%{?gitrel}%{?dist}
Summary: Large Scale Machine Learning Toolbox
# ===== License-breakdown =====
@@ -143,7 +157,6 @@ URL: http://%{name}-toolbox.org
%{?rel_build:Source0: %{url}/archives/%{name}/releases/%{branch}/sources/%{name}-%{version}.tar.bz2}
# Sources for snapshot-builds.
%{!?rel_build:Source0: https://github.com/%{name}-toolbox/%{name}/archive/%{commit}.tar.gz#/%{gi...
-Source98: light-scrubber.sh
Source99: http://googlemock.googlecode.com/files/gmock-1.7.0.zip
BuildRequires: arpack-devel
@@ -163,6 +176,8 @@ BuildRequires: libxml2-devel
BuildRequires: lpsolve-devel
BuildRequires: lzo-devel
BuildRequires: NLopt-devel
+BuildRequires: ocl-icd-devel
+BuildRequires: opencl-headers
BuildRequires: opencv-devel
BuildRequires: protobuf-devel
BuildRequires: qd-devel
@@ -216,7 +231,9 @@ SHOGUN is implemented in C++ and offers interfaces for:
%postun -p /sbin/ldconfig
%files
-%doc README.md doc/md/LICENSE*
+%doc %dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/COPYING
+%doc %{_pkgdocdir}/README.md
%{_libdir}/lib%{name}.so.*
###############################################################################
@@ -226,7 +243,7 @@ SHOGUN is implemented in C++ and offers interfaces for:
Summary: CLI-interface for %{name}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description cli
%{?common_description}
@@ -234,6 +251,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the CLI-interface for %{name}.
%files cli
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/cmdline_static
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/README.txt
%{_bindir}/%{name}
%endif #0%{?with_cli}
@@ -265,7 +287,7 @@ Requires: snappy-devel%{?_isa}
Requires: tapkee-devel
Requires: xz-devel%{?_isa}
Requires: zlib-devel%{?_isa}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description devel
%{?common_description}
@@ -273,7 +295,18 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains files needed for development with %{name}.
%files devel
-%doc doc/md/README_developer.md doc/md/README_soname.md
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/ChangeLog
+%doc %{_pkgdocdir}/COPYING
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/libshogun
+%doc %{_pkgdocdir}/examples/README.txt
+%doc %{_pkgdocdir}/NEWS
+%doc %{_pkgdocdir}/OpenCV_docs
+%doc %{_pkgdocdir}/README.md
+%doc %{_pkgdocdir}/test.%{?_arch}%{?dist}.log
+%{?with_python3:%doc %{_pkgdocdir}/test.py3.%{?_arch}%{?dist}.log}
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
@@ -288,10 +321,8 @@ Summary: Documentation files for %{name}
%{!?el5:BuildArch: noarch}
BuildRequires: doxygen
-BuildRequires: fdupes
BuildRequires: graphviz
-
-Requires: %{name}-data = %{_shogun_data_version}
+BuildRequires: hardlink
%description doc
%{?common_description}
@@ -299,9 +330,33 @@ Requires: %{name}-data = %{_shogun_data_version}
This package contains the ChangeLog, a very detailed documentation,
and some great examples for %{name}.
+If you need the Chinese API-docs, you would want to install
+%{name}-doc-cn, too.
+
%files doc
-%doc ChangeLog NEWS README* applications build/unittest*.log build/doc/html*
-%doc doc/examples doc/images doc/ipython-notebooks doc/md
+%doc %dir %{_pkgdocdir}
+%doc %exclude %{_pkgdocdir}/html_cn
+%doc %exclude %{_pkgdocdir}/test*.%{?_arch}%{?dist}.log
+%doc %{_pkgdocdir}/*
+
+###############################################################################
+
+%package doc-cn
+
+Summary: Documentation files for %{name} in Chinese language
+Requires: %{name}-doc == %{version}-%{release}
+
+%{!?el5:BuildArch: noarch}
+
+%description doc-cn
+%{?common_description}
+
+This package contains the documentation files for %{name} in Chinese
+language.
+
+%files doc-cn
+%doc %dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/html_cn
###############################################################################
@@ -320,7 +375,7 @@ Requires: java
Requires: jblas%{?_isa}
Requires: jpackage-utils
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n java-%{name}
%{?common_description}
@@ -328,6 +383,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Java-plugin for %{name}.
%files -n java-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/java_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{_jnidir}/*
%{_libdir}/%{name}.java
%endif #0%{?with_java}
@@ -347,12 +407,12 @@ BuildRequires: lua-devel
Requires: lua%{?_isa}
%if 0%{?fedora} || 0%{?rhel} >= 7
-Requires: lua(abi) = %{lua_ver}
+Requires: lua(abi) == %{lua_ver}
%else
Requires: lua >= %{lua_ver}
Requires: lua < %{luanext}
%endif
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n lua-%{name}
%{?common_description}
@@ -360,6 +420,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the LUA-plugin for %{name}.
%files -n lua-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/lua_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{lualibdir}/libmod%{name}.so
%endif #0%{?with_lua}
@@ -372,7 +437,7 @@ Summary: Mono(C#)-plugin for %{name}
BuildRequires: mono-devel
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n mono-%{name}
%{?common_description}
@@ -380,6 +445,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Mono(C#)-plugin for %{name}.
%files -n mono-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/csharp_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{_libdir}/%{name}.mono
%endif #ifarch %%{mono_arches}
%endif #0%{?with_mono}
@@ -397,8 +467,8 @@ Summary: Octave-plugin for %{name}
BuildRequires: octave-devel
Requires: octave%{?_isa} >= 3.6
-Requires: octave(api) = %{octave_api}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: octave(api) == %{octave_api}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n octave-%{name}
%{?common_description}
@@ -406,6 +476,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Octave-plugin for %{name}.
%files -n octave-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/matlab_and_octave
+%doc %{_pkgdocdir}/examples/octave_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{octave_octdir}/%{name}
%endif #0%{?with_octave}
@@ -427,6 +503,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Perl-plugin for %{name}.
%files -n perl-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/perl_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto
%endif #0%{?with_perl}
@@ -462,7 +543,7 @@ Requires: python27-numpy%{?_isa}
Requires: python27-scipy%{?_isa}
%endif
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n python-%{name}
@@ -471,6 +552,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Python-plugin for %{name}.
%files -n python-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/python_modular
+%doc %{_pkgdocdir}/examples/README.txt
+%doc %{_pkgdocdir}/ipython-notebooks
%{python2_sitearch}/*
%endif #0%{?with_python}
@@ -489,7 +576,7 @@ BuildRequires: python3-scipy
Requires: python3%{?_isa}
Requires: python3-numpy%{?_isa}
Requires: python3-scipy%{?_isa}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n python3-%{name}
%{?common_description}
@@ -497,6 +584,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Python3-plugin for %{name}.
%files -n python3-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/python_modular
+%doc %{_pkgdocdir}/examples/README.txt
+%doc %{_pkgdocdir}/ipython-notebooks
%{python3_sitearch}/*
%endif #0%{?with_python3}
@@ -509,7 +602,7 @@ Summary: R-plugin for %{name}
BuildRequires: R-core-devel
Requires: R-core%{?_isa}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n R-%{name}
%{?common_description}
@@ -518,8 +611,13 @@ This package contains the R-plugin for %{name}.
%files -n R-%{name}
%dir %{_libdir}/R/library/%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
%doc %{_libdir}/R/library/%{name}/DESCRIPTION
%doc %{_libdir}/R/library/%{name}/demo
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/r_modular
+%doc %{_pkgdocdir}/examples/README.txt
%{_libdir}/R/library/%{name}/libs
%{_libdir}/R/library/%{name}/Meta
%{_libdir}/R/library/%{name}/NAMESPACE
@@ -535,7 +633,7 @@ This package contains the R-plugin for %{name}.
%{!?ruby_vendorarchdir: %global ruby_vendorarchdir %(ruby -rrbconfig -e "puts RbConfig::CONFIG['sitearchdir']")}
# We need to pass the path for rubygem(narray) to CMake, so it can find it.
-%global narray_gem %(gem list narray | grep narray | sed -e's! .!-!' -e 's!.$!!')
+%global narray_gem %(gem list narray | %{__grep} narray | %{__sed} -e's! .!-!' -e 's!.$!!')
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
%global narray_include %{_libdir}/gems/ruby/%{narray_gem}
@@ -557,10 +655,10 @@ BuildRequires: rubygem-narray-devel
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
Requires: ruby(release)
%else
-Requires: ruby(abi) = %{?rhel:1.8}%{!?rhel:1.9.1}
+Requires: ruby(abi) == %{?rhel:1.8}%{!?rhel:1.9.1}
%endif
Requires: rubygem(narray)%{?_isa}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n ruby-%{name}
%{?common_description}
@@ -568,6 +666,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the Ruby-plugin for %{name}.
%files -n ruby-%{name}
+%doc %dir %{_pkgdocdir}
+%doc %dir %{_pkgdocdir}/examples
+%doc %{_pkgdocdir}/examples/data
+%doc %{_pkgdocdir}/examples/README.txt
+%doc %{_pkgdocdir}/examples/ruby_modular
%{ruby_vendorarchdir}/mod%{name}.so
%endif #0%{?with_ruby}
@@ -577,89 +680,80 @@ This package contains the Ruby-plugin for %{name}.
%setup -q%{!?rel_build:n %{name}-%{commit}}
# Scrub SVMlight.
-install -pm0755 %{SOURCE98} ./scripts/
./scripts/light-scrubber.sh
# Remove cluttering stuff and create some needed dirs.
-rm -rf %{py3dir} build data doc/tutorial third_party
-mkdir -p build third_party/GoogleMock
+%{__rm} -rf %{py3dir} %{_cmake_build_subdir} build data doc/tutorial third_party
+%{__mkdir} -p %{_cmake_build_subdir} third_party/GoogleMock
# Unbundle Tapkee. This is pretty the same as we have in our repos.
-rm -rf doc/md/LICENSE_tapkee.md
+%{__rm} -rf doc/md/LICENSE_tapkee.md
pushd src/shogun/lib/tapkee
for _needed_sources in tapkee_shogun.*
do
- sed -e 's!<shogun/lib/!<!g' \
+ %{__sed} -e 's!<shogun/lib/!<!g' \
-e 's!tapkee/tapkee_shogun.hpp>$!shogun/lib/&!g' \
< ${_needed_sources} > ${_needed_sources}.mod && \
touch -r ${_needed_sources} ${_needed_sources}.mod
done
-rm -rf */ *.{cpp,h,hpp}
+%{__rm} -rf */ *.{cpp,h,hpp}
for _needed_sources in tapkee_shogun.*
do
- mv ${_needed_sources} `echo ${_needed_sources} | sed -e 's!\.mod$!!g'`
+ %{__mv} ${_needed_sources} `echo ${_needed_sources} | %{__sed} -e 's!\.mod$!!g'`
done
popd
-# Disable unwanted / overriding compiler-flags in release-mode, which would
-# set such stuff like "-march=native" or "-O3 -g0".
-sed -i -e 's!^[ \t]*[sS][eE][tT].*.*_FLAGS_RELEASE!#&!g' \
- -e 's!^[ \t]*[sS][eE][tT].*-march=native!#&!g' \
- CMakeLists.txt
-
# Fix testsuite invocation for C#/Mono plugin.
-sed -i -e 's!\${CSHARP_INTERPRETER}!%(which mono)!g' \
+%{__sed} -i -e 's!\${CSHARP_INTERPRETER}!%(which mono)!g' \
examples/undocumented/csharp_modular/CMakeLists.txt
# Fix finding PerlLibs and linking against HDF5.
-sed -i -e 's!FindPerlLibs REQUIRED!PerlLibs REQUIRED!' \
+%{__sed} -i -e 's!FindPerlLibs REQUIRED!PerlLibs REQUIRED!' \
-e '/SET.HDF5_LIBRARIES/d' \
CMakeLists.txt
-# Fix install path for R-plugins.
-sed -i -e "s~\${R_COMPONENT_LIB_PATH}/shogun/Meta~`pwd`/test_install/&~g" \
- -e "s~\.r-install.sh ~&`pwd`/test_install/~g" \
- src/interfaces/r_modular/CMakeLists.txt
-
# Fix testsuite environment for R.
-sed -i -e "s~^ENDFOREACH~\tset_property\\(TEST r_modular-\${EXAMPLE_NAME} PROPERTY\n\t\t\t\tENVIRONMENT \\\"R_LIBS_USER=\\\\\\\"`pwd`/test_install%{_libdir}/R/library\\\\\\\"\\\"\\)\n&~" \
+%{__sed} -i -e "s~^ENDFOREACH~\tset_property\\(TEST r_modular-\${EXAMPLE_NAME} PROPERTY\n\t\t\t\tENVIRONMENT \\\"R_LIBS_USER=\\\\\\\"`pwd`/%{_cmake_testinstall_dir}%{_libdir}/R/library\\\\\\\"\\\"\\)\n&~" \
examples/undocumented/r_modular/CMakeLists.txt
# Ruby-plugins go to %%{ruby_vendorarchdir}, but on <= el6.
%if 0%{?fedora} || 0%{?rhel} >= 7
-sed -i -e 's!\${RUBY_SITE_ARCH_DIR}!\${RUBY_VENDORARCH_DIR}!g' \
+%{__sed} -i -e 's!\${RUBY_SITE_ARCH_DIR}!\${RUBY_VENDORARCH_DIR}!g' \
src/interfaces/ruby_modular/CMakeLists.txt
%endif
# Fix testsuite environment for Ruby.
-sed -i -e "s!\${NARRAY_PATH}!%{narray_include}:&!" \
+%{__sed} -i -e "s!\${NARRAY_PATH}!%{narray_include}:&!" \
examples/undocumented/ruby_modular/CMakeLists.txt
# Patch the Ruby-files to `require 'rubygems'` asap.
for _file in `find . -depth -type f -name '*.rb'`
do
- sed -i.orig -e "0,/^require/s//require \'rubygems\'\n&/" ${_file} && \
+ %{__sed} -i.orig -e "0,/^require/s//require \'rubygems\'\n&/" ${_file} && \
touch -r ${_file}.orig ${_file} && \
- rm -rf ${_file}.orig
+ %{__rm} -rf ${_file}.orig
done
# This is needed for testsuite not to fail on some tests.
echo "# noop" > examples/undocumented/python_modular/tools/__init__.py
# Copy the other sources into tree.
-install -pm 0644 %{SOURCE99} third_party/GoogleMock
-
-# Copy data into proper location.
-cp -a %{_shogun_data_dir} data
+%{__install} -pm 0644 %{SOURCE99} third_party/GoogleMock
+%if 0%{?with_python3}
# Copy all stuff into %%{py3dir} for the Python3-build.
-cp -a . %{py3dir}
+%{__cp} -a . %{py3dir}
+ln -fs $(pwd)/data %{py3dir}/data
# Patch doxy2swig to open files with utf-8 encoding on Python3.
-sed -i -e's!return open.source.!return open\(source, encoding="utf-8"\)!' \
+%{__sed} -i -e's!return open.source.!return open\(source, encoding="utf-8"\)!' \
%{py3dir}/src/.doxy2swig.py
+%endif # 0%{?with_python3}
+
+# Copy data into proper location.
+%{__cp} -a %{_shogun_data_dir} data
###############################################################################
@@ -672,13 +766,13 @@ export LANG="us_US.UTF-8"
# because CMake hardcodes them when creating the Makefiles and it's cache.
# We need to export a customized PYTHONPATH.
-export PYTHONPATH="`pwd`/test_install/%{python2_sitearch}/%{name}"
-export PYTHONPATH="${PYTHONPATH}:`pwd`/test_install/%{python2_sitearch}"
+export PYTHONPATH="`pwd`/%{_cmake_testinstall_dir}/%{python2_sitearch}/%{name}"
+export PYTHONPATH="${PYTHONPATH}:`pwd`/%{_cmake_testinstall_dir}/%{python2_sitearch}"
export PYTHONPATH="${PYTHONPATH}:$(pwd)/examples/undocumented/python_modular"
export PYTHONPATH="${PYTHONPATH}:%{python2_sitearch}:%{python2_sitelib}"
# We need to export some custom LD_LIBRARY_PATH for the tests, too.
-export LD_LIBRARY_PATH="`pwd`/test_install/%{_libdir}"
+export LD_LIBRARY_PATH="`pwd`/%{_cmake_testinstall_dir}/%{_libdir}"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:%{_libdir}/atlas"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:%{_libdir}"
@@ -686,11 +780,11 @@ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:%{_libdir}"
%ifarch %{ix86}
export CFLAGS="%{optflags} -msse2"
export CXXFLAGS="${CFLAGS}"
-%endif #arch %{ix86}
+%endif # ifarch %%{ix86}
-pushd build
+pushd %{_cmake_build_subdir}
%cmake \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=DISTRIBUTION \
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-DATLAS_LAPACK=%{_libdir}/atlas/libtatlas.so \
-DATLAS_LIBRARIES=%{_libdir}/atlas/libtatlas.so \
@@ -712,6 +806,7 @@ pushd build
%{?with_perl: -DPerlModular=ON } \
%{?with_python: -DPythonModular=ON } \
%{?with_python: -DPYTHON_EXECUTABLE="%{__python2}" } \
+ -DOpenCV=ON \
%{?with_r: -DRModular=ON } \
%{?with_ruby: -DRubyModular=ON } \
..
@@ -723,20 +818,21 @@ pushd build
# these amounts of memory is not the build itself, but SWIG, which eats RAM
# like chocolate, when creating cpp-src.
ping -c1 mldata.org && \
-make %{?_smp_mflags} || make -j3
+%{__make} %{?_smp_mflags} || %{__make} -j3
popd
# Build the Python3-version.
%if 0%{?with_python3}
-export PYTHONPATH="`pwd`/test_install/%{python3_sitearch}/%{name}"
-export PYTHONPATH="${PYTHONPATH}:`pwd`/test_install/%{python3_sitearch}"
+export PYTHONPATH="`pwd`/%{_cmake_testinstall_dir}/%{python3_sitearch}/%{name}"
+export PYTHONPATH="${PYTHONPATH}:`pwd`/%{_cmake_testinstall_dir}/%{python3_sitearch}"
export PYTHONPATH="${PYTHONPATH}:$(pwd)/examples/undocumented/python_modular"
export PYTHONPATH="${PYTHONPATH}:%{python3_sitearch}:%{python3_sitelib}"
-pushd %{py3dir}/build
+pushd %{py3dir}/%{_cmake_build_subdir}
%cmake \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=DISTRIBUTION \
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
+ -DATLAS_LAPACK=%{_libdir}/atlas/libtatlas.so \
-DATLAS_LIBRARIES=%{_libdir}/atlas/libtatlas.so \
%endif
%{?with_tests: -DBUILD_DASHBOARD_REPORTS=ON } \
@@ -748,6 +844,7 @@ pushd %{py3dir}/build
-DUSE_SVMLIGHT=OFF \
-DPythonModular=ON \
-DPYTHON_EXECUTABLE=%{__python3} \
+ -DOpenCV=ON \
..
@@ -758,55 +855,50 @@ pushd %{py3dir}/build
# these amounts of memory is not the build itself, but SWIG, which eats RAM
# like chocolate, when creating cpp-src.
ping -c1 mldata.org && \
-make %{?_smp_mflags} || make -j3
+%{__make} %{?_smp_mflags} || %{__make} -j3
popd
%endif #0%{?with_python3}
# Building the autodocs.
-pushd build
-make doc
-%if 0%{?fedora} || 0%{?rhel} >= 7
-pushd doc
-%fdupes .
-popd
-%endif
+pushd %{_cmake_build_subdir}
+%{__make} doc
popd
###############################################################################
%install
-%{?el5:rm -rf %{buildroot}}
+%{?el5:%{__rm} -rf %{buildroot}}
# We install to custom location first. This will be needed by testsuite, too.
-export CUSTOM_INSTALL_DIR="`pwd`/test_install/"
+export CUSTOM_INSTALL_DIR="`pwd`/%{_cmake_testinstall_dir}/"
# Install the Python3-version first.
%if 0%{?with_python3}
-pushd %{py3dir}/build
-make install DESTDIR=${CUSTOM_INSTALL_DIR}
+pushd %{py3dir}/%{_cmake_build_subdir}
+%{__make} install DESTDIR=${CUSTOM_INSTALL_DIR} %{?_smp_mflags}
popd
# Remove the installed headers and libshogun.so
-rm -rf ${CUSTOM_INSTALL_DIR}%{_includedir} \
+%{__rm} -rf ${CUSTOM_INSTALL_DIR}%{_includedir} \
${CUSTOM_INSTALL_DIR}%{_libdir}/lib%{name}.so*
%endif #0%{?with_python3}
-pushd build
-make install DESTDIR=${CUSTOM_INSTALL_DIR}
+pushd %{_cmake_build_subdir}
+%{__make} install DESTDIR=${CUSTOM_INSTALL_DIR} %{?_smp_mflags}
popd
%if 0%{?with_java}
# Move Java-bindings to proper location.
-mkdir -p ${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.java \
+%{__mkdir} -p ${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.java \
${CUSTOM_INSTALL_DIR}%{_jnidir}
-mv ${CUSTOM_INSTALL_DIR}%{_prefix}/lib/jni/libmod%{name}.so \
+%{__mv} ${CUSTOM_INSTALL_DIR}%{_prefix}/lib/jni/libmod%{name}.so \
${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.java
-mv ${CUSTOM_INSTALL_DIR}%{_javadir}/*.jar ${CUSTOM_INSTALL_DIR}%{_jnidir}
+%{__mv} ${CUSTOM_INSTALL_DIR}%{_javadir}/*.jar ${CUSTOM_INSTALL_DIR}%{_jnidir}
%endif #0%{?with_java}
%if 0%{?with_mono}
# Move Mono(C#)-bindings to the proper location.
-mkdir -p ${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.mono
-mv ${CUSTOM_INSTALL_DIR}%{_prefix}/lib/cli/%{name}/*mod%{name}* \
+%{__mkdir} -p ${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.mono
+%{__mv} ${CUSTOM_INSTALL_DIR}%{_prefix}/lib/cli/%{name}/*mod%{name}* \
${CUSTOM_INSTALL_DIR}%{_libdir}/%{name}.mono
%endif #0%{?with_mono}
@@ -816,7 +908,7 @@ find ${CUSTOM_INSTALL_DIR} -depth -type f -name '*.so' -print0 | \
# Copy the custom installation to %%{buildroot} for having an installed
# version with rpaths preserved for the testsuite.
-cp -a ${CUSTOM_INSTALL_DIR}/. %{buildroot}
+%{__cp} -a ${CUSTOM_INSTALL_DIR}/. %{buildroot}
# Kill rpath from binaries.
find %{buildroot}%{_libdir} -depth -type f -perm 0755 -print0 | \
@@ -825,36 +917,50 @@ find %{buildroot}%{_bindir} -depth -type f -perm 0755 -print0 | \
xargs -0 chrpath -d -k
# Copy examples to keep them prestine. Testsuite will clutter them.
-cp -a examples doc
+%{__mkdir} -p doc/examples
+%{__cp} -a examples/documented/* doc/examples
+
+# Create a working symlink to sample-data.
+unlink doc/examples/data
+ln -fs %{_datadir}/%{name}/data/toy doc/examples/data
+
+# Remove unneeded examples.
+find doc/examples -maxdepth 1 -name '*static' -print0 | %{__grep} -zv 'cmd' | \
+ xargs -0 %{__rm} -rf
+
+# Install documentation-files to %%{_pkgdocdir}
+%{__mkdir} -p %{buildroot}%{_pkgdocdir}
+%{__cp} -a ChangeLog COPYING NEWS README* benchmarks doc/examples doc/images \
+ doc/ipython-notebooks doc/OpenCV_docs %{_cmake_build_subdir}/doc/html* \
+ %{buildroot}%{_pkgdocdir}
+
+# Add a README.txt for the examples.
+cat << EOF >> %{buildroot}%{_pkgdocdir}/examples/README.txt
+To run the examples, you will need to have the 'shogun-data'-package
+installed, too.
+EOF
+
+# Make sure all files in %%{_pkgdocdir} have mode 0644.
+find %{buildroot}%{_pkgdocdir} -depth -type f -print0 | xargs -0 chmod 0644
# Remove unneeded stuff, e.g. compiled examples in %%{buildroot}%%{_datadir},
# build-system files in examples and 0-size files in %%{buildroot}.
-rm -rf %{buildroot}%{_datadir}/%{name}/examples
-
-for _dir in '%{buildroot}' 'doc/examples'
-do
- find "${_dir}" -depth -type f -size 0 -print0 | xargs -0 rm -rf
+%{__rm} -rf %{buildroot}%{_datadir}/%{name}/examples
- for _del in 'CMake*' 'Makefile*' '*.log' '*.sh'
- do
- find "${_dir}" -depth -type f -name "${_del}" -print0 | xargs -0 rm -rf
- done
-done
+find %{buildroot} -depth -type f -size 0 -print0 | xargs -0 %{__rm} -rf
-for _del in '*.map' '*.md5'
+for _del in 'CMake*' 'Makefile*' '*.log' '*.map' '*.md5' '*.sh'
do
- find doc -depth -type f -name "${_del}" -print0 | xargs -0 rm -rf
+ find %{buildroot} -depth -type f -name "${_del}" -print0 | xargs -0 %{__rm} -rf
done
-# Add data to clean examples, because they need it to be run.
-for _dir in 'documented' 'undocumented'
-do
- unlink doc/examples/${_dir}/data
- ln -fs %{_datadir}/%{name}/data/toy doc/examples/${_dir}/data
-done
+# Hardlink API-docs.
+hardlink -v %{buildroot}%{_pkgdocdir}/html
+hardlink -v %{buildroot}%{_pkgdocdir}/html_cn
-# Make sure all files in examples have mode 0644.
-find doc/examples -depth -type f -print0 | xargs -0 chmod 0644
+# Manually byte-compile Python-stuff…
+%py_byte_compile %{__python2} %{buildroot}%{python2_sitearch}
+%{?with_python3:%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}}
###############################################################################
@@ -905,7 +1011,7 @@ find doc/examples -depth -type f -print0 | xargs -0 chmod 0644
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|unit-MMDKernelSelectionCombMaxL2"
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|unit-MMDKernelSelectionOpt"
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|unit-SparseMatrixOperator"
-%endif #0%{?__isa_bits} == 32
+%endif # 0%{?__isa_bits} == 32
%ifarch %{arm}
# * tests failing on %%{arm} arches because of misallignments or timeouts
@@ -913,7 +1019,7 @@ find doc/examples -depth -type f -print0 | xargs -0 chmod 0644
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|integration-python_modular-tester-transfer_multitask_leastsquares_regression"
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|integration-python_modular-tester-library_fisher2x3_modular"
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|java_modular-kernel_auc_modular"
-%endif #ifarch %{arm}
+%endif # ifarch %%{arm}
# SWIGed Python-bindings are currently segfaulting with SWIG >= 3.0.0
# Currently trying to resolve that upstream.
@@ -922,16 +1028,16 @@ find doc/examples -depth -type f -print0 | xargs -0 chmod 0644
%endif # 0%{?fedora} >= 21
# * tests needing internet-connectivity
-#ping -c1 mldata.org || \
+#ping -c1 mldata.org || \
#EXCLUDE_FROM_TESTS="${EXCLUDE_FROM_TESTS}|.*mldata.*"
#export EXCLUDE_FROM_TESTS
-pushd build
+pushd %{_cmake_build_subdir}
# Unit && integration tests -- usual testsuite.
ctest \
--exclude-regex "${EXCLUDE_FROM_TESTS}" \
- --output-log unittest.log \
+ --output-log %{buildroot}%{_pkgdocdir}/test.%{?_arch}%{?dist}.log \
--output-on-failure || :
popd
@@ -943,11 +1049,11 @@ popd
#export EXCLUDE_FROM_TESTS
%endif #0%{?__isa_bits} == 32
-pushd %{py3dir}/build
+pushd %{py3dir}/%{_cmake_build_subdir}
# Unit && integration tests -- usual testsuite.
ctest \
--exclude-regex "${EXCLUDE_FROM_TESTS}" \
- --output-log unittest.py3.log \
+ --output-log %{buildroot}%{_pkgdocdir}/test.py3.%{?_arch}%{?dist}.log \
--output-on-failure || :
popd
%endif #0%{?with_python3}
@@ -956,11 +1062,20 @@ popd
###############################################################################
%{?el5:%clean}
-%{?el5:rm -rf %{buildroot}}
+%{?el5:%{__rm} -rf %{buildroot}}
###############################################################################
%changelog
+* Tue Dec 23 2014 Björn Esser <bjoern.esser(a)gmail.com> - 3.2.0.1-0.30.git20141223.c329375
+- updated to new snapshot git20141223.c32937574df1c560ce7c10f1b8860679ce011a8b
+- added BR: ocl-icd-devel, opencl-headers
+- enabled OpenCV-features and R-shogun
+- purged light-scrubber.sh from repo, now shipped with tarball
+- updated documentation-files
+- build mono-shogun on %%{mono_arches}, only
+- install documentation-files to %%{_pkgdocdir}
+
* Mon Sep 01 2014 Björn Esser <bjoern.esser(a)gmail.com> - 3.2.0.1-0.29.git20140901.705b7de
- updated to new snapshot git20140901.705b7dea7093cb094fe90fcebac20b7e7d1debcd
diff --git a/sources b/sources
index c741fa4..a1feacb 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-4fc43c920c1ec435f95d70781e644109 shogun-3.2.0.1-git20140901-705b7de.tar.gz
+224380c55b1e86aec88febe9164488f2 shogun-3.2.0.1-git20141223-c329375.tar.gz
073b984d8798ea1594f5e44d85b20d66 gmock-1.7.0.zip
8 years, 11 months