mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] librtlsdr: New package. Version 0.8
@ 2021-11-11  9:52 Christian Melki
  2021-11-11  9:52 ` [ptxdist] [PATCH] dump1090fa: New package. Version 6.1 Christian Melki
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Melki @ 2021-11-11  9:52 UTC (permalink / raw)
  To: ptxdist

librtlsdr is a library for using RealTek DVB-T receivers as
SDR (Software Defined Radio). This library is used by various
tools to tune into bands and decode radio data.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/librtlsdr.in   | 29 ++++++++++++++++++++
 rules/librtlsdr.make | 64 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100644 rules/librtlsdr.in
 create mode 100644 rules/librtlsdr.make

diff --git a/rules/librtlsdr.in b/rules/librtlsdr.in
new file mode 100644
index 000000000..6f53ee7bb
--- /dev/null
+++ b/rules/librtlsdr.in
@@ -0,0 +1,29 @@
+## SECTION=system_libraries
+
+menuconfig LIBRTLSDR
+	tristate
+	prompt "librtlsdr		      "
+	select HOST_CMAKE
+	select LIBUSB
+	help
+	  Realtek SDR (Software Defined Radio) library.
+
+if LIBRTLSDR
+
+comment "Install options   ---"
+
+config LIBRTLSDR_TOOLS
+	bool
+	default y
+	prompt "Install tools		  "
+	help
+	  Installs rtl-sdr tools.
+
+config LIBRTLSDR_UDEV
+	bool
+	default y
+	prompt "Install udev rules	  "
+	help
+	  Installs udev rules.
+
+endif
diff --git a/rules/librtlsdr.make b/rules/librtlsdr.make
new file mode 100644
index 000000000..da17dc05a
--- /dev/null
+++ b/rules/librtlsdr.make
@@ -0,0 +1,64 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Christian Melki <christian.melki@t2data.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBRTLSDR) += librtlsdr
+
+#
+# Paths and names
+#
+LIBRTLSDR_VERSION	:= 0.8.0
+LIBRTLSDR_MD5		:= 64f31f30f79cd91e4cd70b0a8edcff4e
+LIBRTLSDR		:= librtlsdr-$(LIBRTLSDR_VERSION)
+LIBRTLSDR_SUFFIX	:= tar.gz
+LIBRTLSDR_URL		:= https://github.com/librtlsdr/librtlsdr/archive/refs/tags/v$(LIBRTLSDR_VERSION).$(LIBRTLSDR_SUFFIX)
+LIBRTLSDR_SOURCE	:= $(SRCDIR)/$(LIBRTLSDR).$(LIBRTLSDR_SUFFIX)
+LIBRTLSDR_DIR		:= $(BUILDDIR)/$(LIBRTLSDR)
+LIBRTLSDR_LICENSE	:= GPL-2.0-only
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBRTLSDR_CONF_TOOL := cmake
+LIBRTLSDR_CONF_OPT := \
+	$(CROSS_CMAKE_USR) \
+	-DCMAKE_INSTALL_LIBDIR=/usr/$(CROSS_LIB_DIR) \
+	-DLIB_INSTALL_DIR=/usr/$(CROSS_LIB_DIR) \
+	-DENABLE_SHARED=ON \
+	-DINSTALL_UDEV_RULES=ON
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/librtlsdr.targetinstall:
+	@$(call targetinfo)
+	@$(call install_init, librtlsdr)
+	@$(call install_fixup, librtlsdr,PRIORITY,optional)
+	@$(call install_fixup, librtlsdr,SECTION,base)
+	@$(call install_fixup, librtlsdr,AUTHOR,"Christian Melki <christian.melki@t2data.com>")
+	@$(call install_fixup, librtlsdr,DESCRIPTION,missing)
+	@$(call install_lib, librtlsdr, 0, 0, 0644, librtlsdr)
+
+ifdef PTXCONF_LIBRTLSDR_TOOLS
+	@$(call install_glob, librtlsdr, 0, 0, -, /usr/bin, *rtl_*,)
+endif
+
+ifdef PTXCONF_LIBRTLSDR_UDEV
+	@$(call install_copy, librtlsdr, 0, 0, 0644, \
+		$(LIBRTLSDR_PKGDIR)/etc/udev/rules.d/rtl-sdr.rules, \
+		/usr/lib/udev/rules.d/81-rtl-sdr.rules)
+endif
+
+	@$(call install_finish, librtlsdr)
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-16  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  9:52 [ptxdist] [PATCH] librtlsdr: New package. Version 0.8 Christian Melki
2021-11-11  9:52 ` [ptxdist] [PATCH] dump1090fa: New package. Version 6.1 Christian Melki
2021-11-12  9:08   ` Michael Olbrich
2021-11-16  9:44   ` Roland Hieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox