]>
Commit | Line | Data |
---|---|---|
9c42e86e | 1 | # NOTE: shared /%{_lib}/libtcmalloc* is useless without /usr/%{_lib}/libstdc++.so.6 |
84e51d28 ER |
2 | # TODO: |
3 | # - subpackages for "minimal" and the rest? | |
4 | ||
5 | # Conditional build: | |
6 | %bcond_with minimal # build only build only tcmalloc-minimal | |
6641e78f | 7 | %bcond_without libunwind # libunwind for backtraces (esp. without frame info) |
84e51d28 ER |
8 | |
9 | %ifarch x32 | |
10 | %define with_minimal 1 | |
11 | %endif | |
7e67aa58 | 12 | %ifnarch %{ix86} %{x8664} x32 ia64 |
6641e78f JB |
13 | %undefine with_libunwind |
14 | %endif | |
84e51d28 | 15 | |
3ec036a2 | 16 | Summary: Fast, multi-threaded malloc and performance analysis tools |
9c42e86e | 17 | Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc i narzędzia do analizy wydajności |
717c9fde | 18 | Name: gperftools |
7e67aa58 | 19 | Version: 2.7 |
6641e78f | 20 | Release: 1 |
3ec036a2 ŁK |
21 | License: BSD |
22 | Group: Libraries | |
6641e78f JB |
23 | # Source0Download: https://github.com/gperftools/gperftools/releases |
24 | Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz | |
7e67aa58 | 25 | # Source0-md5: c6a852a817e9160c79bdb2d3101b4601 |
6641e78f | 26 | URL: https://github.com/gperftools/gperftools |
9c42e86e | 27 | BuildRequires: libstdc++-devel |
6641e78f | 28 | %{?with_libunwind:BuildRequires: libunwind-devel >= 0.98.6} |
9c42e86e | 29 | Requires: libtcmalloc = %{version}-%{release} |
717c9fde | 30 | Obsoletes: google-perftools < 2.0 |
3ec036a2 ŁK |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
7c48e001 ER |
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. | |
3ec036a2 | 38 | |
9c42e86e JB |
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. | |
44 | ||
3ec036a2 | 45 | %package devel |
9c42e86e JB |
46 | Summary: Development files of perftools libraries |
47 | Summary(pl.UTF-8): Pliki programistyczne bibliotek perftools | |
3ec036a2 ŁK |
48 | Group: Development/Libraries |
49 | Requires: %{name} = %{version}-%{release} | |
9c42e86e | 50 | Requires: libtcmalloc-devel = %{version}-%{release} |
717c9fde | 51 | Obsoletes: google-perftools-devel < 2.0 |
3ec036a2 ŁK |
52 | |
53 | %description devel | |
9c42e86e JB |
54 | The google-perftools-devel package contains the header files needed to |
55 | develop applications with google-perftools libraries. | |
56 | ||
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. | |
3ec036a2 ŁK |
60 | |
61 | %package static | |
9c42e86e JB |
62 | Summary: Static perftools libraries |
63 | Summary(pl.UTF-8): Statyczne biblioteki perftools | |
3ec036a2 ŁK |
64 | Group: Development/Libraries |
65 | Requires: %{name}-devel = %{version}-%{release} | |
717c9fde | 66 | Obsoletes: google-perftools-static < 2.0 |
3ec036a2 ŁK |
67 | |
68 | %description static | |
69 | The google-perftools-static package contains the static libraries of | |
70 | google-perftools. | |
71 | ||
9c42e86e JB |
72 | %description static -l pl.UTF-8 |
73 | Ten pakiet zawiera biblioteki statyczne google-perftools. | |
74 | ||
75 | %package -n libtcmalloc | |
76 | Summary: Fast, multi-threaded malloc by Google | |
77 | Summary(pl.UTF-8): Szybka, wielowątkowa implementacja malloc firmy Google | |
78 | Group: Libraries | |
79 | Conflicts: google-perftools < 1.8.3-3 | |
80 | ||
81 | %description -n libtcmalloc | |
82 | Fast, multi-threaded malloc by Google. | |
83 | ||
84 | %description -n libtcmalloc -l pl.UTF-8 | |
85 | Szybka, wielowątkowa implementacja malloc firmy Google. | |
86 | ||
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 | |
9c42e86e | 91 | Requires: libstdc++-devel |
c3be83d6 | 92 | Requires: libtcmalloc = %{version}-%{release} |
6641e78f | 93 | %{?with_libunwind:Requires: libunwind-devel >= 0.98.6} |
9c42e86e JB |
94 | |
95 | %description -n libtcmalloc-devel | |
96 | Fast, multi-threaded malloc by Google - header files. | |
97 | ||
98 | %description -n libtcmalloc-devel -l pl.UTF-8 | |
99 | Szybka, wielowątkowa implementacja malloc firmy Google - pliki | |
100 | nagłówkowe. | |
101 | ||
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} | |
107 | ||
108 | %description -n libtcmalloc-static | |
109 | Fast, multi-threaded malloc by Google - static libraries. | |
110 | ||
111 | %description -n libtcmalloc-static -l pl.UTF-8 | |
112 | Szybka, wielowątkowa implementacja malloc firmy Google - biblioteki | |
113 | statyczne. | |
114 | ||
3ec036a2 ŁK |
115 | %prep |
116 | %setup -q | |
117 | ||
118 | %build | |
9c42e86e | 119 | %configure \ |
6641e78f | 120 | %{!?with_libunwind:--disable-libunwind} \ |
84e51d28 | 121 | %{?with_minimal:--enable-minimal} |
9c42e86e | 122 | |
3ec036a2 ŁK |
123 | %{__make} |
124 | ||
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
9b04b22a | 127 | install -d $RPM_BUILD_ROOT/%{_lib} |
3ec036a2 ŁK |
128 | %{__make} install \ |
129 | DESTDIR=$RPM_BUILD_ROOT | |
130 | ||
84e51d28 | 131 | for pkg in %{!?with_minimal:libtcmalloc} libtcmalloc_minimal; do |
6641e78f | 132 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/${pkg}.so.* \ |
9b04b22a AM |
133 | $RPM_BUILD_ROOT/%{_lib} |
134 | ln -snf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${pkg}.so.*.*.*) \ | |
135 | $RPM_BUILD_ROOT/%{_libdir}/${pkg}.so | |
136 | done | |
137 | ||
3512a801 JB |
138 | # desired files packaged as %doc |
139 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
717c9fde | 140 | |
3ec036a2 ŁK |
141 | %clean |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
9c42e86e JB |
144 | %post -p /sbin/ldconfig |
145 | %postun -p /sbin/ldconfig | |
146 | ||
147 | %post -n libtcmalloc -p /sbin/ldconfig | |
148 | %postun -n libtcmalloc -p /sbin/ldconfig | |
3ec036a2 ŁK |
149 | |
150 | %files | |
151 | %defattr(644,root,root,755) | |
9c42e86e | 152 | # note: INSTALL contains many perftools-specific notes |
7e67aa58 | 153 | %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO docs/*.{html,css,png,gif,txt} |
84e51d28 ER |
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} | |
7c48e001 | 157 | %attr(755,root,root) %{_bindir}/pprof |
7c48e001 | 158 | %attr(755,root,root) %{_libdir}/libprofiler.so.*.*.* |
9c42e86e | 159 | %attr(755,root,root) %ghost %{_libdir}/libprofiler.so.0 |
7c48e001 | 160 | %attr(755,root,root) %{_libdir}/libtcmalloc_and_profiler.so.*.*.* |
c3be83d6 | 161 | %attr(755,root,root) %ghost %{_libdir}/libtcmalloc_and_profiler.so.4 |
7c48e001 | 162 | %attr(755,root,root) %{_libdir}/libtcmalloc_debug.so.*.*.* |
c3be83d6 | 163 | %attr(755,root,root) %ghost %{_libdir}/libtcmalloc_debug.so.4 |
7c48e001 | 164 | %{_mandir}/man1/pprof.1* |
84e51d28 | 165 | %endif |
3ec036a2 ŁK |
166 | |
167 | %files devel | |
168 | %defattr(644,root,root,755) | |
84e51d28 ER |
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 | |
175 | ||
176 | %if %{without minimal} | |
9c42e86e JB |
177 | %attr(755,root,root) %{_libdir}/libtcmalloc_and_profiler.so |
178 | %attr(755,root,root) %{_libdir}/libtcmalloc_debug.so | |
9c42e86e | 179 | %attr(755,root,root) %{_libdir}/libprofiler.so |
7c48e001 ER |
180 | %{_libdir}/libtcmalloc_and_profiler.la |
181 | %{_libdir}/libtcmalloc_debug.la | |
9c42e86e | 182 | %{_libdir}/libprofiler.la |
717c9fde | 183 | %{_includedir}/gperftools/profiler.h |
84e51d28 | 184 | %endif |
3ec036a2 ŁK |
185 | |
186 | %files static | |
187 | %defattr(644,root,root,755) | |
84e51d28 ER |
188 | %{_libdir}/libtcmalloc_minimal_debug.a |
189 | %if %{without minimal} | |
7c48e001 | 190 | %{_libdir}/libprofiler.a |
7c48e001 ER |
191 | %{_libdir}/libtcmalloc_and_profiler.a |
192 | %{_libdir}/libtcmalloc_debug.a | |
84e51d28 | 193 | %endif |
9c42e86e JB |
194 | |
195 | %files -n libtcmalloc | |
196 | %defattr(644,root,root,755) | |
9c42e86e | 197 | %attr(755,root,root) /%{_lib}/libtcmalloc_minimal.so.*.*.* |
c3be83d6 | 198 | %attr(755,root,root) %ghost /%{_lib}/libtcmalloc_minimal.so.4 |
84e51d28 ER |
199 | %if %{without minimal} |
200 | %attr(755,root,root) /%{_lib}/libtcmalloc.so.*.*.* | |
201 | %attr(755,root,root) %ghost /%{_lib}/libtcmalloc.so.4 | |
202 | %endif | |
9c42e86e JB |
203 | |
204 | %files -n libtcmalloc-devel | |
205 | %defattr(644,root,root,755) | |
9c42e86e | 206 | %attr(755,root,root) %{_libdir}/libtcmalloc_minimal.so |
9c42e86e JB |
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 | |
f3b8073f | 214 | %dir %{_includedir}/gperftools |
717c9fde MB |
215 | %{_includedir}/gperftools/malloc_extension*.h |
216 | %{_includedir}/gperftools/malloc_hook*.h | |
7e67aa58 | 217 | %{_includedir}/gperftools/nallocx.h |
717c9fde | 218 | %{_includedir}/gperftools/tcmalloc.h |
9c42e86e JB |
219 | %{_pkgconfigdir}/libtcmalloc.pc |
220 | %{_pkgconfigdir}/libtcmalloc_minimal.pc | |
221 | ||
84e51d28 ER |
222 | %if %{without minimal} |
223 | %attr(755,root,root) %{_libdir}/libtcmalloc.so | |
224 | %{_libdir}/libtcmalloc.la | |
84e51d28 ER |
225 | %{_includedir}/gperftools/heap-*.h |
226 | %{_includedir}/gperftools/stacktrace.h | |
227 | %endif | |
228 | ||
9c42e86e JB |
229 | %files -n libtcmalloc-static |
230 | %defattr(644,root,root,755) | |
9c42e86e | 231 | %{_libdir}/libtcmalloc_minimal.a |
84e51d28 ER |
232 | %if %{without minimal} |
233 | %{_libdir}/libtcmalloc.a | |
234 | %endif |