File hobbits.spec of Package failed_hobbits
#
# spec file for package hobbits
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2021-2024, Martin Hauke <mardnh@gmx.de>
#
# 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 pffft_hash 7c3b5a7
Name: hobbits
Version: 0.54.1
Release: 0
Summary: A GUI for bit-based analysis, processing, and visualization
License: MIT
URL: https://github.com/Mahlet-Inc/hobbits
Source: https://github.com/Mahlet-Inc/hobbits/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://bitbucket.org/jpommier/pffft/get/%{pffft_hash}.zip#/pffft-%{pffft_hash}.zip
Patch0: hobbits-dont-hardcode-python3-version.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libpcap-devel
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: unzip
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libusb-1.0)
Provides: bundled(pffft)
%description
A GUI for bit-based analysis, processing, and visualization.
%package devel
Summary: Development files for hobbits
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
A GUI for bit-based analysis, processing, and visualization.
This subpackage contains files for developing applications thatwant to make use of hobbits.
%prep
%autosetup -p1
# 3rd party
cd external/pffft/
unzip -j %{SOURCE1}
%build
# Add -Wno-narrowing to suppress narrowing conversion errors for brace initializers
# while preserving the distro hardening flags. We explicitly set both C and CXX
# flags to the commonly injected hardening flags and append -Wno-narrowing so the
# compiler accepts signed negative literals in braced initializers used by the
# upstream source (avoids changing source files).
%cmake -DCMAKE_SKIP_RPATH:BOOL=OFF \
-DCMAKE_C_FLAGS:STRING="-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wno-narrowing" \
-DCMAKE_CXX_FLAGS:STRING="-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fno-sized-deallocation -Wno-narrowing"
%make_build
%install
%cmake_install
%files
%license LICENSE.txt
%doc CHANGELOG.md README.md
%{_bindir}/hobbits
%{_bindir}/hobbits-runner
%dir %{_libdir}/hobbits
%dir %{_libdir}/hobbits/plugins
%{_libdir}/hobbits/plugins/analyzers/
%{_libdir}/hobbits/plugins/analyzers/
%{_libdir}/hobbits/plugins/displays/
%{_libdir}/hobbits/plugins/importerexporters/
%{_libdir}/hobbits/plugins/operators/
%{_libdir}/libhobbits-core.so
%{_libdir}/libhobbits-python.so
%{_libdir}/libhobbits-widgets.so
%{_datadir}/applications/Hobbits.desktop
# FIXME: icons too large
%dir %{_datadir}/icons/hicolor/624x624/
%dir %{_datadir}/icons/hicolor/624x624/apps/
%{_datadir}/icons/hicolor/624x624/apps/HobbitsRingSmall.png
%files devel
%{_includedir}/hobbits/
%changelog