%global gitdate 20250421 %global commit 7b94498638f49ac66f806a60c711db8bbb1518fb %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: airspyhf Version: 1.6.8^%{gitdate}git%{shortcommit} Release: %autorelease Summary: AirSpy HF+ SDR host software for HF and VHF bands License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later URL: http://airspy.com/ Source0: https://github.com/airspy/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: gpl-2.0.txt BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: libusbx-devel BuildRequires: systemd Requires: systemd-udev %description Software for AirSpy HF+, a high performance software defined radio for the HF and VHF bands. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later Summary: Development files for %{name} %description devel Files needed to develop software against libairspy. %prep %autosetup -n %{name}-%{commit} # Fix udev rule sed -i -e 's/MODE="660", GROUP="plugdev"/TAG+="uaccess"/g' tools/52-airspyhf.rules mv LICENSE LICENSE_BSD mv tools/getopt/LICENSE.md LICENSE_LGPL mv %{SOURCE1} LICENSE_GPL %build %cmake -DINSTALL_UDEV_RULES=on %cmake_build %install %cmake_install # Remove static object rm -f %{buildroot}%{_libdir}/libairspyhf.a # Move udev rule to correct location mkdir -p %{buildroot}%{_udevrulesdir} mv %{buildroot}%{_sysconfdir}/udev/rules.d/52-airspyhf.rules %{buildroot}%{_udevrulesdir} %post %?ldconfig %udev_rules_update %postun %?ldconfig %udev_rules_update %check export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/airspyhf_lib_version %files %license LICENSE_BSD LICENSE_LGPL LICENSE_GPL %doc README.md %{_bindir}/airspyhf_* %{_libdir}/libairspyhf.so.* %{_udevrulesdir}/52-airspyhf.rules %files devel %{_includedir}/libairspyhf %{_libdir}/pkgconfig/libairspyhf.pc %{_libdir}/libairspyhf.so %changelog %autochangelog