%global tracy_variant nocallstack %undefine _hardened_build %if "%{tracy_variant}" == "local" %global pkgname tracy-client %global variant_summary local-only %global only_localhost true %global no_callstack false %endif %if "%{tracy_variant}" == "broadcast" %global pkgname tracy-client-broadcast %global variant_summary broadcast-enabled %global only_localhost false %global no_callstack false %endif %if "%{tracy_variant}" == "nocallstack" %global pkgname tracy-client-nocallstack %global variant_summary local-only, no-callstack %global only_localhost true %global no_callstack true %endif %{!?pkgname:%{error:Unknown tracy_variant '%{tracy_variant}'. Expected local, broadcast, or nocallstack.}} Name: %{pkgname} Version: 0.13.1 Release: 1%{?dist} Summary: Tracy profiler client library (%{variant_summary} variant) License: BSD-3-Clause URL: https://github.com/wolfpld/tracy Source: https://github.com/wolfpld/tracy/archive/refs/tags/v%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: pkgconfig(libunwind) Patch: patches.patch Provides: libtracy = %{version}-%{release} Provides: libtracy%{?_isa} = %{version}-%{release} %if "%{pkgname}" != "tracy-client" Conflicts: tracy-client %endif %if "%{pkgname}" != "tracy-client-broadcast" Conflicts: tracy-client-broadcast %endif %if "%{pkgname}" != "tracy-client-nocallstack" Conflicts: tracy-client-nocallstack %endif %description A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications. %prep %autosetup -n tracy-%{version} -p1 %build %meson \ -Ddefault_library=shared \ -Don_demand=true \ -Ddelayed_init=true \ -Dmanual_lifetime=true \ -Dlibunwind_backtrace=true \ -Dlibbacktrace_elf_dynload_support=true \ -Donly_localhost=%{only_localhost} \ -Dno_callstack=%{no_callstack} \ %{nil} %meson_build %install %meson_install %files %license LICENSE %doc README.md %{_libdir}/libtracy.so.0* %{_libdir}/libtracy.so %{_includedir}/* %{_libdir}/pkgconfig/* %changelog %autochangelog