]>
Commit | Line | Data |
---|---|---|
f89f9a85 | 1 | %define major 4 |
8cb206e1 ER |
2 | %define minor 2 |
3 | %define micro 20130725 | |
546cff52 | 4 | %define sourcebasename tbb%{major}%{minor}_%{micro}oss |
4ebeb785 | 5 | Summary: The Threading Building Blocks library abstracts low-level threading details |
546cff52 | 6 | Summary(pl.UTF-8): Threading Building Blocks - biblioteka abstrahująca niskopoziomowe szczegóły obsługi wątków |
4ebeb785 | 7 | Name: tbb |
546cff52 JB |
8 | Version: %{major}.%{minor}.%{micro} |
9 | Release: 1 | |
10 | License: GPL v2 with runtime exception | |
4ebeb785 | 11 | Group: Development/Tools |
f89f9a85 | 12 | Source0: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/%{sourcebasename}_src.tgz |
8cb206e1 | 13 | # Source0-md5: 24342639e8b26771142061a9fedd1465 |
4ebeb785 ER |
14 | Source1: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Design_Patterns.pdf |
15 | # Source1-md5: 46062fef922d39abfd464bc06e02cdd8 | |
16 | Source2: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Getting_Started.pdf | |
17 | # Source2-md5: b8f94104c47f9667e537b98bd940494a | |
18 | Source3: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Reference.pdf | |
19 | # Source3-md5: 1481cbd378f4964691046d0ba570b374 | |
20 | Source4: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf | |
21 | # Source4-md5: 5bbdd1050c5dac5c1b782a6a98db0c46 | |
546cff52 | 22 | Source5: %{name}.pc.in |
f89f9a85 ER |
23 | Source6: %{name}malloc.pc.in |
24 | Source7: %{name}malloc_proxy.pc.in | |
4ebeb785 | 25 | Patch1: %{name}-cxxflags.patch |
eb5b42b5 | 26 | Patch2: mfence.patch |
546cff52 | 27 | URL: http://www.threadingbuildingblocks.org/ |
4ebeb785 | 28 | BuildRequires: libstdc++-devel |
8c6cde5d | 29 | BuildRequires: pkgconfig |
546cff52 | 30 | BuildRequires: sed >= 4.0 |
8c6cde5d | 31 | # We need "arch" binary: |
4ebeb785 | 32 | BuildRequires: util-linux |
eb5b42b5 | 33 | ExclusiveArch: %{ix86} %{x8664} %{arm} ia64 ppc ppc64 |
4ebeb785 ER |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
37 | Threading Building Blocks (TBB) is a C++ runtime library that | |
38 | abstracts the low-level threading details necessary for optimal | |
39 | multi-core performance. It uses common C++ templates and coding style | |
40 | to eliminate tedious threading implementation work. | |
41 | ||
42 | TBB requires fewer lines of code to achieve parallelism than other | |
43 | threading models. The applications you write are portable across | |
546cff52 JB |
44 | supported platforms. Since the library is also inherently scalable, no |
45 | code maintenance is required as more processor cores become available. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Threading Building Blocks (TBB) to biblioteka uruchomieniowa C++ | |
49 | abstrahująca niskopoziomowe szczegóły obsługi wątków potrzebne dla | |
50 | optymalnej wydajności na procesorach wielordzeniowych. Wykorzystuje | |
51 | szablony C++ w celu wyeliminowania nudnej pracy nad wielowątkowością. | |
52 | ||
53 | TBB wymaga mniej linii kodu do osiągnięcia równoległości niż inne | |
54 | modele wątkowania. Aplikacje są przenośne między obsługiwanymi | |
55 | platformami. Biblioteka jest skalowalna, więc nie jest wymagane | |
56 | modyfikowanie kodu wraz z dostępnością większej liczby rdzeni | |
57 | procesor. | |
4ebeb785 ER |
58 | |
59 | %package devel | |
546cff52 JB |
60 | Summary: The Threading Building Blocks C++ headers |
61 | Summary(pl.UTF-8): Pliki nagłówkowe C++ bibliotek Threading Building Blocks | |
4ebeb785 ER |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description devel | |
66 | Header files and shared object symlinks for the Threading Building | |
67 | Blocks (TBB) C++ libraries. | |
68 | ||
546cff52 JB |
69 | %description devel -l pl.UTF-8 |
70 | Pliki nagłówkowe i dowiązania symboliczne dla bibliotek C++ Threading | |
71 | Building Blocks. | |
72 | ||
4ebeb785 ER |
73 | %package doc |
74 | Summary: The Threading Building Blocks documentation | |
546cff52 | 75 | Summary(pl.UTF-8): Dokumentacja bibliotek Threading Building Blocks |
4ebeb785 ER |
76 | Group: Documentation |
77 | ||
78 | %description doc | |
79 | PDF documentation for the user of the Threading Building Block (TBB) | |
80 | C++ library. | |
81 | ||
546cff52 JB |
82 | %description doc -l pl.UTF-8 |
83 | Dokumentacja w formacie PDF dla użytkowników biblioteki C++ Threading | |
84 | Building Blocks (TBB). | |
85 | ||
4ebeb785 ER |
86 | %prep |
87 | %setup -q -n %{sourcebasename} | |
eb5b42b5 ER |
88 | %patch1 -p1 |
89 | %patch2 -p1 | |
4ebeb785 ER |
90 | |
91 | cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} . | |
92 | ||
f89f9a85 ER |
93 | cp -p %{SOURCE5} %{SOURCE6} %{SOURCE7} . |
94 | ||
546cff52 JB |
95 | sed -i -e 's/-march=pentium4//' build/linux.gcc.inc |
96 | ||
4ebeb785 ER |
97 | %build |
98 | %{__make} \ | |
546cff52 | 99 | CPLUS="%{__cxx}" \ |
4ebeb785 ER |
100 | CXXFLAGS="%{rpmcxxflags}" \ |
101 | tbb_build_prefix=obj | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
eb5b42b5 | 105 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_pkgconfigdir}} |
f89f9a85 | 106 | |
4ebeb785 | 107 | cd build/obj_release |
f89f9a85 | 108 | for file in tbb tbbmalloc tbbmalloc_proxy; do |
546cff52 JB |
109 | install lib${file}.so.2 $RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2.%{version} |
110 | ln -s lib${file}.so.2.%{version} $RPM_BUILD_ROOT%{_libdir}/lib${file}.so | |
111 | ln -s lib${file}.so.2.%{version} $RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2 | |
4ebeb785 ER |
112 | done |
113 | cd - | |
114 | ||
115 | cd include | |
116 | find tbb -type f -name '*.h' -exec \ | |
117 | install -p -D -m 644 {} $RPM_BUILD_ROOT%{_includedir}/{} ';' | |
f89f9a85 | 118 | cd - |
4ebeb785 | 119 | |
f89f9a85 ER |
120 | for pc in tbb.pc tbbmalloc.pc tbbmalloc_proxy.pc; do |
121 | in=$pc.in | |
122 | # fail if obsolete | |
123 | [ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc ] || exit 1 | |
124 | sed -e ' | |
125 | s,@prefix@,%{_prefix},; | |
126 | s,@libdir@,%{_libdir},; | |
127 | s,@includedir@,%{_includedir}/tbb,; | |
128 | s,@version@,%{version}, | |
129 | ' $in > $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc | |
130 | done | |
4ebeb785 ER |
131 | |
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
546cff52 JB |
135 | %post -p /sbin/ldconfig |
136 | %postun -p /sbin/ldconfig | |
137 | ||
4ebeb785 ER |
138 | %files |
139 | %defattr(644,root,root,755) | |
546cff52 | 140 | %doc CHANGES COPYING doc/Release_Notes.txt |
4ebeb785 ER |
141 | %attr(755,root,root) %{_libdir}/libtbb.so.*.*.* |
142 | %attr(755,root,root) %ghost %{_libdir}/libtbb.so.2 | |
143 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*.* | |
144 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2 | |
546cff52 JB |
145 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*.* |
146 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc_proxy.so.2 | |
4ebeb785 ER |
147 | |
148 | %files devel | |
149 | %defattr(644,root,root,755) | |
546cff52 JB |
150 | %attr(755,root,root) %{_libdir}/libtbb.so |
151 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so | |
152 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so | |
4ebeb785 | 153 | %{_includedir}/tbb |
546cff52 | 154 | %{_pkgconfigdir}/tbb.pc |
f89f9a85 ER |
155 | %{_pkgconfigdir}/tbbmalloc.pc |
156 | %{_pkgconfigdir}/tbbmalloc_proxy.pc | |
4ebeb785 ER |
157 | |
158 | %files doc | |
159 | %defattr(644,root,root,755) | |
160 | %doc *.pdf |