mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] librtlsdr: New package. Version 0.8
Date: Thu, 11 Nov 2021 10:52:48 +0100	[thread overview]
Message-ID: <20211111095249.1873275-1-christian.melki@t2data.com> (raw)

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


             reply	other threads:[~2021-11-11  9:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  9:52 Christian Melki [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211111095249.1873275-1-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox