File heaptrack.spec of Package heaptrack

# spec file for package heaptrack
# Copyright (c) 2023 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# Needed for Leap, see boo#468748
%global __requires_exclude GLIBC_PRIVATE
%bcond_without released
Name:           heaptrack
Version:        1.5.0
Release:        0
Summary:        Heap Memory Allocation Profiler
License:        LGPL-2.1-or-later
%if %{with released}
Source2:        heaptrack.keyring
BuildRequires:  kf6-extra-cmake-modules
BuildRequires:  libboost_container-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_headers-devel
BuildRequires:  libboost_iostreams-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  libboost_system-devel
BuildRequires:  libdwarf-devel
BuildRequires:  libunwind-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
BuildRequires:  cmake(KChart6) >= 2.6.0
BuildRequires:  cmake(KF6ConfigWidgets)
BuildRequires:  cmake(KF6CoreAddons)
BuildRequires:  cmake(KF6I18n)
BuildRequires:  cmake(KF6IconThemes)
BuildRequires:  cmake(KF6ItemModels)
BuildRequires:  cmake(KF6KIO)
BuildRequires:  cmake(KF6ThreadWeaver)
BuildRequires:  cmake(Qt6Core) >= 6.5.0
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  pkgconfig(libdw)
BuildRequires:  pkgconfig(libzstd)
Suggests:       heaptrack-gui

A memory profiler for Linux, tracking heap allocations.

%package devel
Summary:        Development files for the Heaptrack API
Requires:       heaptrack = %{version}

%description devel
This package contains files needed to develop for the Heaptrack

%package gui
Summary:        GUI Frontend for Heaptrack
Requires:       heaptrack = %{version}

%description gui
A Qt/KF based GUI for Heaptrack.


%autosetup -p1

# Disable building tests, they're not used and post-build-checks trips over it
sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt

%if "%{_lib}" == "lib64"

%cmake_kf6 -DHEAPTRACK_USE_QT6=TRUE $extra_opts



%find_lang %{name} --all-name

# Fixup desktop file
%suse_update_desktop_file org.kde.heaptrack Development Profiling

%license LICENSES/*

%files devel

%files gui
%dir %{_kf6_iconsdir}/hicolor/*
%dir %{_kf6_iconsdir}/hicolor/*/*

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by