File mingw64-airspyhf.spec of Package mingw64-airspyhf

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


%define sover 0
%define realname airspyhf
%define libname lib%{realname}
Name:           mingw64-%{realname}
Version:        1.6.8
Release:        0
Summary:        Support programs for Airspy HF+ SDR
License:        BSD-3-Clause
Group:          Productivity/Hamradio/Other
Url:            http://www.airspy.com/airspy-hf-plus
#Git-Clone:     https://github.com/airspy/airspyhf.git
Source:         https://github.com/airspy/%{realname}/archive/%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-libusb-1_0-devel
BuildArch:      noarch
%{_mingw64_package_header_debug}
%{_mingw64_debug_package}

%description
Host software for Airspy HF+, a software defined radio
for the HF and VHF bands.

%package -n mingw64-%{libname}%{sover}
Summary:        Driver for Airspy HF+
Group:          Hardware/Other

%description -n mingw64-%{libname}%{sover}
Library to run Airspy HF+ SDR receiver.

%package -n mingw64-%{realname}-devel
Summary:        Development files for Airspy HF+
Group:          Development/Libraries/Other
Requires:       mingw64-%{libname}%{sover} = %{version}

%description -n mingw64-%{realname}-devel
Library headers for Airspy HF+ driver.

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

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

%install
%{_mingw64_cmake_install}
# remove unneeded static version of the lib
rm %{buildroot}/%{_mingw64_bindir}/libairspyhf.a

%files
%{_mingw64_bindir}/airspyhf_*.exe

%files -n mingw64-%{libname}%{sover}
%defattr(-,root,root)
%license LICENSE
%doc README.md
%{_mingw64_bindir}/libairspyhf.dll

%files -n mingw64-%{realname}-devel
%defattr(-,root,root)
%{_mingw64_bindir}/libairspyhf.dll.a
%dir %{_mingw64_includedir}/libairspyhf
%{_mingw64_includedir}/libairspyhf/*.h
%{_mingw64_libdir}/pkgconfig/libairspyhf.pc

%changelog
openSUSE Build Service is sponsored by