summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangjiezhe2015-12-21 17:01:27 +0800
committerwangjiezhe2015-12-21 17:01:27 +0800
commitca220c4ac349c1abbae71e5dd01f1a3757b7876c (patch)
treea0799117fc6171003a1a0e9567632fb10e189e10
downloadaur-ca220c4ac349c1abbae71e5dd01f1a3757b7876c.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD45
-rw-r--r--r8168.install17
4 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..419300f57aa1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Sun Dec 20 14:11:02 UTC 2015
+pkgbase = r8168-pf
+ pkgdesc = A kernel module for Realtek 8168 network cards(pf kernel)
+ pkgver = 8.041.00
+ pkgrel = 1
+ url = http://www.realtek.com.tw
+ install = r8168.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = linux-pf-headers
+ depends = glibc
+ depends = linux-pf
+ source = r8168-8.041.00.tar.gz::https://github.com/mtorromeo/r8168/archive/8.041.00.tar.gz
+ sha256sums = d56f60e4157ccbf8f8717270b1acb391b0a959d9a96c2f0b4a91c683aa8b83a5
+
+pkgname = r8168-pf
+ depends = linux-pf>=
+ depends = linux-pf<.1
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..fde282e47d09
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+# Vim
+*~
+*.swp
+
+# Makepkg
+*.pkg.tar.xz
+*.tar.gz
+/pkg/
+/src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..de94f8cbd055
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Contributor: Bob Fanger < bfanger(at)gmail >
+# Contributor: Filip <fila pruda com>, Det < nimetonmaili(at)gmail >
+# PF ver : wangjiezhe <wangjiezhe AT yandex DOT com>
+
+_pkgname=r8168
+pkgname=r8168-pf
+pkgver=8.041.00
+pkgrel=1
+pkgdesc="A kernel module for Realtek 8168 network cards(pf kernel)"
+url="http://www.realtek.com.tw"
+license=("GPL")
+arch=('i686' 'x86_64')
+depends=('glibc' 'linux-pf')
+makedepends=('linux-pf-headers')
+install=$_pkgname.install
+source=("$_pkgname-$pkgver.tar.gz"::"https://github.com/mtorromeo/r8168/archive/$pkgver.tar.gz")
+sha256sums=('d56f60e4157ccbf8f8717270b1acb391b0a959d9a96c2f0b4a91c683aa8b83a5')
+
+build() {
+ _kernver=$(pacman -Q linux-pf | sed -r 's#.* ([0-9]+\.[0-9]+).*#\1#')
+ KERNEL_VERSION=$(cat /usr/lib/modules/extramodules-$_kernver-pf/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-pf | sed -r 's#.* ([0-9]+\.[0-9]+).*#\1#')
+ depends=("linux-pf>=$_kernver" "linux-pf<${_kernver/.*}.$(expr ${_kernver/*.} + 1)")
+ KERNEL_VERSION=$(cat /usr/lib/modules/extramodules-$_kernver-pf/version)
+ msg "Kernel = $KERNEL_VERSION"
+
+ cd "$_pkgname-$pkgver"
+ install -Dm644 src/$_pkgname.ko "$pkgdir/usr/lib/modules/extramodules-$_kernver-pf/$_pkgname.ko"
+ find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
+
+ sed -i "s|extramodules-.*-pf|extramodules-$_kernver-pf|" "$startdir/$_pkgname.install"
+}
diff --git a/r8168.install b/r8168.install
new file mode 100644
index 000000000000..169189977f62
--- /dev/null
+++ b/r8168.install
@@ -0,0 +1,17 @@
+rebuild_module_dependencies() {
+ EXTRAMODULES='extramodules-4.3-pf'
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_install() {
+ rebuild_module_dependencies
+ echo '>>> The module r8168 conflicts with r8169. You can blacklist it with:'
+ echo '>>> `echo "blacklist r8169" > /etc/modprobe.d/r8169_blacklist.conf`'
+}
+post_upgrade() {
+ rebuild_module_dependencies
+}
+
+post_remove() {
+ rebuild_module_dependencies
+}