%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+ host software, a high performance software defined radio for the HF and VHF bands. License: BSD-3-Clause URL: http://airspy.com/ Source: https://github.com/airspy/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz 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: MIT AND BSD-3-Clause 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 %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 %files %license LICENSE %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