summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4bb6383bc8e2a436f3bb9217f6ef6ee634b407ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Jonpas <jonpas33@gmail.com>
# Contributor: M4rQu1Nh0S

_pkgbase=r8168
pkgname=${_pkgbase}-8136
pkgver=8.052.01
pkgrel=1
pkgdesc="A kernel module for Realtek 8168 network cards (DKMS version) for Device ID 0x8136."
url="https://github.com/mtorromeo/r8168"
license=("GPL")
arch=('i686' 'x86_64')
depends=('glibc' 'dkms' 'linux-headers')
makedepends=('git')
conflicts=("${_pkgbase}")
provides=("${_pkgbase}")
source=("r8168-8136::git+https://github.com/mtorromeo/r8168.git"
        "dkms.conf"
        "8136.patch"
        "kernel68.patch")
sha256sums=('SKIP'
            'd37b8acbd4fe06f81538581712a04751a96fc37bad3a4bd3ae8329f8744c49b3'
            'f203ed455d17f03c964b8bb91d9d7da6c33d8494c0b47ecf3096bde16e95b310'
            'a834e3e43745a737ca211c3eb550d369bf1894211e7584717f87b781246fb2d1')
install=r8168-dkms.install

prepare() {
  cd "$pkgname"
  patch -Np1 -i '../8136.patch'
  patch -Np1 -i '../kernel68.patch'
}

package() {
  install -Dm644 dkms.conf "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"

  sed -e "s/@PKGNAME@/${_pkgbase}/g" \
      -e "s/@PKGVER@/${pkgver}/g" \
      -i "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"

  cd "${pkgname}"
  cp -dr --no-preserve='ownership' src "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/src"

  echo "blacklist r8169" | \
    install -Dm644 /dev/stdin "$pkgdir/usr/lib/modprobe.d/$pkgname.conf"
}