%global pkgvers 0 %global scdate0 20231029 %global schash0 794d6ff5acf66d5da7fb7fceba7b952c95305960 %global branch0 master %global source0 https://github.com/AlexandreRouma/SDRPlusPlus.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: sdr++ Version: %(curl -s https://raw.githubusercontent.com/AlexandreRouma/SDRPlusPlus/%{schash0}/core/src/version.h | grep VERSION | cut -d '"' -f2 | sed 's|.[a-z,A-Z]||') Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: SDR++ The bloat-free SDR software License: GPLv3 URL: https://github.com/AlexandreRouma/SDRPlusPlus BuildRequires: cmake gcc-c++ git pkgconfig libglvnd-devel libusb1-devel limesuite-devel dnf BuildRequires: fftw-devel glew-devel volk-devel airspyone_host-devel hackrf-devel codec2-devel bladerf-devel BuildRequires: SoapySDR-devel airspyhf-devel libiio-devel libad9361-iio-devel airspyhf-devel rtl-sdr-devel libzstd-devel %if 0%{?fedora} BuildRequires: rtaudio-devel %endif %if 0%{?rhel} BuildRequires: portaudio-devel %endif %global have_glfw 1 %if %{have_glfw} BuildRequires: glfw-devel %endif %define __cmake_in_source_build 1 %global optflags "`echo %{optflags} | sed 's|-Werror=format-security||'`" %description SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use. %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 # fix path sed -i 's|/lib/sdrpp/plugins|/lib64/sdrpp/plugins|g' core/src/core.cpp # gcc13 sed -i '1i #include "stdint.h"' core/src/gui/smgui.h sed -i '1i #include ' core/src/utils/net.h sed -i '1i #include ' core/src/utils/net.h sed -i '1i #include ' core/src/utils/networking.cpp %build mkdir -p build pushd build %global optflags %(echo "%{optflags} -w") %cmake -Wno-dev .. \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ %if %{have_glfw} -DOPT_BACKEND_GLFW=ON \ %else -DOPT_BACKEND_GLFW=OFF \ %endif %if 0%{?fedora} -DOPT_BUILD_AUDIO_SINK=ON \ -DOPT_BUILD_NEW_PORTAUDIO_SINK=OFF \ %endif %if 0%{?rhel} -DOPT_BUILD_AUDIO_SOURCE=OFF \ -DOPT_BUILD_AUDIO_SINK=OFF \ -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON \ %endif -DOPT_BUILD_SCANNER=ON \ -DOPT_BUILD_SCHEDULER=ON \ %ifarch x86_64 -DOPT_BUILD_SDDC_SOURCE=ON \ %else -DOPT_BUILD_SDDC_SOURCE=OFF \ %endif -DOPT_BUILD_LIMESDR_SOURCE=ON \ -DOPT_BUILD_BLADERF_SOURCE=ON \ -DOPT_BUILD_M17_DECODER=ON \ -DOPT_BUILD_WEATHER_SAT_DECODER=OFF \ -DOPT_BUILD_DISCORD_PRESENCE=OFF %cmake_build popd %install rm -rf %{buildroot} pushd build make install DESTDIR=%{buildroot} popd mv -f %{buildroot}/usr/lib %{buildroot}/%{_libdir} %files %doc readme.md %license license %{_bindir}/* %{_libdir}/* %{_datadir}/* %changelog * Tue Aug 25 2020 Balint Cristian - github update releases