File tracy.spec of Package tracy

#
# spec file for package tracy
#
# Copyright (c) 2020 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 https://bugs.opensuse.org/
#


%define         _lto_cflags      %{nil}
Name:           tracy
Version:        0.7.2
Release:        0
Summary:        Profiler for games
License:        BSD-3-Clause
URL:            https://github.com/wolfpld/tracy
Source0:        https://github.com/wolfpld/tracy/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(capstone)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(glfw3)
BuildRequires:  pkgconfig(gtk+-3.0)

%description
A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling
profiler for games and other applications.

Tracy supports profiling CPU (C, C++11, Lua), GPU (OpenGL, Vulkan, OpenCL),
memory, locks, context switches, per-frame screenshots and more.

%prep
%autosetup

%build
# try doing away with the embedded zstd if possible
%make_build -C profiler/build/unix release CFLAGS="%{optflags}"
%make_build -C update/build/unix release CFLAGS="%{optflags}"
%make_build -C capture/build/unix release CFLAGS="%{optflags}"

%install
install -Dm755 profiler/build/unix/Tracy-release %{buildroot}/%{_bindir}/%{name}
install -Dm755 update/build/unix/update-release %{buildroot}/%{_bindir}/%{name}-update
install -Dm755 capture/build/unix/capture-release %{buildroot}/%{_bindir}/%{name}-capture
install -Dm644 icon/icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/tracy.png

%suse_update_desktop_file -c %{name} "Tracy Profiler" %{name} %{name} %{name} %{name} Graphics 3DGraphics GTK

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}-capture
%{_bindir}/%{name}-update
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%changelog
openSUSE Build Service is sponsored by