summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2022-12-20 22:59:15 +0100
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2022-12-20 22:59:15 +0100
commit18f090cc775983273b2a98a721dc16c79fc7e5bb (patch)
tree65422992336dae83fed1c19c26335bf543071b4b /net-wireless
parentdev-ada/aws: add 23.0.0 (diff)
downloadgentoo-18f090cc775983273b2a98a721dc16c79fc7e5bb.tar.gz
gentoo-18f090cc775983273b2a98a721dc16c79fc7e5bb.tar.bz2
gentoo-18f090cc775983273b2a98a721dc16c79fc7e5bb.zip
net-wireless/rtl-sdr: add 0.6.0_p20221217 and sync live ebuild
Signed-off-by: Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/rtl-sdr/Manifest1
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-0.6.0_p20221217.ebuild62
-rw-r--r--net-wireless/rtl-sdr/rtl-sdr-9999.ebuild4
3 files changed, 65 insertions, 2 deletions
diff --git a/net-wireless/rtl-sdr/Manifest b/net-wireless/rtl-sdr/Manifest
index e4cb6db4b4ff..175021ba6533 100644
--- a/net-wireless/rtl-sdr/Manifest
+++ b/net-wireless/rtl-sdr/Manifest
@@ -1 +1,2 @@
DIST rtl-sdr-0.6.0_p2020802.tar.gz 134107 BLAKE2B 18ff8fe93a0dfaa20614924c7f951b2e7ffbccb4e5a2ebb6af698321ceaeba5012e6b88be03c7ff4c7b5cd45ec8df2baaa4ae55b813cdf448d895877a6757f47 SHA512 355af98a887a978794b562aa8ef78c91d19c33a6d0eb5740eb3a9b1e1329f8b11ca688eebc81a2d61440972ba5121225205de7165a22882a7e32cf6608888f25
+DIST rtl-sdr-0.6.0_p20221217.tar.gz 134261 BLAKE2B 1148e0aeaba67dda5545b2bcd18a806047eeea9573578e1a3111b08abea481e2649ef68ab6ccd9e69603798b0003cc63efb3c5f6184acfd021dd223688402d56 SHA512 e80bae2405aaa4c6c943f5df7afc96ea02cd5861b0348d33e567000bde0a3aa79ab2204311bde6094a4b8037d11eb14ca0f91f8dbd339c339aae2581c0a78652
diff --git a/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p20221217.ebuild b/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p20221217.ebuild
new file mode 100644
index 000000000000..9077e7f0dbe7
--- /dev/null
+++ b/net-wireless/rtl-sdr/rtl-sdr-0.6.0_p20221217.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Turns your Realtek RTL2832 based DVB dongle into a SDR receiver"
+HOMEPAGE="https://sdr.osmocom.org/trac/wiki/rtl-sdr"
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="https://git.osmocom.org/${PN}"
+else
+ #git clone https://git.osmocom.org/rtl-sdr
+ #cd rtl-sdr
+ #git archive --format=tar --prefix=rtl-sdr-${PV}/ master | xz > ../rtl-sdr-${PV}.tar.xz
+ #SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+
+ COMMIT="142325a93c6ad70f851f43434acfdf75e12dfe03"
+ SRC_URI="https://github.com/osmocom/rtl-sdr/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${COMMIT}"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+zerocopy"
+
+DEPEND="virtual/libusb:1"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch
+)
+
+src_prepare() {
+ sed -i 's#VERSION_INFO_PATCH_VERSION git#VERSION_INFO_PATCH_VERSION 0_p20221217#' CMakeLists.txt
+ cmake_src_prepare
+}
+
+src_configure() {
+ #the udev rules are 666, we don't want that
+ mycmakeargs=(
+ -DINSTALL_UDEV_RULES=OFF
+ -DDETACH_KERNEL_DRIVER=ON
+ -DENABLE_ZEROCOPY="$(usex zerocopy)"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ newinitd "${FILESDIR}"/rtl_tcp.initd rtl_tcp
+ newconfd "${FILESDIR}"/rtl_tcp.confd rtl_tcp
+}
+
+pkg_postinst() {
+ elog "Only users in the usb group can capture."
+ elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login."
+}
diff --git a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild
index b00901863baa..9077e7f0dbe7 100644
--- a/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild
+++ b/net-wireless/rtl-sdr/rtl-sdr-9999.ebuild
@@ -18,7 +18,7 @@ else
#git archive --format=tar --prefix=rtl-sdr-${PV}/ master | xz > ../rtl-sdr-${PV}.tar.xz
#SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
- COMMIT="ed0317e6a58c098874ac58b769cf2e609c18d9a5"
+ COMMIT="142325a93c6ad70f851f43434acfdf75e12dfe03"
SRC_URI="https://github.com/osmocom/rtl-sdr/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
@@ -36,7 +36,7 @@ PATCHES=(
)
src_prepare() {
- sed -i 's#VERSION_INFO_PATCH_VERSION git#VERSION_INFO_PATCH_VERSION 0_p20200802#' CMakeLists.txt
+ sed -i 's#VERSION_INFO_PATCH_VERSION git#VERSION_INFO_PATCH_VERSION 0_p20221217#' CMakeLists.txt
cmake_src_prepare
}