Date: Friday, December 29, 2017 @ 21:26:20
  Author: heftig
Revision: 276903

archrelease: copy trunk to community-staging-x86_64

Added:
  r8168/repos/community-staging-x86_64/
  r8168/repos/community-staging-x86_64/PKGBUILD
    (from rev 276902, r8168/trunk/PKGBUILD)
  r8168/repos/community-staging-x86_64/linux-4.11.patch
    (from rev 276902, r8168/trunk/linux-4.11.patch)

------------------+
 PKGBUILD         |   42 ++++++++++++++++++++++++++++++++++++++++++
 linux-4.11.patch |   14 ++++++++++++++
 2 files changed, 56 insertions(+)

Copied: r8168/repos/community-staging-x86_64/PKGBUILD (from rev 276902, 
r8168/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2017-12-29 21:26:20 UTC (rev 276903)
@@ -0,0 +1,42 @@
+# $Id$
+# 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.045.08
+pkgrel=19
+pkgdesc="A kernel module for Realtek 8168 network cards"
+url="http://www.realtek.com.tw";
+license=("GPL")
+arch=('x86_64')
+depends=('glibc' 'linux')
+makedepends=('linux-headers')
+source=(https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz)
+sha256sums=('18161cb72fc872a9aed194514f7b8fb8b255b6fa6ed3d2dd459700eaad575f31')
+
+build() {
+       _kernver=$(pacman -Q linux | sed -r 's#.* ([0-9]+\.[0-9]+).*#\1#')
+       KERNEL_VERSION=$(cat 
/usr/lib/modules/extramodules-$_kernver-ARCH/version)
+       msg2 "Kernel = $KERNEL_VERSION"
+
+       cd "$pkgname-$pkgver"
+       # avoid using the Makefile directly -- it doesn't understand
+       # any kernel but the current.
+       make -C /usr/lib/modules/$KERNEL_VERSION/build \
+                       SUBDIRS="$srcdir/$pkgname-$pkgver/src" \
+                       EXTRA_CFLAGS="-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN" \
+                       modules
+}
+
+package() {
+       _kernver=$(pacman -Q linux | sed -r 's#.* ([0-9]+\.[0-9]+).*#\1#')
+       depends=("linux>=$_kernver" "linux<${_kernver/.*}.$(expr ${_kernver/*.} 
+ 1)")
+
+       cd "$pkgname-$pkgver"
+       install -Dt "$pkgdir/usr/lib/modules/extramodules-$_kernver-ARCH" -m644 
src/r8168.ko
+       find "$pkgdir" -name '*.ko' -exec gzip -n {} +
+
+       echo "blacklist r8169" | \
+               install -Dm644 /dev/stdin 
"$pkgdir/usr/lib/modprobe.d/r8168.conf"
+}

Copied: r8168/repos/community-staging-x86_64/linux-4.11.patch (from rev 276902, 
r8168/trunk/linux-4.11.patch)
===================================================================
--- community-staging-x86_64/linux-4.11.patch                           (rev 0)
+++ community-staging-x86_64/linux-4.11.patch   2017-12-29 21:26:20 UTC (rev 
276903)
@@ -0,0 +1,14 @@
+diff --git a/src/r8168_n.c b/src/r8168_n.c
+index 3c5a7e7..e2026bb 100755
+--- a/src/r8168_n.c
++++ b/src/r8168_n.c
+@@ -25732,7 +25732,9 @@ process_pkt:
+                         if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0)
+                                 rtl8168_rx_skb(tp, skb);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+                         dev->last_rx = jiffies;
++#endif
+                         RTLDEV->stats.rx_bytes += pkt_size;
+                         RTLDEV->stats.rx_packets++;
+                 }

Reply via email to