summaryrefslogtreecommitdiff
path: root/net-misc/r8152/r8152-2.16.3-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
commitb0ebd12de22226fd7b69140ccd700efda3eb5fa6 (patch)
treeefcf8d59607e53b8bf2fb453629b05bea28cc3ce /net-misc/r8152/r8152-2.16.3-r1.ebuild
parent99547b97ff461f107e03ed5323b6286a66677bce (diff)
gentoo auto-resync : 03:08:2023 - 22:54:30
Diffstat (limited to 'net-misc/r8152/r8152-2.16.3-r1.ebuild')
-rw-r--r--net-misc/r8152/r8152-2.16.3-r1.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/net-misc/r8152/r8152-2.16.3-r1.ebuild b/net-misc/r8152/r8152-2.16.3-r1.ebuild
new file mode 100644
index 000000000000..aeaed97ff0a8
--- /dev/null
+++ b/net-misc/r8152/r8152-2.16.3-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1 udev
+
+DESCRIPTION="r8152 driver for Realtek USB FE / GBE / 2.5G Gaming Ethernet Family Controller"
+HOMEPAGE="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software"
+SRC_URI="http://rtitwww.realtek.com/rtdrivers/cn/nic1/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="virtual/udev"
+DEPEND="${RDEPEND}"
+
+IUSE="+center-tap-short"
+
+# https://github.com/wget/realtek-r8152-linux/ keeps reasonably up to date
+# with kernel support patches. It appears to be used by the AUR maintainer.
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.16.3-kernel-5.19-fix.patch
+ "${FILESDIR}"/${PN}-2.16.3-kernel-6.1-fix.patch
+ "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch
+)
+
+src_compile() {
+ local modlist=( ${PN}=kernel/net/usb:. )
+ local modargs=(
+ KERNELDIR="${KV_OUT_DIR}"
+ CONFIG_CTAP_SHORT="$(usex center-tap-short on off)"
+ )
+
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+ udev_dorules 50-usb-realtek-net.rules
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+}
+
+pkg_postrm() {
+ linux-mod-r1_pkg_postrm
+ udev_reload
+}