net-wireless/rtl-sdr: update live ebuild

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Conrad Kostecki
2025-02-23 23:16:45 +01:00
parent 7df5b971f1
commit 24b7603edd
+19 -15
View File
@@ -1,9 +1,9 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
inherit cmake udev
DESCRIPTION="Turns your Realtek RTL2832 based DVB dongle into a SDR receiver"
HOMEPAGE="https://sdr.osmocom.org/trac/wiki/rtl-sdr"
@@ -12,41 +12,45 @@ if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.osmocom.org/${PN}"
else
#COMMIT="142325a93c6ad70f851f43434acfdf75e12dfe03"
#SRC_URI="https://github.com/osmocom/rtl-sdr/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
#S="${WORKDIR}/${PN}-${COMMIT}"
SRC_URI="https://github.com/osmocom/rtl-sdr/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
LICENSE="GPL-2+"
LICENSE="GPL-2+ GPL-3+"
SLOT="0"
IUSE="+zerocopy"
DEPEND="virtual/libusb:1"
RDEPEND="${DEPEND}"
RDEPEND="virtual/libusb:1"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/rtl-sdl-0.6.0_p2020802-fix-pkgconfig-libdir.patch
"${FILESDIR}/${PN}-2.0.2-disable-static.patch"
"${FILESDIR}/${PN}-2.0.2-pkgconfig-libdir.patch"
"${FILESDIR}/${PN}-2.0.2-udev-rules-path.patch"
)
src_configure() {
#the udev rules are 666, we don't want that
local mycmakeargs=(
-DINSTALL_UDEV_RULES=OFF
-DDETACH_KERNEL_DRIVER=ON
-DDETACH_KERNEL_DRIVER="ON"
-DENABLE_ZEROCOPY="$(usex zerocopy)"
-DINSTALL_UDEV_RULES="ON"
)
cmake_src_configure
}
src_install() {
cmake_src_install
newinitd "${FILESDIR}"/rtl_tcp.initd rtl_tcp
newconfd "${FILESDIR}"/rtl_tcp.confd rtl_tcp
newinitd "${FILESDIR}"/rtl_tcp.initd-r1 rtl_tcp
newconfd "${FILESDIR}"/rtl_tcp.confd-r1 rtl_tcp
}
pkg_postinst() {
udev_reload
elog "Only users in the usb group can capture."
elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login."
}
pkg_postrm() {
udev_reload
}