blob: 14938fcf684ed125b5d832388238d588466f73fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake udev
DESCRIPTION="Modified Osmocom drivers with enhancements for RTL-SDR Blog V3 and V4 units"
HOMEPAGE="https://github.com/rtlsdrblog/rtl-sdr-blog"
SRC_URI="https://github.com/rtlsdrblog/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="GPL-2+ GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="+zerocopy"
DEPEND="virtual/libusb:1"
RDEPEND="
${DEPEND}
!net-wireless/rtl-sdr
"
PATCHES=(
"${FILESDIR}/${PN}-1.3.6-disable-static.patch"
"${FILESDIR}/${PN}-1.3.6-pkgconfig-libdir.patch"
"${FILESDIR}/${PN}-1.3.6-udev-rules-path.patch"
)
src_prepare() {
cmake_src_prepare
# Set proper so file version name
sed -e '/VERSION_INFO_PATCH_VERSION/ s/git/0/g' -i CMakeLists.txt || die
}
src_configure() {
local mycmakeargs=(
-DCVF_VERSION="${PV}"
-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
}
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
}
|