68bb783
%define releasedate 20080605
68bb783
%define major 2
68bb783
%define minor 1
68bb783
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
68bb783
%define sourcefilename %{sourcebasename}_src.tgz
a645b4b
a645b4b
Summary: The Threading Building Blocks library abstracts low-level threading details
a645b4b
Name: tbb
68bb783
Version: %{major}.%{minor}
68bb783
Release: 1.%{releasedate}%{?dist}
a645b4b
License: GPLv2 with exceptions
a645b4b
Group: Development/Tools
a645b4b
URL: http://threadingbuildingblocks.org/
a645b4b
Source: http://threadingbuildingblocks.org/uploads/77/84/2.0/%{sourcefilename}
68bb783
# RPM can't handle spaces in specs, so rename official files.  Get rid
68bb783
# of "(Open Source)" suffix while at it.
68bb783
#  http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Getting Started (Open Source).pdf
68bb783
Source2: Getting_Started.pdf
68bb783
#  http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Reference Manual (Open Source).pdf
68bb783
Source3: Reference_Manual.pdf
68bb783
#  http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Tutorial (Open Source).pdf
68bb783
Source4: Tutorial.pdf
a645b4b
Patch1: tbb-2.0-20070927-cxxflags.patch
a645b4b
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a645b4b
BuildRequires: libstdc++-devel
a645b4b
# We need "arch" and "hostname" binaries:
a645b4b
BuildRequires: util-linux net-tools
a645b4b
ExclusiveArch: %{ix86} x86_64 ia64
a645b4b
a645b4b
%description
a645b4b
Threading Building Blocks (TBB) is a C++ runtime library that
a645b4b
abstracts the low-level threading details necessary for optimal
a645b4b
multi-core performance.  It uses common C++ templates and coding style
a645b4b
to eliminate tedious threading implementation work.
a645b4b
a645b4b
TBB requires fewer lines of code to achieve parallelism than other
a645b4b
threading models.  The applications you write are portable across
a645b4b
platforms.  Since the library is also inherently scalable, no code
a645b4b
maintenance is required as more processor cores become available.
a645b4b
a645b4b
a645b4b
%package devel
a645b4b
Summary: The Threading Building Blocks C++ headers and shared development libraries
a645b4b
Group: Development/Libraries
a645b4b
Requires: tbb = %{version}-%{release}
a645b4b
a645b4b
%description devel
a645b4b
Header files and shared object symlinks for the Threading Building
a645b4b
Blocks (TBB) C++ libraries.
a645b4b
a645b4b
a645b4b
%package doc
a645b4b
Summary: The Threading Building Blocks documentation
a645b4b
Group: Documentation
a645b4b
a645b4b
%description doc
a645b4b
PDF documentation for the user of the Threading Building Block (TBB)
a645b4b
C++ library.
a645b4b
a645b4b
a645b4b
%prep
a645b4b
%setup -q -n %{sourcebasename}
a645b4b
%patch1 -p1
a645b4b
a645b4b
%build
68bb783
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
68bb783
68bb783
cp -p "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" .
a645b4b
a645b4b
%install
a645b4b
rm -rf $RPM_BUILD_ROOT
68bb783
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
68bb783
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
a645b4b
68bb783
pushd build/obj_release
a645b4b
    for file in libtbb{,malloc}; do
68bb783
        install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
68bb783
        ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so
a645b4b
    done
a645b4b
popd
a645b4b
a645b4b
pushd include
a645b4b
    find tbb -type f -name \*.h -exec \
a645b4b
        install -p -D -m 644 {} $RPM_BUILD_ROOT/%{_includedir}/{} \
a645b4b
    \;
a645b4b
popd
a645b4b
a645b4b
%post -p /sbin/ldconfig
a645b4b
a645b4b
%postun -p /sbin/ldconfig
a645b4b
a645b4b
%clean
a645b4b
rm -rf ${RPM_BUILD_ROOT}
a645b4b
a645b4b
%files
a645b4b
%defattr(-,root,root,-)
a645b4b
%doc COPYING
68bb783
%doc doc/Release_Notes.txt
a645b4b
%{_libdir}/*.so.2
a645b4b
a645b4b
%files devel
a645b4b
%defattr(-,root,root,-)
a645b4b
%{_includedir}/tbb
a645b4b
%{_libdir}/*.so
a645b4b
a645b4b
%files doc
a645b4b
%defattr(-,root,root,-)
68bb783
%doc Getting_Started.pdf
68bb783
%doc Reference_Manual.pdf
68bb783
%doc Tutorial.pdf
a645b4b
a645b4b
%changelog
68bb783
* Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605
68bb783
- New upstream 2.1
68bb783
  - Drop soname patch, parallel make patch, and GCC 4.3 patch
68bb783
a645b4b
* Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927
a645b4b
- Review fixes
a645b4b
  - Use updated URL
a645b4b
  - More timestamp preservation
a645b4b
- Initial import into Fedora CVS
a645b4b
a645b4b
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.0-3.20070927
a645b4b
- Review fixes
a645b4b
  - Preserve timestamp of installed files
a645b4b
  - Fix soname not to contain "debug"
a645b4b
a645b4b
* Tue Feb  5 2008 Petr Machata <pmachata@redhat.com> - 2.0-2.20070927
a645b4b
- Review fixes
a645b4b
  - GCC 4.3 patchset
a645b4b
  - Add BR util-linux net-tools
a645b4b
  - Add full URL to Source0
a645b4b
  - Build in debug mode to work around problems with GCC 4.3
a645b4b
a645b4b
* Mon Dec 17 2007 Petr Machata <pmachata@redhat.com> - 2.0-1.20070927
a645b4b
- Initial package.
a645b4b
- Using SONAME patch from Debian.