File heaptrack.spec of Package heaptrack

# spec file for package heaptrack
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 

%bcond_without lang

Name:           heaptrack
Version:        1.0.0
Release:        0
%define kf5_version 5.26.0
Summary:        Heap Memory Allocation Profiler
License:        LGPL-2.1+
Group:          Development/Tools/Other
# Needs office-chart-area icon
BuildRequires:  breeze5-icons
BuildRequires:  extra-cmake-modules
BuildRequires:  cmake(Qt5Core) >= 5.2.0
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  kf5-filesystem
BuildRequires:  cmake(KChart) >= 2.6.0
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5ItemModels)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5ThreadWeaver)
BuildRequires:  cmake(KF5ConfigWidgets)
%if 0%{?suse_version} >= 1330
BuildRequires:  libboost_iostreams-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  boost-devel
BuildRequires:  libdwarf-devel
BuildRequires:  libunwind-devel
BuildRequires:  zlib-devel
BuildRequires:  update-desktop-files
Recommends:     %{name}-lang
Suggests:       heaptrack-gui
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A memory profiler for Linux, tracking heap allocations.

%if %{with lang}

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

  %cmake_kf5 -d build

  %make_install -C build
  %if %{with lang}
    %find_lang %{name} --all-name
  # Install icon from breeze
  mkdir -p %{buildroot}%{_kf5_iconsdir}/hicolor/scalable/apps/
  cp %{_kf5_iconsdir}/breeze/actions/24/office-chart-area.svg %{buildroot}%{_kf5_iconsdir}/hicolor/scalable/apps/
  # Fixup desktop file
  %suse_update_desktop_file org.kde.heaptrack Development Profiling

%package devel
Summary:        Development files for the Heaptrack API
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}

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

%package gui
Summary:        GUI Frontend for Heaptrack
Group:          Development/Tools/Other
Requires:       %{name} = %{version}

%description gui
A Qt5/KF5 based GUI for Heaptrack.


%files devel

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

%if %{with lang}
%files lang -f %{name}.lang

openSUSE Build Service is sponsored by