File mingw64-hackrf.spec of Package mingw64-hackrf

#
# spec file for package mingw64-hackrf
#
# Copyright (c) 2016-2026, 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 http://bugs.opensuse.org/
#

%define sover 0
%define realname hackrf
Name:           mingw64-%{realname}
Version:        2026.01.3
Release:        0
Summary:        Support programs for HackRF SDR board
License:        GPL-2.0-only
Group:          Productivity/Hamradio/Other
URL:            http://greatscottgadgets.com/hackrf/
#Git-Clone:     https://github.com/mossmann/hackrf.git
Source:         https://github.com/mossmann/hackrf/releases/download/v%{version}/hackrf-%{version}.tar.xz
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-fftw3-devel
BuildRequires:  mingw64-libusb-1_0-devel
%{_mingw64_package_header_debug}
BuildArch:      noarch

%description
Programs that controls HackRF SDR board from Great Scott Gadgets.
This is a Software Defined Radio peripheral capable of transmission
or reception of radio signals from 10 MHz to 6 GHz.

%package -n mingw64-libhackrf%{sover}
Summary:        Driver for HackRF SDR board
Group:          Hardware/Other

%description -n mingw64-libhackrf%{sover}
Library to run HackRF SDR board from Great Scott Gadgets.

%package devel
Summary:        Development files for hackrf
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description devel
Library headers for hackrf driver.

%{_mingw64_debug_package}

%prep
%setup -q -n %{realname}-%{version}
%autopatch -p1

%build
cd host
%{_mingw64_cmake}
%{_mingw64_make} VERBOSE=1 %{?_smp_mflags}

%install
cd host
%{_mingw64_cmake_install}
# remove uneeded files
rm %{buildroot}/%{_mingw64_bindir}/libhackrf.a

%files
%{_mingw64_bindir}/hackrf_*.exe

%files -n mingw64-libhackrf%{sover}
%{_mingw64_bindir}/libhackrf.dll

%files devel
%{_mingw64_bindir}/libhackrf.dll.a
%{_mingw64_includedir}/libhackrf
%{_mingw64_libdir}/pkgconfig/libhackrf.pc
%_mingw64_libdir/cmake/HackRF

%changelog
openSUSE Build Service is sponsored by