2009-09-16 13:20:34 +02:00
|
|
|
#
|
2013-02-21 22:24:06 +01:00
|
|
|
# spec file for package tbb
|
2009-09-16 13:20:34 +02:00
|
|
|
#
|
2016-05-04 12:55:21 +02:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-09-16 13:20:34 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
|
|
|
|
%define so_ver 2
|
2009-09-16 13:20:34 +02:00
|
|
|
Name: tbb
|
2016-06-08 13:21:21 +02:00
|
|
|
Version: 44_20160526
|
2013-02-21 22:24:06 +01:00
|
|
|
Release: 0
|
2009-09-16 13:20:34 +02:00
|
|
|
Summary: Threading Building Blocks (TBB)
|
2016-05-04 12:58:14 +02:00
|
|
|
License: SUSE-GPL-2.0-with-linking-exception
|
2016-05-04 14:34:10 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2016-05-04 12:58:14 +02:00
|
|
|
Url: https://www.threadingbuildingblocks.org/
|
2016-06-12 13:57:56 +02:00
|
|
|
#Source0: https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb%{version}oss_src.tgz
|
|
|
|
Source0: tbb%{version}oss_src.tgz
|
2013-02-21 22:24:06 +01:00
|
|
|
# PATCH-FIX-OPENSUSE optflags.patch -- Use rpm optflags
|
2016-05-04 13:17:07 +02:00
|
|
|
Patch1: optflags.patch
|
2013-02-21 22:24:06 +01:00
|
|
|
BuildRequires: gcc-c++
|
2016-06-08 13:21:21 +02:00
|
|
|
BuildRequires: python-devel
|
2016-06-10 10:19:13 +02:00
|
|
|
BuildRequires: swig >= 3.0.6
|
2009-09-16 13:20:34 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2013-02-21 22:24:06 +01:00
|
|
|
Threading Building Blocks (TBB) offers a rich and complete approach to
|
|
|
|
expressing parallelism in a C++ program. It is a library that helps you take
|
|
|
|
advantage of multi-core processor performance without having to be a threading
|
|
|
|
expert. Threading Building Blocks is not just a threads-replacement library. It
|
|
|
|
represents a higher-level, task-based parallelism that abstracts platform
|
|
|
|
details and threading mechanism for performance and scalability.
|
|
|
|
|
|
|
|
%package -n libtbb%{so_ver}
|
2009-09-16 13:20:34 +02:00
|
|
|
Summary: Threading Building Blocks (TBB)
|
2013-02-21 22:24:06 +01:00
|
|
|
Group: System/Libraries
|
2011-08-15 01:37:08 +02:00
|
|
|
Provides: %{name} = %{version}
|
2009-09-16 13:20:34 +02:00
|
|
|
Obsoletes: %{name} < %{version}
|
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%description -n libtbb%{so_ver}
|
|
|
|
Threading Building Blocks (TBB) offers a rich and complete approach to
|
|
|
|
expressing parallelism in a C++ program. It is a library that helps you take
|
|
|
|
advantage of multi-core processor performance without having to be a threading
|
|
|
|
expert. Threading Building Blocks is not just a threads-replacement library. It
|
|
|
|
represents a higher-level, task-based parallelism that abstracts platform
|
|
|
|
details and threading mechanism for performance and scalability.
|
2009-09-16 13:20:34 +02:00
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%package -n libtbbmalloc%{so_ver}
|
2009-09-16 13:20:34 +02:00
|
|
|
Summary: Threading Building Blocks (TBB)
|
2013-02-21 22:24:06 +01:00
|
|
|
Group: System/Libraries
|
2011-08-15 01:37:08 +02:00
|
|
|
Provides: %{name} = %{version}
|
2009-09-16 13:20:34 +02:00
|
|
|
Obsoletes: %{name} < %{version}
|
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%description -n libtbbmalloc%{so_ver}
|
2016-05-04 14:34:10 +02:00
|
|
|
This subpackage contains the two TBB memory allocator templates that
|
|
|
|
are similar to the STL template class std::allocator. These two
|
|
|
|
templates, scalable_allocator<T> and cache_aligned_allocator<T>,
|
|
|
|
address critical issues in parallel programming: scalability and
|
|
|
|
false sharing.
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
%package devel
|
2013-02-21 22:24:06 +01:00
|
|
|
Summary: Development Files for Threading Building Blocks (TBB)
|
2009-09-16 13:20:34 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: c++_compiler
|
2013-02-21 22:24:06 +01:00
|
|
|
Requires: libtbb%{so_ver} = %{version}
|
|
|
|
Requires: libtbbmalloc%{so_ver} = %{version}
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
%description devel
|
2013-02-21 22:24:06 +01:00
|
|
|
Threading Building Blocks (TBB) offers a rich and complete approach to
|
|
|
|
expressing parallelism in a C++ program. It is a library that helps you take
|
|
|
|
advantage of multi-core processor performance without having to be a threading
|
|
|
|
expert. Threading Building Blocks is not just a threads-replacement library. It
|
|
|
|
represents a higher-level, task-based parallelism that abstracts platform
|
|
|
|
details and threading mechanism for performance and scalability.
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
This package contains the header files needed for development with tbb.
|
|
|
|
|
|
|
|
%prep
|
2013-02-21 22:24:06 +01:00
|
|
|
%setup -q -n %{name}%{version}oss
|
2016-05-04 14:14:02 +02:00
|
|
|
%patch1 -p1
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
%build
|
2013-02-21 22:24:06 +01:00
|
|
|
make OPTFLAGS="%{optflags}" %{?_smp_mflags} tbb_build_prefix=obj
|
2009-09-16 13:20:34 +02:00
|
|
|
|
2016-06-08 13:21:21 +02:00
|
|
|
mkdir lib; pushd lib
|
|
|
|
ln -s ../build/obj_release/*.so* .
|
|
|
|
popd
|
|
|
|
|
|
|
|
export TBBROOT=$PWD
|
|
|
|
pushd python
|
|
|
|
make release
|
|
|
|
popd
|
|
|
|
|
2009-09-16 13:20:34 +02:00
|
|
|
%install
|
2013-02-21 22:24:06 +01:00
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
2016-06-08 13:21:21 +02:00
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
pushd include
|
|
|
|
find tbb -type f -name \*.h -exec \
|
|
|
|
install -Dpm 644 {} %{buildroot}%{_includedir}/{} \
|
|
|
|
\;
|
|
|
|
popd
|
2016-06-08 13:21:21 +02:00
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
pushd build/obj_release
|
|
|
|
for file in libtbb{,malloc{,_proxy}}; do
|
|
|
|
install -Dpm 0755 ${file}.so.%{so_ver} %{buildroot}%{_libdir}
|
|
|
|
ln -s $file.so.%{so_ver} %{buildroot}%{_libdir}/$file.so
|
|
|
|
done
|
2016-06-08 13:21:21 +02:00
|
|
|
popd
|
2016-05-04 13:17:07 +02:00
|
|
|
|
2016-06-08 13:21:21 +02:00
|
|
|
pushd python
|
|
|
|
mkdir -p %{buildroot}%{python_sitelib}
|
|
|
|
install -m 0644 TBB.py %{buildroot}%{python_sitelib}
|
|
|
|
install -m 0755 _TBB.so %{buildroot}%{python_sitelib}
|
2009-09-16 13:20:34 +02:00
|
|
|
popd
|
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%post -n libtbb%{so_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n libtbb%{so_ver} -p /sbin/ldconfig
|
|
|
|
%post -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
|
2009-09-16 13:20:34 +02:00
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%files -n libtbb%{so_ver}
|
2016-05-04 14:34:10 +02:00
|
|
|
%defattr(-,root,root)
|
2013-02-21 22:24:06 +01:00
|
|
|
%{_libdir}/libtbb.so.%{so_ver}*
|
2016-06-08 13:21:21 +02:00
|
|
|
%{python_sitelib}/*
|
2009-09-16 13:20:34 +02:00
|
|
|
|
2013-02-21 22:24:06 +01:00
|
|
|
%files -n libtbbmalloc%{so_ver}
|
2016-05-04 14:34:10 +02:00
|
|
|
%defattr(-,root,root)
|
2013-02-21 22:24:06 +01:00
|
|
|
%{_libdir}/libtbbmalloc.so.%{so_ver}*
|
|
|
|
%{_libdir}/libtbbmalloc_proxy.so.%{so_ver}*
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
%files devel
|
2016-05-04 14:34:10 +02:00
|
|
|
%defattr(-,root,root)
|
2013-02-21 22:24:06 +01:00
|
|
|
%doc CHANGES COPYING index.html
|
|
|
|
%doc doc/Release_Notes.txt doc/html/
|
|
|
|
%{_includedir}/tbb/
|
2009-09-16 13:20:34 +02:00
|
|
|
%{_libdir}/libtbb.so
|
|
|
|
%{_libdir}/libtbbmalloc.so
|
2013-02-21 22:24:06 +01:00
|
|
|
%{_libdir}/libtbbmalloc_proxy.so
|
2009-09-16 13:20:34 +02:00
|
|
|
|
|
|
|
%changelog
|