SHA256
1
0
forked from pool/rtl-sdr

Accepting request 1181075 from home:wkazubski:test:science

- Update to version (tag) 2.0.2
  * lib: set SOVERSION back to 0
  * r82xx: improve tuner precision and avoid redundant register
    writes for speed
  * fix: round gain input to nearest value
  * fix: set fc0012 gain to low on init
  * use library paths from pkg-config
- version number set in CmakeList.txt is still 2.0.1, workaround added

OBS-URL: https://build.opensuse.org/request/show/1181075
OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/rtl-sdr?expand=0&rev=29
This commit is contained in:
Martin Pluskal 2024-06-17 11:04:25 +00:00 committed by Git OBS Bridge
commit 7473819adf
7 changed files with 717 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,271 @@
From 9a2803f3d003b232e64a9d460d0ce0c78dc4f5b6 Mon Sep 17 00:00:00 2001
From: Martin Hauke <mardnh@gmx.de>
Date: Thu, 2 Nov 2023 20:27:06 +0100
Subject: [PATCH] Better udev handling
---
CMakeLists.txt | 69 +++++++++++++++++++++----
rtl-sdr.rules => rtl-sdr.rules.in | 84 +++++++++++++++----------------
2 files changed, 101 insertions(+), 52 deletions(-)
rename rtl-sdr.rules => rtl-sdr.rules.in (62%)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd7b143..50b7d13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,16 +106,65 @@ add_custom_target(uninstall
########################################################################
# Install udev rules
########################################################################
-option(INSTALL_UDEV_RULES "Install udev rules for RTL-SDR" OFF)
-if (INSTALL_UDEV_RULES)
- install (
- FILES rtl-sdr.rules
- DESTINATION "/etc/udev/rules.d"
- COMPONENT "udev"
- )
-else (INSTALL_UDEV_RULES)
- message (STATUS "Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON")
-endif (INSTALL_UDEV_RULES)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ SET(SYSTEM_IS_LINUX TRUE)
+ SET(UDEV_OPTION_DEFAULT ON)
+else()
+ SET(SYSTEM_IS_LINUX FALSE)
+ SET(UDEV_OPTION_DEFAULT OFF)
+endif()
+
+option(INSTALL_UDEV_RULES
+ "Install udev rules for the RTLSDR"
+ ${UDEV_OPTION_DEFAULT}
+)
+
+set(UDEV_RULES_PATH
+ "/etc/udev/rules.d"
+ CACHE STRING
+ "Target directory for udev rule installation. Ensure you have permissions to write to this directory."
+)
+
+if(SYSTEM_IS_LINUX)
+ if(INSTALL_UDEV_RULES)
+ if(NOT DEFINED UDEV_RULES_GROUP)
+ foreach(group usb plugdev)
+ execute_process(COMMAND "getent" group "${group}"
+ RESULT_VARIABLE _GETENT_RESULT
+ OUTPUT_QUIET
+ ERROR_QUIET)
+ if(NOT _GETENT_RESULT)
+ message(STATUS "Setting udev rule group to - ${group}")
+ set(UDEV_RULES_GROUP ${group})
+ break()
+ endif(NOT _GETENT_RESULT)
+ endforeach(group)
+ endif(NOT DEFINED UDEV_RULES_GROUP)
+ if(DEFINED UDEV_RULES_GROUP)
+ set(RTLSDR_GROUP "${UDEV_RULES_GROUP}"
+ CACHE STRING "Group to associate RTL-SDR devices with in udev rules")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rtl-sdr.rules.in
+ ${CMAKE_CURRENT_BINARY_DIR}/rtl-sdr.rules
+ @ONLY
+ )
+ message(STATUS "RTL-SDR udev rules will be installed to '${UDEV_RULES_PATH}' upon running 'make install'")
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rtl-sdr.rules
+ DESTINATION ${UDEV_RULES_PATH}
+ COMPONENT "udev_rules")
+ else(UDEV_RULES_GROUP)
+ message(STATUS "RTL-SDR udev rules will not be installed because no suitable group was found")
+ message(STATUS "A group can be specified with -DUDEV_RULES_GROUP=<group>")
+ endif(DEFINED UDEV_RULES_GROUP)
+ else(INSTALL_UDEV_RULES)
+ message(STATUS
+ "RTL-SDR udev rules will not be installed because INSTALL_UDEV_RULES=OFF"
+ )
+ endif(INSTALL_UDEV_RULES)
+else(SYSTEM_IS_LINUX)
+ if(INSTALL_UDEV_RULES)
+ message(STATUS "udev rules not supported on this platform. Hide this message via -DINSTALL_UDEV_RULES=Off")
+ endif(INSTALL_UDEV_RULES)
+endif(SYSTEM_IS_LINUX)
option(DETACH_KERNEL_DRIVER "Detach kernel driver if loaded" OFF)
if (DETACH_KERNEL_DRIVER)
diff --git a/rtl-sdr.rules b/rtl-sdr.rules.in
similarity index 62%
rename from rtl-sdr.rules
rename to rtl-sdr.rules.in
index 83fca70..4c0bec6 100644
--- a/rtl-sdr.rules
+++ b/rtl-sdr.rules.in
@@ -16,127 +16,127 @@
#
# original RTL2832U vid/pid (hama nano, for example)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# DigitalNow Quad DVB-T PCI-E card (4x FC0012?)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Leadtek WinFast DTV Dongle mini D (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Genius TVGo DVB-T03 USB dongle (Ver. B)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec Cinergy T Stick Black (rev 1) (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec NOXON rev 1 (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec Deutschlandradio DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec NOXON DAB Stick - Radio Energy (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec Media Broadcast DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec BR DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec WDR DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec MuellerVerlag DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec Fraunhofer DAB Stick (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec Cinergy T Stick RC (Rev.3) (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec T Stick PLUS (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Terratec NOXON rev 2 (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# PixelView PV-DT235U(RN) (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Astrometa DVB-T/DVB-T2 (R828D)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# HanfTek DAB+FM+DVB-T
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Compro Videomate U620F (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Compro Videomate U650F (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Compro Videomate U680F (E4000)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# GIGABYTE GT-U7300 (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# DIKOM USB-DVBT HD
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Peak 102569AGPK (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Zaapa ZT-MINDVBZP (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# SVEON STV20 DVB-T USB & FM (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Twintech UT-40 (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# ASUS U3100MINI_PLUS_V2 (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# SVEON STV27 DVB-T USB & FM (FC0013)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# SVEON STV21 DVB-T USB & FM
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Dexatek DK 5217 DVB-T Dongle (FC2580)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# MSI DigiVox Micro HD (FC2580)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Sweex DVB-T USB (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# GTek T803 (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# Lifeview LV5TDeluxe (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# MyGica TD312 (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
# PROlectrix DV107669 (FC0012)
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
--
2.42.0

3
rtl-sdr-2.0.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e108d3c6a00efcdf55877d1172be538842686c50377043319baffcfdb6b7b9cb
size 135734

3
rtl-sdr-2.0.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d69943eb32df742bc38a00ce6615e41250fd57851174e5ff916ec31e9e9e68e9
size 136512

296
rtl-sdr.changes Normal file
View File

@ -0,0 +1,296 @@
-------------------------------------------------------------------
Sat Jun 15 09:19:48 UTC 2024 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- Update to version (tag) 2.0.2
* lib: set SOVERSION back to 0
* r82xx: improve tuner precision and avoid redundant register
writes for speed
* fix: round gain input to nearest value
* fix: set fc0012 gain to low on init
* use library paths from pkg-config
- version number set in CmakeList.txt is still 2.0.1, workaround added
-------------------------------------------------------------------
Fri Feb 23 11:57:32 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %autosetup macro. Allows to eliminate the usage of deprecated
%patchN.
-------------------------------------------------------------------
Fri Nov 3 09:55:52 UTC 2023 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.0.1
* Fixup release that contains an updated debian/changelog
-------------------------------------------------------------------
Thu Nov 2 19:09:15 UTC 2023 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.0.0
* add direct sampling to rtl_sdr
* add -D direct sampling flag to rtl_tcp
* add blog v4 upconverter gpio switch
* fix rtl_tcp error on windows when hints not initialized to 0
* add rtl-sdr blog v4 support
* Fix signal handler from getting stuck in an endless loop
* lib: Stop applying workaround for libusb < 1.0.9
* lib: force wait state after cancel of usb transfer
* rtl_fm: add a new option to select 2nd direct sampling mode
* rtl_tcp: put new DEFAULT_* constants in defines
* rtl_tcp: Extracted some constants out of printf strings
* cmake: populate pkgconfig file with prefix
* Add rtl_biast as install target
* tuner_r82xx: fix short-write in r82xx_read
* Fix for CMake < 3.12.0
* Add missing rtlsdrConfig.cmake
* rtl_tcp: Initialize listensocket
* rtl_tcp: Add IPv6 support
* Use udev uaccess rules
* rtl_fm/rtl_power: Improve scanning range parsing
* Improve librtlsdr.pc file
* lib: enable better UHF reception (>862MHz) for FC0013
* set CMake policy CMP0075 if it exists
* rtl_biast: Add rtl_biast
* lib: Add GPIO version of the bias tee configuration API
* rtl_eeprom: fix warnings
* lib: disable usbfs zero-copy support by default
* lib: fix memory leak in rtlsdr_open()
* lib: Add workaround for Linux usbfs mmap() bug
- Drop not longer needed patches
* rtl-sdr-0001-mmap-bug-arm.patch
* rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
* rtl-sdr-0004-fix-rtl_eeprom-warnings.patch
* rtl-sdr-0006-add-rtl_biast.patch
* rtl-sdr-0009-fix-FC0013-UHF-reception.patch
* rtl-sdr-0010-improve-librtlsdr_pc.patch
* rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch
* rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch
* rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch
* rtl-sdr-0015-modernize-cmake-usage.patch
* rtl-sdr-0019-fix-short-write-in-r82xx_read.patch
* rtl-sdr-0021-rtl_fm-add-option-for-2nd-direct-sampling-mode.patch
* rtl-sdr-0022-add-rtl-sdr-blog-v4-support.patch
- Update patch:
* 0001-Better-udev-handling.patch
-------------------------------------------------------------------
Sat Sep 9 18:44:47 UTC 2023 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- new patch rtl-sdr-0022-add-rtl-sdr-blog-v4-support.patch adding
support for new funcionality in RTL-SDR v4 dongle (taken from git
tree)
- fix for one minor rpmlint error
-------------------------------------------------------------------
Mon Jan 31 19:06:03 UTC 2022 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- new patch rtl-sdr-0021-add-option-for-2nd-direct-sampling-mode.patch
adding extra option to rtl_fm (borrowed from git tree)
-------------------------------------------------------------------
Thu Jul 22 09:07:26 UTC 2021 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- patches:
rtl-sdr-0003-disable-zerocopy-by-default.patch
rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch
rtl-sdr-0008-add-CMP0075-policy.patch
rtl-sdr-0016-add-missing-rtlsdrConfig.patch
rtl-sdr-0017-add-rtl_biast-as-install-target.patch
rtl-sdr-0018-fix-for-older-cmake.patch
rtl-sdr-0020-populate-pkgconfig-with-prefix.patch
merged into rtl-sdr-0015-modernize-cmake-usage.patch
- patch rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch
merged into rtl-sdr-0006-add-rtl_biast.patch
-------------------------------------------------------------------
Tue Jul 6 10:55:44 UTC 2021 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- Added patches to upgrade to latest git head (only significant
changes), including:
+ rtl-sdr-0001-mmap-bug-arm.patch
+ rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
+ rtl-sdr-0003-disable-zerocopy-by-default.patch
+ rtl-sdr-0004-fix-rtl_eeprom-warnings.patch
+ rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch
+ rtl-sdr-0006-add-rtl_biast.patch
+ rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch
+ rtl-sdr-0008-add-CMP0075-policy.patch
+ rtl-sdr-0009-fix-FC0013-UHF-reception.patch
+ rtl-sdr-0010-improve-librtlsdr_pc.patch
+ rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch
+ rtl-sdr-0012-use-udev-uaccess_rules.patch (not used)
+ rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch
+ rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch
+ rtl-sdr-0015-modernize-cmake-usage.patch
+ rtl-sdr-0016-add-missing-rtlsdrConfig.patch
+ rtl-sdr-0017-add-rtl_biast-as-install-target.patch
+ rtl-sdr-0018-fix-for-older-cmake.patch
+ rtl-sdr-0019-fix-short-write-in-r82xx_read.patch
+ rtl-sdr-0020-populate-pkgconfig-with-prefix.patch
* Full bias tee support for RTL-SDR v3 dongle
* Command line utility rtl_biast for controlling bias tee
* IPV-6 support for rtl_tcp
* Fixed some bugs and compile time issues
-------------------------------------------------------------------
Tue Aug 28 08:07:53 UTC 2018 - mpluskal@suse.com
- Use more of cmake macros
- Disable developer output from cmake
-------------------------------------------------------------------
Mon Aug 27 21:14:27 UTC 2018 - mardnh@gmx.de
- Update to version 0.6.0
* Fix inline functions to use 'static inline'
* tuner_r82xx: turn off loop-through, remove dead code
* rtl_adsb: fix hanging upon a signal in Fedora 27
* lib: use USB zero-copy transfers if possible
-------------------------------------------------------------------
Sun Jun 10 02:17:13 UTC 2018 - plinnell@opensuse.org
- Update to 0.5.4
* No change log found in source or wiki
* Drop git-requirement
-------------------------------------------------------------------
Fri Dec 15 15:49:56 UTC 2017 - mpluskal@suse.com
- Update to version 0.5.3+git.20170919:
* fix for msvc14
* Add option '-T' for activating bias-T in rtl_(adsb|fm|power|tcp)
* rtl_tcp: add command for bias tee control
* lib: Use GPIO P0 to toggle an (optional) bias-t
* lib: fix direction bit in GPIO code
-------------------------------------------------------------------
Thu Jun 15 17:00:43 UTC 2017 - wk@ire.pw.edu.pl
- Update to version 0.5.3+git.20170612:
* lib: use GPIO0 to control bias tee
* rtl_(adsb|fm|power|tcp): add option -T for activating bias tee
-------------------------------------------------------------------
Sun Apr 23 17:52:05 UTC 2017 - mardnh@gmx.de
- Use package-meta for tar_scm service and add git-core
to BuildRequires
-------------------------------------------------------------------
Sun Apr 23 16:22:00 UTC 2017 - mpluskal@suse.com
- Update group handling
-------------------------------------------------------------------
Sat Apr 15 18:23:22 UTC 2017 - mardnh@gmx.de
- Add patch: 0001-Better-udev-handling.patch
- Use proper cmake options
- Use group rtlsdr in the udev-rules
-------------------------------------------------------------------
Thu Mar 23 15:19:35 UTC 2017 - jengelh@inai.de
- RPM group fix
-------------------------------------------------------------------
Mon Mar 6 14:23:52 UTC 2017 - mpluskal@suse.com
- Update to version 0.5.3+git.20161127:
* lib: change default number of transfers to 15
* rtl_tcp: make all global variables static
* cmake: include resource file for MSVC builds
* Correct return code of e4k_reg_write().
* Allow setting bandwidth for R820T
* New functions rtlsdr_set_tuner_bandwidth()
* tools: allow built-in functions for newer versions of MSVC
* lib: check for libusb init failure
* lib: add new HanfTek dongle
- Packaging changes:
* Add _service for easier updating of package
* Split udev rules to separate package
* Run spec-cleaner
-------------------------------------------------------------------
Sun Mar 5 11:02:17 UTC 2017 - mpluskal@suse.com
- Use cmake macros
-------------------------------------------------------------------
Sun Dec 4 13:58:15 UTC 2016 - dl8fcl@darc.de
- update to version 0.5.3_13_ge3e6ee2
add new HanfTek dongle
-------------------------------------------------------------------
Wed Jun 10 21:37:56 UTC 2015 - dl8fcl@darc.de
- update to version 0.5.3_12_ge3c03f7
check for libusb init failure
-------------------------------------------------------------------
Sat May 16 21:18:22 UTC 2015 - dl8fcl@darc.de
- update to version 0.5.3_10_g8b4d755
Allow setting bandwidth for R820T
-------------------------------------------------------------------
Fri Sep 5 09:19:30 UTC 2014 - dl8fcl@darc.de
- update to version 0.5.3_6_gd447a2e
-------------------------------------------------------------------
Fri Dec 20 23:02:38 UTC 2013 - dl8fcl@darc.de
- update to version 0.5.2_2_g5f38c05
-------------------------------------------------------------------
Sun Nov 3 18:53:05 UTC 2013 - lnt-sysadmin@lists.lrz.de
- Changes to spec file:
* Update udev paths for openSUSE 13.1 and ensure udev rules are
updated when package is installed / updated / uninstalled.
* Define %libname to ease reuse of %post(un) macros
-------------------------------------------------------------------
Fri Nov 1 20:04:37 UTC 2013 - dl8fcl@darc.de
- update to version 0.5.1
-------------------------------------------------------------------
Sun Sep 22 13:42:56 UTC 2013 - dl8fcl@darc.de
- update to version 0.5.0_git20130915
-------------------------------------------------------------------
Tue Jul 23 10:04:09 UTC 2013 - lnt-sysadmin@lists.lrz.de
- update to version 0.5.git
* adds support for ASUS U3100MINI_PLUS_V2
* set DETACH_KERNEL_DRIVER=ON to allow detaching of kernel driver
-------------------------------------------------------------------
Mon Jun 10 21:16:03 UTC 2013 - dl8fcl@darc.de
- update to version git20130608
minor enhancements
-------------------------------------------------------------------
Sun Apr 28 19:02:45 UTC 2013 - dl8fcl@darc.de
- update to version git20130417.
minor enhancements
-------------------------------------------------------------------
Thu Apr 11 07:27:35 UTC 2013 - lnt-sysadmin@lists.lrz.de
- small changes to the spec file:
* pass %optflags to cmake according to
http://en.opensuse.org/openSUSE:Build_system_recipes
* use config(noreplace) for udev rules file
-------------------------------------------------------------------
Fri Mar 22 22:46:08 UTC 2013 - dl8fcl@darc.de
- import into the hamradio repository

120
rtl-sdr.spec Normal file
View File

@ -0,0 +1,120 @@
#
# spec file for package rtl-sdr
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover 0
%define libname librtlsdr%{sover}
%define rtlsdr_group rtlsdr
Name: rtl-sdr
Version: 2.0.2
Release: 0
Summary: Support programs for RTL2832
License: GPL-2.0-or-later
Group: Productivity/Hamradio/Other
URL: http://sdr.osmocom.org/trac/wiki/rtl-sdr
#Git-Clone: https://git.osmocom.org/rtl-sdr
Source: https://github.com/steve-m/librtlsdr/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-Better-udev-handling.patch
BuildRequires: cmake >= 3.7.2
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(udev)
%description
Programs that controls Realtek RTL2832 based DVB dongle in raw mode, so
it can be used as a SDR receiver.
%package -n %{libname}
Summary: SDR driver for RTL2832
Group: System/Libraries
Requires: %{name}-udev
%description -n %{libname}
Library to run Realtek RTL2832 based DVB dongle as a SDR receiver.
%package udev
Summary: Udev rules for RTL2832
Group: Hardware/Other
Requires(pre): shadow
%description udev
Udev rules for rtl-sdr driver
%package devel
Summary: Development files for rtl-sdr
Group: Development/Libraries/Other
Requires: %{libname} = %{version}
%description devel
Library headers for rtl-sdr driver.
%prep
%autosetup -p1
%build
%cmake \
-DINSTALL_UDEV_RULES=ON \
-DUDEV_RULES_PATH=%{_udevrulesdir} \
-DUDEV_RULES_GROUP=%{rtlsdr_group} \
-DDETACH_KERNEL_DRIVER=ON \
-DENABLE_ZEROCOPY=ON
%cmake_build
%install
%cmake_install
rm %{buildroot}%{_libdir}/librtlsdr.a
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%pre udev
getent group %{rtlsdr_group} >/dev/null || groupadd -r %{rtlsdr_group}
%post udev
%udev_rules_update
%postun udev
%udev_rules_update
%files
%license COPYING
%doc AUTHORS README
%{_bindir}/rtl_adsb
%{_bindir}/rtl_biast
%{_bindir}/rtl_eeprom
%{_bindir}/rtl_fm
%{_bindir}/rtl_power
%{_bindir}/rtl_sdr
%{_bindir}/rtl_tcp
%{_bindir}/rtl_test
%files -n %{libname}
%{_libdir}/librtlsdr.so.*
%files udev
%{_udevrulesdir}/rtl-sdr.rules
%files devel
%{_libdir}/librtlsdr.so
%{_includedir}/rtl-sdr.h
%{_includedir}/rtl-sdr_export.h
%{_libdir}/pkgconfig/librtlsdr.pc
%{_libdir}/cmake/rtlsdr
%changelog