1 # NOTE: shared /%{_lib}/libtcmalloc* is useless without /usr/%{_lib}/libstdc++.so.6
3 # - subpackages for "minimal" and the rest?
6 %bcond_with minimal # build only build only tcmalloc-minimal
7 %bcond_without libunwind # libunwind for backtraces (esp. without frame info)
10 %define with_minimal 1
12 %ifnarch %{ix86} %{x8664} ia64
13 %undefine with_libunwind
16 Summary: Fast, multi-threaded malloc and performance analysis tools
17 Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc i narzędzia do analizy wydajności
23 # Source0Download: https://github.com/gperftools/gperftools/releases
24 Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
25 # Source0-md5: 2171cea3bbe053036fb5d5d25176a160
26 URL: https://github.com/gperftools/gperftools
27 BuildRequires: libstdc++-devel
28 %{?with_libunwind:BuildRequires: libunwind-devel >= 0.98.6}
29 Requires: libtcmalloc = %{version}-%{release}
30 Obsoletes: google-perftools < 2.0
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Perf Tools is a collection of performance analysis tools, including a
35 high-performance multi-threaded malloc() implementation that works
36 particularly well with threads and STL, a thread-friendly
37 heap-checker, a heap profiler, and a cpu-profiler.
39 %description -l pl.UTF-8
40 Perf Tools to zbiór narzędzi do analizy wydajności, zawierający także
41 bardzo wydajną, wielowątkową implementację malloc(), działającą dobrze
42 w szczególności z wątkami i STL-em, a także przyjazne wątkom narzędzie
43 do kontroli sterty, profilter sterty oraz profile wykorzystania CPU.
46 Summary: Development files of perftools libraries
47 Summary(pl.UTF-8): Pliki programistyczne bibliotek perftools
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: libtcmalloc-devel = %{version}-%{release}
51 Obsoletes: google-perftools-devel < 2.0
54 The google-perftools-devel package contains the header files needed to
55 develop applications with google-perftools libraries.
57 %description devel -l pl.UTF-8
58 Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji z
59 użyciem bibliotek google-perftools.
62 Summary: Static perftools libraries
63 Summary(pl.UTF-8): Statyczne biblioteki perftools
64 Group: Development/Libraries
65 Requires: %{name}-devel = %{version}-%{release}
66 Obsoletes: google-perftools-static < 2.0
69 The google-perftools-static package contains the static libraries of
72 %description static -l pl.UTF-8
73 Ten pakiet zawiera biblioteki statyczne google-perftools.
75 %package -n libtcmalloc
76 Summary: Fast, multi-threaded malloc by Google
77 Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc firmy Google
79 Conflicts: google-perftools < 1.8.3-3
81 %description -n libtcmalloc
82 Fast, multi-threaded malloc by Google.
84 %description -n libtcmalloc -l pl.UTF-8
85 Szybka, wielowątkowa implementacja malloc firmy Google.
87 %package -n libtcmalloc-devel
88 Summary: Fast, multi-threaded malloc by Google - header files
89 Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc firmy Google - pliki nagłówkowe
90 Group: Development/Libraries
91 Requires: libstdc++-devel
92 Requires: libtcmalloc = %{version}-%{release}
93 %{?with_libunwind:Requires: libunwind-devel >= 0.98.6}
95 %description -n libtcmalloc-devel
96 Fast, multi-threaded malloc by Google - header files.
98 %description -n libtcmalloc-devel -l pl.UTF-8
99 Szybka, wielowątkowa implementacja malloc firmy Google - pliki
102 %package -n libtcmalloc-static
103 Summary: Fast, multi-threaded malloc by Google - static libraries
104 Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc firmy Google - biblioteki statyczne
105 Group: Development/Libraries
106 Requires: libtcmalloc-devel = %{version}-%{release}
108 %description -n libtcmalloc-static
109 Fast, multi-threaded malloc by Google - static libraries.
111 %description -n libtcmalloc-static -l pl.UTF-8
112 Szybka, wielowątkowa implementacja malloc firmy Google - biblioteki
120 %{!?with_libunwind:--disable-libunwind} \
121 %{?with_minimal:--enable-minimal}
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT/%{_lib}
129 DESTDIR=$RPM_BUILD_ROOT
131 for pkg in %{!?with_minimal:libtcmalloc} libtcmalloc_minimal; do
132 %{__mv} $RPM_BUILD_ROOT%{_libdir}/${pkg}.so.* \
133 $RPM_BUILD_ROOT/%{_lib}
134 ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${pkg}.so.*.*.*) \
135 $RPM_BUILD_ROOT/%{_libdir}/${pkg}.so
139 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
142 rm -rf $RPM_BUILD_ROOT
144 %post -p /sbin/ldconfig
145 %postun -p /sbin/ldconfig
147 %post -n libtcmalloc -p /sbin/ldconfig
148 %postun -n libtcmalloc -p /sbin/ldconfig
151 %defattr(644,root,root,755)
152 # note: INSTALL contains many perftools-specific notes
153 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc/*{html,png,gif,txt}
154 %attr(755,root,root) %{_libdir}/libtcmalloc_minimal_debug.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libtcmalloc_minimal_debug.so.4
156 %if %{without minimal}
157 %attr(755,root,root) %{_bindir}/pprof
158 %attr(755,root,root) %{_libdir}/libprofiler.so.*.*.*
159 %attr(755,root,root) %ghost %{_libdir}/libprofiler.so.0
160 %attr(755,root,root) %{_libdir}/libtcmalloc_and_profiler.so.*.*.*
161 %attr(755,root,root) %ghost %{_libdir}/libtcmalloc_and_profiler.so.4
162 %attr(755,root,root) %{_libdir}/libtcmalloc_debug.so.*.*.*
163 %attr(755,root,root) %ghost %{_libdir}/libtcmalloc_debug.so.4
164 %{_mandir}/man1/pprof.1*
168 %defattr(644,root,root,755)
169 %attr(755,root,root) %{_libdir}/libtcmalloc_minimal_debug.so
170 %{_libdir}/libtcmalloc_minimal_debug.la
171 %{_pkgconfigdir}/libtcmalloc_minimal_debug.pc
172 %{_pkgconfigdir}/libprofiler.pc
173 %{_includedir}/google/profiler.h
174 %{_pkgconfigdir}/libtcmalloc_debug.pc
176 %if %{without minimal}
177 %attr(755,root,root) %{_libdir}/libtcmalloc_and_profiler.so
178 %attr(755,root,root) %{_libdir}/libtcmalloc_debug.so
179 %attr(755,root,root) %{_libdir}/libprofiler.so
180 %{_libdir}/libtcmalloc_and_profiler.la
181 %{_libdir}/libtcmalloc_debug.la
182 %{_libdir}/libprofiler.la
183 %{_includedir}/gperftools/profiler.h
187 %defattr(644,root,root,755)
188 %{_libdir}/libtcmalloc_minimal_debug.a
189 %if %{without minimal}
190 %{_libdir}/libprofiler.a
191 %{_libdir}/libtcmalloc_and_profiler.a
192 %{_libdir}/libtcmalloc_debug.a
195 %files -n libtcmalloc
196 %defattr(644,root,root,755)
197 %attr(755,root,root) /%{_lib}/libtcmalloc_minimal.so.*.*.*
198 %attr(755,root,root) %ghost /%{_lib}/libtcmalloc_minimal.so.4
199 %if %{without minimal}
200 %attr(755,root,root) /%{_lib}/libtcmalloc.so.*.*.*
201 %attr(755,root,root) %ghost /%{_lib}/libtcmalloc.so.4
204 %files -n libtcmalloc-devel
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_libdir}/libtcmalloc_minimal.so
207 %{_libdir}/libtcmalloc_minimal.la
208 %dir %{_includedir}/google
209 %{_includedir}/google/heap-*.h
210 %{_includedir}/google/malloc_extension*.h
211 %{_includedir}/google/malloc_hook*.h
212 %{_includedir}/google/stacktrace.h
213 %{_includedir}/google/tcmalloc.h
214 %dir %{_includedir}/gperftools
215 %{_includedir}/gperftools/malloc_extension*.h
216 %{_includedir}/gperftools/malloc_hook*.h
217 %{_includedir}/gperftools/tcmalloc.h
218 %{_pkgconfigdir}/libtcmalloc.pc
219 %{_pkgconfigdir}/libtcmalloc_minimal.pc
221 %if %{without minimal}
222 %attr(755,root,root) %{_libdir}/libtcmalloc.so
223 %{_libdir}/libtcmalloc.la
224 %{_includedir}/gperftools/heap-*.h
225 %{_includedir}/gperftools/stacktrace.h
228 %files -n libtcmalloc-static
229 %defattr(644,root,root,755)
230 %{_libdir}/libtcmalloc_minimal.a
231 %if %{without minimal}
232 %{_libdir}/libtcmalloc.a