Gentoo Archives: gentoo-commits

From: Piotr Karbowski <slashbeast@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/realtek-r8152/
Date: Tue, 04 May 2021 20:46:17
Message-Id: 1620161171.f7616a54786c4e6034eee288d9b57c5c434d5410.slashbeast@gentoo
1 commit: f7616a54786c4e6034eee288d9b57c5c434d5410
2 Author: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 4 20:44:47 2021 +0000
4 Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 20:46:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7616a54
7
8 net-misc/realtek-r8152: 2.15.0 version bump.
9
10 Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>
11
12 net-misc/realtek-r8152/Manifest | 1 +
13 net-misc/realtek-r8152/realtek-r8152-2.15.0.ebuild | 59 ++++++++++++++++++++++
14 2 files changed, 60 insertions(+)
15
16 diff --git a/net-misc/realtek-r8152/Manifest b/net-misc/realtek-r8152/Manifest
17 index b29e20ede11..6827d73dcf8 100644
18 --- a/net-misc/realtek-r8152/Manifest
19 +++ b/net-misc/realtek-r8152/Manifest
20 @@ -1 +1,2 @@
21 DIST realtek-r8152-2.14.0.tar.gz 88356 BLAKE2B c530080cab5e6f7433aa6452e3c5f1f19f14c2ac473751958d85efa5553d2b2889d80cc47c2ad4064ad5673008df97dce197254f445c5fc7ae3905c7833e1641 SHA512 2908e9963b6bec9d638514e6a54ab8bca0b56c4866245f476889e4c8462c36f2bece86abac2e5ece9aee1776f00f7d4a67fd5561d830a67e02e386d79aba07dd
22 +DIST realtek-r8152-2.15.0.tar.gz 93420 BLAKE2B 24b7a71adfddde3ff2ecc8c0b92d51f50202dada31a2f86a19d518f37814dd52d7ca5ffb5f81f07c7a92436f4fef53c8538a64d6bc5afbb0b6b7ccbace0a7923 SHA512 b46012d6e9c48ebb0eb0b7387933977bc56df7a9e010f0707907719e833a8f409d5af55ef84ebb0d54de89239e69697b6995c75e194ef7d0fa2c371d5fc362ba
23
24 diff --git a/net-misc/realtek-r8152/realtek-r8152-2.15.0.ebuild b/net-misc/realtek-r8152/realtek-r8152-2.15.0.ebuild
25 new file mode 100644
26 index 00000000000..ac2d53b76ca
27 --- /dev/null
28 +++ b/net-misc/realtek-r8152/realtek-r8152-2.15.0.ebuild
29 @@ -0,0 +1,59 @@
30 +# Copyright 2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit linux-mod linux-info udev
36 +
37 +SRC_URI="https://github.com/slashbeast/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
38 +KEYWORDS="~amd64 ~x86"
39 +
40 +DESCRIPTION="Out-of-tree driver for Realtek's 2.5 GbE USB NICs."
41 +HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software"
42 +
43 +SLOT="0"
44 +LICENSE="GPL-2"
45 +IUSE=""
46 +
47 +DEPEND="
48 + virtual/linux-sources
49 + sys-kernel/linux-headers
50 +"
51 +RDEPEND=""
52 +
53 +MODULE_NAMES="r8152(net/usb)"
54 +
55 +pkg_setup() {
56 + linux_config_exists
57 +
58 + for module in USB_USBNET USB_NET_CDC_NCM USB_NET_CDCETHER; do
59 + linux_chkconfig_module "${module}" || ewarn "CONFIG_${module} needs to be built as module (builtin doesn't work)"
60 + done
61 +
62 + linux_chkconfig_present MII || ewarn "CONFIG_MII needs to be built as module or builtin into the kernel"
63 +
64 + linux_chkconfig_present USB_RTL8152 && ewarn "CONFIG_USB_RTL8152 must NOT be enabled in the kernel!"
65 +
66 + linux-mod_pkg_setup
67 +
68 + BUILD_TARGETS="modules"
69 + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERNELDIR=${KERNEL_DIR}"
70 +}
71 +
72 +src_install() {
73 + linux-mod_src_install
74 +
75 + udev_newrules 50-usb-realtek-net.rules 50-usb-realtek-net.rules
76 +}
77 +
78 +pkg_postinst() {
79 + linux-mod_pkg_postinst
80 + udev_reload
81 +
82 + echo
83 + elog "If the cdc_ncm was loaded before this r8152 driver, one might get a flood"
84 + elog "of 'usbN: network connection: disconnected' in kernel log."
85 + elog "In that case one needs to unload r8152, cdc_ether and cdc_ncm modules and"
86 + elog "let udev load them in right order or manually load r8152."
87 + echo
88 +}