Date: Monday, December 12, 2022 @ 00:59:20
  Author: heftig
Revision: 1358788

archrelease: copy trunk to community-testing-x86_64

Added:
  r8168/repos/community-testing-x86_64/
  r8168/repos/community-testing-x86_64/0001-Linux-6.1.patch
    (from rev 1358784, r8168/trunk/0001-Linux-6.1.patch)
  r8168/repos/community-testing-x86_64/PKGBUILD
    (from rev 1358784, r8168/trunk/PKGBUILD)
  r8168/repos/community-testing-x86_64/keys/

----------------------+
 0001-Linux-6.1.patch |   25 +++++++++++++++++++++++
 PKGBUILD             |   53 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)

Copied: r8168/repos/community-testing-x86_64/0001-Linux-6.1.patch (from rev 
1358784, r8168/trunk/0001-Linux-6.1.patch)
===================================================================
--- community-testing-x86_64/0001-Linux-6.1.patch                               
(rev 0)
+++ community-testing-x86_64/0001-Linux-6.1.patch       2022-12-12 00:59:20 UTC 
(rev 1358788)
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <hef...@archlinux.org>
+Date: Mon, 12 Dec 2022 00:44:23 +0000
+Subject: [PATCH] Linux 6.1
+
+---
+ src/r8168.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/r8168.h b/src/r8168.h
+index 511c648a6c05..62393f414aa9 100755
+--- a/src/r8168.h
++++ b/src/r8168.h
+@@ -566,7 +566,11 @@ typedef int *napi_budget;
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   
netif_napi_add_weight(ndev, &priv->napi, function, weight)
++#else
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, 
&priv->napi, function, weight)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev)            min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct)        container_of(stuct_ptr, 
priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr)            struct net_device *dev = 
priv_ptr->dev;

Copied: r8168/repos/community-testing-x86_64/PKGBUILD (from rev 1358784, 
r8168/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD                           (rev 0)
+++ community-testing-x86_64/PKGBUILD   2022-12-12 00:59:20 UTC (rev 1358788)
@@ -0,0 +1,53 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torro...@gmail.com>
+# Contributor: Bob Fanger < bfanger(at)gmail >
+# Contributor: Filip <fila pruda com>, Det < nimetonmaili(at)gmail >
+
+pkgname=r8168
+pkgver=8.051.02
+pkgrel=4
+pkgdesc="A kernel module for Realtek 8168 network cards"
+url="http://www.realtek.com.tw";
+license=("GPL")
+arch=('x86_64')
+makedepends=('linux-headers')
+source=(https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz
+        
https://github.com/mtorromeo/r8168/releases/download/$pkgver/$pkgname-$pkgver.tar.gz.asc
+        0001-Linux-6.1.patch)
+sha256sums=('76f1c6f0b273d6a31bdb3e98c39a54f50a65766b99d485f9b4ddeda30dcd11d8'
+            'SKIP'
+            'd178c927b2619b4f5013ab965168b3f9ddc67e7cf4b32a0edca5906739032393')
+validpgpkeys=('0CADAACF70F64C654E131B3111675C743429DDEF') # Massimiliano 
Torromeo <massimiliano.torro...@gmail.com>
+
+prepare() {
+       cd "$pkgname-$pkgver"
+       patch -Np1 -i ../0001-Linux-6.1.patch
+}
+
+build() {
+       cd "$pkgname-$pkgver"
+       # avoid using the Makefile directly -- it doesn't understand
+       # any kernel but the current.
+       make -C /usr/src/linux M="$PWD/src" \
+               ENABLE_USE_FIRMWARE_FILE=y \
+               CONFIG_R8168_NAPI=y \
+               CONFIG_R8168_VLAN=y \
+               CONFIG_ASPM=y \
+               ENABLE_S5WOL=y \
+               ENABLE_EEE=y \
+               modules
+}
+
+package() {
+       depends=('glibc' 'linux')
+
+       local extradir=/usr/lib/modules/$(</usr/src/linux/version)/extramodules
+       cd "$pkgname-$pkgver"
+       install -Dt "$pkgdir$extradir" -m644 src/*.ko
+       find "$pkgdir" -name '*.ko' -exec strip --strip-debug {} +
+       find "$pkgdir" -name '*.ko' -exec xz {} +
+
+       echo "blacklist r8169" | \
+               install -Dm644 /dev/stdin 
"$pkgdir/usr/lib/modprobe.d/$pkgname.conf"
+}
+
+# vim:set sw=0 noet:

Reply via email to