Skip to contentSkip to conversation

librtlsdr: new package

PATCH Superseded Jason Pruitt 2 participants 2 messages Apr 22, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 librtlsdr: new package

librtlsdr is a library and software for using a Realtek RTL2832U based DVB-T dongle as a cheap SDR.

---
Changes v1 -> v2:
- Added help to option (suggested by Thomas De Schampheleire)
- Added _LICENSE_FILE (suggested by Thomas De Schampheleire)
- Auto select udev rules (suggested by Thomas Petazzoni)

 package/Config.in              |    1 +
 package/librtlsdr/Config.in    |   22 ++++++++++++++++++++++
 package/librtlsdr/librtlsdr.mk |   22 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/librtlsdr/Config.in
 create mode 100644 package/librtlsdr/librtlsdr.mk
package/Config.in +1 -0
index 07fd166..ad3956d 100644
@@ -628,6 +628,7 @@ source "package/libmbim/Config.in"
 source "package/libnfc/Config.in"
 source "package/libqmi/Config.in"
 source "package/libraw1394/Config.in"
+source "package/librtlsdr/Config.in"
 source "package/libserial/Config.in"
 source "package/libsoc/Config.in"
 source "package/libusb/Config.in"
package/librtlsdr/Config.in new file +22 -0
new file mode 100644
index 0000000..efe2b9e
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_LIBRTLSDR
+	bool "librtlsdr"
+	select BR2_PACKAGE_LIBUSB
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  Library and command line programs for accessing
+	  RTL2832U SDR dongles.
+
+	  http://sdr.osmocom.org/trac/wiki/rtl-sdr/
+
+if BR2_PACKAGE_LIBRTLSDR
+
+config BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER
+	bool "Detach driver if loaded"
+	default y
+    help
+        Detach associated kernel driver on startup if
+        if one is loaded.
+endif
+
+comment "librtlsdr needs a toolchain w/ threads"
+depends on !BR2_TOOLCHAIN_HAS_THREADS
package/librtlsdr/librtlsdr.mk new file +22 -0
new file mode 100644
index 0000000..0b88a34
@@ -0,0 +1,22 @@
+##########################################################################
+#
+# librtlsdr
+#
+##########################################################################
+
+LIBRTLSDR_VERSION = v0.5.3
+LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION))
+LIBRTLSDR_LICENSE = GPLv2
+LIBRTLSDR_LICENSE_FILES = COPYING
+LIBRTLSDR_INSTALL_STAGING = YES
+LIBRTLSDR_DEPENDENCIES = libusb
+
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+LIBRTLSDR_CONF_OPT += -DINSTALL_UDEV_RULES=ON
+endif
+
+ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y)
+LIBRTLSDR_CONF_OPT += -DDETACH_KERNEL_DRIVER=1
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 1/1 librtlsdr: new package

Hi Jason,

Quoted 44 lines · Jason Pruitt

librtlsdr is a library and software for using a Realtek RTL2832U based DVB-T dongle as a cheap SDR.

---
Changes v1 -> v2:
- Added help to option (suggested by Thomas De Schampheleire)
- Added _LICENSE_FILE (suggested by Thomas De Schampheleire)
- Auto select udev rules (suggested by Thomas Petazzoni)

 package/Config.in              |    1 +
 package/librtlsdr/Config.in    |   22 ++++++++++++++++++++++
 package/librtlsdr/librtlsdr.mk |   22 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 package/librtlsdr/Config.in
 create mode 100644 package/librtlsdr/librtlsdr.mk
package/Config.in +1 -0
index 07fd166..ad3956d 100644
@@ -628,6 +628,7 @@ source "package/libmbim/Config.in"
 source "package/libnfc/Config.in"
 source "package/libqmi/Config.in"
 source "package/libraw1394/Config.in"
+source "package/librtlsdr/Config.in"
 source "package/libserial/Config.in"
 source "package/libsoc/Config.in"
 source "package/libusb/Config.in"
package/librtlsdr/Config.in new file +9 -0
new file mode 100644
index 0000000..efe2b9e
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_LIBRTLSDR
+       bool "librtlsdr"
+       select BR2_PACKAGE_LIBUSB
+       depends on BR2_TOOLCHAIN_HAS_THREADS
+       help
+         Library and command line programs for accessing
+         RTL2832U SDR dongles.
+
+         http://sdr.osmocom.org/trac/wiki/rtl-sdr/

package/librtlsdr/Config.in line 19

Quoted 10 lines
package/librtlsdr/Config.in new file +10 -0
+
+if BR2_PACKAGE_LIBRTLSDR
+
+config BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER
+       bool "Detach driver if loaded"
+       default y
+    help
+        Detach associated kernel driver on startup if
+        if one is loaded.
+endif

The indentation here is not correct. You did it right on the main option though...

package/librtlsdr/Config.in line 22

Quoted 3 lines
package/librtlsdr/Config.in new file +3 -0
+
+comment "librtlsdr needs a toolchain w/ threads"
+depends on !BR2_TOOLCHAIN_HAS_THREADS

Here the 'depends on' statement should be indented too.

Best regards,
Thomas