File nfc-spy.spec of Package nfc-spy

#
# spec file for package nfc-spy
#
# Copyright (c) 2024-2025, 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/
#


Name:           nfc-spy
Version:        3.3.2
Release:        0
Summary:        NFC signal and protocol analyzer using SDR receiver
License:        GPL-3.0-or-later
Group:          Productivity/Hamradio/Other
URL:            https://github.com/josevcm/nfc-laboratory
#Git-Clone:     https://github.com/josevcm/nfc-laboratory.git
Source:         https://github.com/josevcm/nfc-laboratory/archive/refs/tags/%{version}.tar.gz#/nfc-laboratory-%{version}.tar.gz
Source1:        nfc-spy.desktop
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  qt6-base-devel
BuildRequires:  pkgconfig(libairspy)
BuildRequires:  pkgconfig(libhydrasdr)
BuildRequires:  pkgconfig(librtlsdr)
BuildRequires:  pkgconfig(libusb-1.0)
Provides:       bundled(crapto1)
Provides:       bundled(ed25519)
Provides:       bundled(lime)
Provides:       bundled(microtar)
Provides:       bundled(mirisdr)
Provides:       bundled(mufft)
Provides:       bundled(nlohmann)

%description
NFC signal sniffer and protocol decoder using SDR receiver for
demodulation and decoding NFC-A, NFC-B, NFC-F and NFC-V signals
in real-time up to 424 Kbps.

Logic analyzer for contact smart cards with protocol ISO7816.

Features
* NFC Real-time signal capture and demodulation.
* ISO7816 Real-time signal capture and decode.
* Radio decoder for contactless ISO14443-A, ISO14443-B, ISO15693 and ISO18092.
* Logic decoder for contact smart cards with protocol ISO7816.
* Signal analysis and protocol timing.
* Signal spectrum and wave view.
* Signal frame and protocol detail view.
* Signal export captures to compressed TRZ format.
* Signal import from WAV and compressed TRZ format.
* Support for AirSpy and RTL-SDR receivers.
* Support for DreamSourceLab DSLogic Plus, Pro16 and Pro32 logic analyzer.

%prep
%autosetup -p1 -n nfc-laboratory-%{version}

%build
%cmake
%make_jobs

%install
install -Dpm 0755 build/src/nfc-app/app-qt/nfc-lab %{buildroot}%{_bindir}/nfc-lab
install -Dpm 0755 build/src/nfc-app/app-rx/nfc-rx %{buildroot}%{_bindir}/nfc-rx
# icons
install -Dm 0644 src/nfc-app/app-qt/src/main/assets/app/rc/nfc-lab.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
install -Dm 0644 src/nfc-app/app-qt/src/main/assets/app/rc/nfc-lab.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
# desktop-file
install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop

%files
%license LICENSE
%doc README.md
%{_bindir}/nfc-lab
%{_bindir}/nfc-rx
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

%changelog
openSUSE Build Service is sponsored by