%global pkgvers 0 %global scdate0 20241113 %global schash0 b178c66e6ebbd9f41a5ee3f5237d8f485a66a61a %global branch0 master %global source0 https://github.com/greatscottgadgets/hackrf.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: hackrf Version: 2024.02.1 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: HackRF Utilities License: GPLv2 URL: https://greatscottgadgets.com/hackrf BuildRequires: cmake gcc gcc-c++ git pkgconfig BuildRequires: python3-sphinx python3-sphinx_rtd_theme BuildRequires: libusbx-devel systemd fftw3-devel %global __cmake_in_source_build 1 %description Hardware designs and software for HackRF, a project to produce a low cost, open source software radio platform. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libusbx-devel %description devel Files needed to develop software against libhackrf. %package doc Summary: Supplemental documentation for HackRF BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Supplemental documentation for HackRF. For more information, visit the wiki at https://github.com/mossmann/hackrf/wiki %package static Summary: Static libraries for libhackrf Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description static Static libraries for libhackrf. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build %if 0%{?fedora} >= 20 sed -i -e 's/GROUP="@HACKRF_GROUP@"/ENV{ID_SOFTWARE_RADIO}="1"/g' host/libhackrf/53-hackrf.rules.in sed -i -e 's/GROUP="plugdev"/ENV{ID_SOFTWARE_RADIO}="1"/g' host/libhackrf/53-hackrf.rules %else sed -i -e 's/GROUP="@HACKRF_GROUP@"/TAG+="uaccess"/g' host/libhackrf/53-hackrf.rules.in sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' host/libhackrf/53-hackrf.rules %endif mkdir build pushd build %cmake -Wno-dev ../host \ -DINSTALL_UDEV_RULES=on \ -DUDEV_RULES_PATH:PATH=%{_udevrulesdir} \ -DUDEV_RULES_GROUP=plugdev %cmake_build popd pushd docs make html popd %install pushd build %cmake_install popd %post %{?ldconfig} %udev_rules_update %postun %{?ldconfig} %udev_rules_update %files %license COPYING TRADEMARK %doc Readme.md %{_bindir}/hackrf_* %{_libdir}/libhackrf.so.* %{_udevrulesdir}/53-hackrf.rules %files devel %{_includedir}/libhackrf/hackrf.h %{_libdir}/pkgconfig/libhackrf.pc %{_libdir}/libhackrf.so %files static %{_libdir}/libhackrf.a %files doc %doc docs/build/html %changelog * Tue Aug 21 2018 Balint Cristian - github update releases