%global pkgname seergdb %global tests 1 # disable test for now till I figure out how to enable @crb with copr %if 0%{?rhel} == 10 || 0%{?epel} == 10 %global tests 0 %endif %if 0%{?rhel} == 9 && 0%{?epel} %global debug_package %{nil} %endif # Define _metadir for older RPM environments %{!?_metadir: %global _metadir %{_datadir}/metainfo} Name: %{pkgname} Version: 2.5 Release: %autorelease Summary: A modern GDB front-end License: GPL-3.0-or-later AND LGPL-3.0-or-later AND BSD-2-Clause AND MIT AND CC-BY-3.0 AND CC-BY-4.0 URL: https://github.com/epasveer/seer Source0: %{url}/archive/v%{version}/%{pkgname}-%{version}.tar.gz Source1: seergdb.1 Source2: seergdb.metainfo.xml # https://github.com/epasveer/seer/commit/adef4b50263bd706769fd764b969d5fca3cda7e8 Patch0: add_copyrights_to_source_files.patch Patch1: add_spdx_license_to_markdowns.patch BuildRequires: gcc BuildRequires: gcc-c++ %if 0%{?amzn} == 2023 BuildRequires: gcc14 BuildRequires: gcc14-c++ %global toolchain gcc14 %endif BuildRequires: cmake >= 3.5 BuildRequires: gdb BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtcharts-devel BuildRequires: qt6-qtsvg-devel BuildRequires: desktop-file-utils %if 0%{?tests} BuildRequires: xorg-x11-server-Xvfb BuildRequires: libappstream-glib %endif Requires: gdb Requires: hicolor-icon-theme %description SeerGDB is a modern GDB front-end. %prep %setup -q -n seer-%{version} %patch -P0 -p1 %patch -P1 -p1 #cleanup source tree find . -name '*add.copyrights' -delete %build %cmake -S src -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_SBINDIR=%{_bindir} \ -DQT_VERSION=QT6 %cmake_build %install %cmake_install # Install the existing desktop file from the source. install -Dm0644 src/resources/seergdb.desktop %{buildroot}%{_datadir}/applications/%{pkgname}.desktop # Install a relevant icon from the source. install -Dm0644 src/resources/thenounproject/fortune-teller.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{pkgname}.svg # Install minimum man page install -Dm0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/seergdb.1 # Install AppData file install -Dm0644 %{SOURCE2} %{buildroot}%{_metadir}/%{pkgname}.metainfo.xml %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{pkgname}.desktop %if 0%{?tests} appstream-util validate-relax --nonet %{buildroot}%{_metadir}/%{pkgname}.metainfo.xml # Smoke test: launch the application in a virtual framebuffer and kill it # after a few seconds. This verifies that it can start successfully. # The 'timeout' command exits with 124 if it kills the process, which we # treat as a success. Any other non-zero exit code is a failure. timeout 10 xvfb-run %{buildroot}/%{_bindir}/seergdb || [ $? -eq 124 ] %endif %files %license LICENSE %{_bindir}/seergdb %{_datadir}/applications/%{pkgname}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{pkgname}.svg %{_mandir}/man1/seergdb.1* %{_metadir}/%{pkgname}.metainfo.xml %changelog * Mon Sep 02 2025 Yonghang Wang - 2.5-1 - Initial build for Fedora