%global major 4 %define libname %mklibname tcmalloc %major %define devname %mklibname -d tcmalloc # This package used to be called "google-perftools", but it was renamed on 2012-02-03. %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: gperftools Version: 2.5 Release: %mkrel 3 License: BSD Group: Development/Tools Summary: Very fast malloc and performance analysis tools URL: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz ExcludeArch: s390 s390x %ifnarch ppc %{power64} BuildRequires: libunwind-devel %endif Requires: gperftools-devel = %{version}-%{release} Requires: pprof = %{version}-%{release} Obsoletes: google-perftools < 2.5-2 %description Perf Tools is a collection of performance analysis tools, including a high-performance multi-threaded malloc() implementation that works particularly well with threads and STL, a thread-friendly heap-checker, a heap profiler, and a cpu-profiler. This is a metapackage which pulls in all of the gperftools (and pprof) binaries, libraries, and development headers, so that you can use them. %package -n %devname Summary: Development libraries and headers for gperftools Group: Development/C Requires: %{libname}%{?_isa} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: google-perftools-devel = %{version}-%{release} Obsoletes: google-perftools-devel < 2.5-2 Obsoletes: %{_lib}google-perftools-devel < 2.5-2 %description -n %devname Libraries and headers for developing applications that use gperftools. %package -n %libname Summary: Libraries provided by gperftools Obsoletes: %{_lib}google-perftools0 < 2.5-2 %description -n %libname Libraries provided by gperftools, including libtcmalloc and libprofiler. %package -n pprof Summary: CPU and Heap Profiler tool Requires: gv, graphviz BuildArch: noarch Provides: google-perftools = %{version}-%{release} Obsoletes: google-perftools < 2.5-2 %description -n pprof Pprof is a heap and CPU profiler tool, part of the gperftools suite. %prep %setup -q # Fix end-of-line encoding sed -i 's/\r//' README_windows.txt # No need to have exec permissions on source code chmod -x src/*.h src/*.cc %build CFLAGS=`echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -DTCMALLOC_LARGE_PAGES | sed -e 's|-fexceptions||g'` CXXFLAGS=`echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -DTCMALLOC_LARGE_PAGES | sed -e 's|-fexceptions||g'` %configure2_5x --disable-static # Bad rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # Can't build with smp_mflags make %install make DESTDIR=%{buildroot} docdir=%{_pkgdocdir}/ install find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' # Delete useless files rm -rf %{buildroot}%{_pkgdocdir}/INSTALL %check # http://code.google.com/p/google-perftools/issues/detail?id=153 %ifnarch ppc # Their test suite is almost always broken. # LD_LIBRARY_PATH=./.libs make check %endif %files -n pprof %{_bindir}/pprof %{_mandir}/man1/* %files -n %devname %{_pkgdocdir}/ %{_includedir}/google/ %{_includedir}/gperftools/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %files -n %libname %{_libdir}/libprofiler.so.* %{_libdir}/*.so.%{major} %{_libdir}/*.so.%{major}.* %changelog * Mon Mar 27 2017 akien <akien> 2.5-3.mga6 + Revision: 1094996 - Obsolete google-perftools for real * Tue Mar 14 2017 shlomif <shlomif> 2.5-2.mga6 + Revision: 1092569 - Obsolete google-perftools which was the old name of the pkg. * Thu Dec 22 2016 tv <tv> 2.5-1.mga6 + Revision: 1076424 - new release * Fri Apr 15 2016 tv <tv> 2.4.91-2.mga6 + Revision: 1001986 - provides gperftools-devel * Fri Apr 15 2016 tv <tv> 2.4.91-1.mga6 + Revision: 1001821 - imported package gperftools