%global _hardened_build 1 Name: rtl-sdr-blog Version: 1.3.5 Release: 1%{?dist} Summary: rtl-sdr toolchain for rtl-sdr-blog V4 RTL2832 receiver License: GPLv2 URL: https://www.rtl-sdr.com/V4/ Source0: https://github.com/rtlsdrblog/%{name}/archive/refs/tags/%{version}.tar.gz Conflicts: rtl-sdr Provides: rtl-sdr = %{version} BuildRequires: gcc cmake3 systemd-rpm-macros %if 0%{?fedora} > 38 BuildRequires: libusb1-devel %endif %if 0%{?rhel} >= 8 BuildRequires: libusb-devel %endif %description turns your Realtek RTL2832 based DVB dongle into a SDR receiver. For more information see: https://osmocom.org/projects/rtl-sdr/wiki %package devel Summary: Header files, libraries and development documentation for %{name}. Group: Development/Libraries Requires: %{name} = %{version}-%{release} Conflicts: rtl-sdr-devel Provides: rtl-sdr-devel = %{version} %description devel This package contains the header files, static libraries and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. %prep %setup -q sed -i 's/plugdev/rtlsdr/g' rtl-sdr.rules %build %{cmake3} . %{cmake_build} %install %{cmake_install} install -Dp -m 0644 rtl-sdr.rules %{buildroot}%{_udevrulesdir}/rtl-sdr.rules install -d %{buildroot}%{_sysconfdir}/modprobe.d echo "blacklist dvb_usb_rtl28xxu" > %{buildroot}%{_sysconfdir}/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf sed -i -r -e 's/^(Version:).*/\1 v%{version}/' %{buildroot}/%{_libdir}/pkgconfig/librtlsdr.pc %pre getent group rtlsdr >/dev/null || \ /usr/sbin/groupadd -r rtlsdr >/dev/null 2>&1 exit 0 %files %{!?_licensedir:%global license %%doc} %license COPYING %{_bindir}/rtl_sdr %{_bindir}/rtl_tcp %{_bindir}/rtl_test %{_bindir}/rtl_fm %{_bindir}/rtl_eeprom %{_bindir}/rtl_adsb %{_bindir}/rtl_power %{_bindir}/rtl_biast %{_libdir}/librtlsdr.so.* %{_udevrulesdir}/rtl-sdr.rules %config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf %files devel %{_includedir}/rtl-sdr.h %{_includedir}/rtl-sdr_export.h %{_libdir}/librtlsdr.a %{_libdir}/librtlsdr.so %{_libdir}/pkgconfig/librtlsdr.pc %{_libdir}/cmake/rtlsdr %changelog * Tue Apr 9 2024 Philippe Kueck - 1.3.5-1 - initial packaging