Name: heaptrack Version: 1.0.0 Release: 1%{?dist} Summary: A heap memory profiler for Linux License: LGPLv2+ URL: https://github.com/KDE/heaptrack Source0: https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz # cfree() is not available in rawhide (upstreamed) Patch0: heaptrack-1.0.0-detect-cfree.patch # libunwind is not available on s390x ExcludeArch: s390x BuildRequires: libunwind-devel BuildRequires: elfutils-devel BuildRequires: boost-devel BuildRequires: zlib-devel BuildRequires: sparsehash-devel BuildRequires: kf5-rpm-macros BuildRequires: extra-cmake-modules BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(KF5CoreAddons) BuildRequires: cmake(KF5I18n) BuildRequires: cmake(KF5ItemModels) BuildRequires: cmake(KF5ThreadWeaver) BuildRequires: cmake(KF5ConfigWidgets) BuildRequires: cmake(KF5KIO) BuildRequires: cmake(KChart) # KChart dependency BuildRequires: cmake(Qt5Svg) BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %description Heaptrack traces all memory allocations and annotates these events with stack traces. Dedicated analysis tools then allow you to interpret the heap memory profile to: * Find hotspots that need to be optimized to reduce the memory footprint of your application * Find memory leaks, i.e. locations that allocate memory which is never deallocated * Find allocation hotspots, i.e. code locations that trigger a lot of memory allocation calls * Find temporary allocations, which are allocations that are directly followed by their deallocation %prep %autosetup -p1 %build mkdir %{_target_platform} pushd %{_target_platform} %cmake_kf5 \ %if "%{?_lib}" == "lib64" %{?_cmake_lib_suffix64} \ %endif .. popd make %{?_smp_mflags} -C %{_target_platform} %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} # Remove the header file, we don't need -devel for an application rm %{buildroot}/%{_includedir}/heaptrack_api.h %find_lang heaptrack --with-kde %check desktop-file-validate %{buildroot}/%{_kf5_datadir}/applications/org.kde.heaptrack.desktop appstream-util validate-relax --nonet %{buildroot}/%{_kf5_datadir}/appdata/org.kde.heaptrack.appdata.xml %files -f heaptrack.lang %license COPYING %doc README.md %{_kf5_bindir}/heaptrack %{_kf5_bindir}/heaptrack_gui %{_kf5_bindir}/heaptrack_print %dir %{_kf5_libdir}/heaptrack/ %{_kf5_libdir}/heaptrack/libexec/heaptrack_interpret %{_kf5_libdir}/heaptrack/libheaptrack_*.so %{_kf5_datadir}/applications/org.kde.heaptrack.desktop %{_kf5_datadir}/appdata/org.kde.heaptrack.appdata.xml %changelog * Tue Jun 27 2017 Daniel Vrátil - 1.0.0-1 - Initial version