Name: sigviewer Version: 0.7.2 Release: 4%{?dist} Summary: Viewing and inspection of biosignals (EEG, EMG, ECG) License: GPL-3.0-or-later URL: https://github.com/cbrnr/sigviewer Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: sigviewer.metainfo.xml # 0.7.1 switched from qmake → cmake and Qt5 → Qt6. BuildRequires: cmake >= 3.21 BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: desktop-file-utils # Qt6 components requested by CMakeLists.txt:21 BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(Qt6Xml) BuildRequires: cmake(Qt6Svg) BuildRequires: cmake(Qt6LinguistTools) BuildRequires: cmake(Qt6Test) # External libraries — both at the exact versions upstream pins (now both # in COPR mhough/neurofedora: libxdf 0.99.10 and biosig4c++ 3.9.4). BuildRequires: libxdf-devel >= 1.0.1 BuildRequires: biosig4c++-devel >= 3.9.4 BuildRequires: /usr/bin/appstream-util # biosig4c++ freezes its soname at libbiosig.so.3, and FEDORA ships a # biosig4c++ 2.6.1 that provides the identical libbiosig.so.3()(64bit). The # auto-generated soname dependency is therefore satisfied by Fedora's 2.6.1 # even though this binary is built against our 3.9.7 -- it installs cleanly and # fails at LOAD with undefined symbols, with nothing reporting a problem. Same # defect as VTK's frozen libvtk*.so.1 and CTK's .so.0.1. # # A runtime floor is the only thing that can express this; the BuildRequires # above constrains the build and says nothing about what gets installed. # Hardcoded rather than macro-derived because there is exactly one consumer -- # but it is therefore a floor that can go stale, so raise it whenever the # BuildRequires floor moves. (mitk-workbench shipped a CTK floor pinned to the # very snapshot it needed to exclude, from exactly this pattern.) Requires: biosig4c++%{?_isa} >= 3.9.4 Requires: qt6-qtbase Requires: qt6-qtsvg Requires: hicolor-icon-theme %description SigViewer is a powerful viewing and scoring application for biosignals. It supports various data formats including XDF, GDF, EDF, BDF. %prep %autosetup -p1 # Upstream's external/build_deps.cmake downloads + builds libxdf and libbiosig # from scratch at the pinned versions, then writes external/versions.cmake. # We can't do that in mock/COPR (no network) so we satisfy the version-match # check by writing the file directly with the expected version strings. mkdir -p external cat > external/versions.cmake <&2 find %{__cmake_builddir} -maxdepth 4 -type f -executable -name 'sigviewer*' >&2 exit 1 fi fi # Install desktop file and icon if cmake_install didn't already place them if [ -f deploy/debian/sigviewer.desktop ] && [ ! -f %{buildroot}%{_datadir}/applications/sigviewer.desktop ]; then mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir=%{buildroot}%{_datadir}/applications deploy/debian/sigviewer.desktop fi if [ -f sigviewer.svg ] && [ ! -f %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/sigviewer.svg ]; then mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps install -m 0644 sigviewer.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/sigviewer.svg fi # Three fixes to upstream's desktop entry, applied to whichever copy ended # up installed above. # # 1. Icon=sigviewer128 names an icon that does not exist. The package ships # icons/hicolor/scalable/apps/sigviewer.svg, so the entry has been # showing a blank tile in the menu ever since it was added. # 2. Exec=sigviewer takes no %%F, so "Open With -> SigViewer" handed it # nothing. For a viewer that is the main way it gets opened. # 3. No MimeType at all, so SigViewer -- which reads every electrophysiology # format we define -- could not be offered for any of them, and a default # pointing at it would be silently ignored by the desktop. # # The types are the ones upstream documents and the binary supports: # libbiosig.so.3 for EDF/BDF/GDF, libxdf.so.1 for XDF (Xdf::Stream symbols # are in the binary), and BrainVision is named in upstream's own docs. desktop-file-edit \ --set-icon=sigviewer \ --set-key=Exec --set-value='sigviewer %F' \ --set-key=Keywords --set-value='EEG;MEG;EDF;BDF;GDF;XDF;biosignal;electrophysiology;' \ --set-key=MimeType --set-value='application/x-edf;application/x-bdf-biosemi;application/x-gdf;application/x-xdf;application/x-brainvision-header;' \ %{buildroot}%{_datadir}/applications/sigviewer.desktop # AppStream metadata. A .desktop file makes an application launchable; a # metainfo file makes it DISCOVERABLE -- GNOME Software and KDE Discover list # only applications that ship one. Validation runs here rather than in # %check so a malformed file fails the build instead of shipping and being # silently ignored, which is how Ankur Sinha does it in Fedora's # python-fsleyes. install -Dpm 0644 %{SOURCE1} %{buildroot}%{_metainfodir}/sigviewer.metainfo.xml appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/sigviewer.metainfo.xml %check # This used to read "[ -f ... ] && desktop-file-validate ... || :", which # cannot fail: the trailing || : swallows a validation error, and a missing # file short-circuits to success. A gate that cannot fail is decoration. test -f %{buildroot}%{_datadir}/applications/sigviewer.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/sigviewer.desktop # The icon named by Icon= must exist, or the menu shows a blank tile -- the # defect this release fixes, so it gets an assertion rather than a promise. icon=$(sed -n 's/^Icon=//p' %{buildroot}%{_datadir}/applications/sigviewer.desktop) test -n "$icon" ls %{buildroot}%{_datadir}/icons/hicolor/*/apps/"$icon".* >/dev/null grep -q '^Exec=.*%%F' %{buildroot}%{_datadir}/applications/sigviewer.desktop grep -q '^MimeType=.*application/x-edf' %{buildroot}%{_datadir}/applications/sigviewer.desktop %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/sigviewer %{_datadir}/applications/sigviewer.desktop %{_datadir}/icons/hicolor/scalable/apps/sigviewer.svg %{_metainfodir}/sigviewer.metainfo.xml %changelog * Tue Sep 29 2026 Morgan Hough - 0.7.2-4 - Ship AppStream metadata (sigviewer.metainfo.xml). A desktop entry makes an application launchable; a metainfo file makes it DISCOVERABLE, because GNOME Software and KDE Discover list only applications that ship one. Twenty of the twenty-six applications in this repo had a desktop entry and no metainfo, so they were invisible in the software centre even once installed. Validated at build time with appstream-util validate-relax --nonet, in %install rather than %check, so a malformed file fails the build. - Added Requires: hicolor-icon-theme, which the icons need. * Tue Sep 29 2026 Morgan Hough - 0.7.2-3 - Fixed three defects in the desktop entry, all of which made SigViewer present as installed-but-broken rather than as missing. Icon=sigviewer128 named an icon the package does not ship (it ships sigviewer.svg), so the menu showed a blank tile. Exec had no %%F, so "Open With" handed it nothing. And there was no MimeType at all, so the one application here that reads EDF, BDF, GDF, XDF and BrainVision was offered for none of them. - %%check no longer swallows its own result. It was "[ -f x ] && desktop-file-validate x || :", which passes when the file is missing AND when validation fails. It now asserts the file exists, that it validates, that Icon= resolves to a shipped icon, and that Exec and MimeType carry what this release added. * Wed Sep 16 2026 Morgan Hough - 0.7.2-2 - Add Requires: biosig4c++ >= 3.9.4. The shipped 0.7.2-1 required only libbiosig.so.3()(64bit), and Fedora's biosig4c++ 2.6.1 provides that exact soname -- so a sigviewer built against our 3.9.7 could be satisfied by Fedora's 2.6.1 and fail at load with undefined symbols, silently. - Verified against the built rpm rather than the spec: 0.7.2-1's 42 requires contained no version constraint on biosig at all. * Sat Jul 18 2026 Morgan Hough - 0.7.2-1 - Update to 0.7.2 * Tue May 26 2026 Morgan Hough - 0.7.1-5 - Strip apostrophes from %%install comments. The %%cmake_install macro emits a line-continuation; bash then treats apostrophes in following comment lines as quote-starts that consume the rest of the fallback block as one literal argument to cmake. - Add a no-op : before the fallback to terminate any leftover line-continuation from the macro expansion. * Tue May 26 2026 Morgan Hough - 0.7.1-4 - Add binary-find fallback after %%cmake_install: upstream's CMakeLists.txt may lack install(TARGETS sigviewer ...), in which case the binary stays in the build tree. Locate and install it manually if cmake_install didn't place it at %{_bindir}/sigviewer. * Sat May 23 2026 Morgan Hough - 0.7.1-3 - Require biosig4c++-devel >= 3.9.4 (now in COPR); both pinned external deps are at the exact versions upstream expects, so the stub versions.cmake matches reality. * Sat May 23 2026 Morgan Hough - 0.7.1-2 - Port spec from qmake/Qt5 to cmake/Qt6 (upstream 0.7.1 dropped qmake). - Stub external/versions.cmake to satisfy upstream's pinned-version FATAL_ERROR (LIBXDF 0.99.10 is exact from COPR; LIBBIOSIG 3.9.4 vs system 2.6.1 — will iterate if biosig 2.x API isn't compatible with sigviewer 0.7.1 needs). - Repoint upstream's STATIC IMPORTED dep targets at system shared libs. * Thu Apr 23 2026 Morgan Hough - 0.7.1-1 - Update to 0.7.1 * Wed Jan 07 2026 Your Name - 0.6.4-1 - Initial package for Fedora - Switched to QMake build system - Patched to link against system libxdf and biosig4c++