summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4aa09bc93106d918a37b8877017dd70806d9e11f (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
# Maintainer: Nachoc <nachohc89 at gmail dot com>

_pkgbase=8192eu
pkgname=8192eu-dkms-git
pkgver=r293.f2fc8af
pkgrel=1
pkgdesc="Driver for the Realtek 8192eu chipset (DKMS)"
arch=('x86_64' 'i686' 'armv7h')
url="https://github.com/Mange/rtl8192eu-linux-driver"
license=('GPL')
depends=('dkms')
makedepends=('git')
provides=('rtl8192eu' '8192eu-dkms')
conflicts=('8192eu-dkms')
source=("$_pkgbase::git+https://github.com/Mange/rtl8192eu-linux-driver.git#branch=realtek-4.4.x")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgbase"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$_pkgbase"
  sed -E \
    -e "s/^PACKAGE_NAME=.*$/PACKAGE_NAME=${_pkgbase}/" \
    -e "s/^PACKAGE_VERSION=.*$/PACKAGE_VERSION=${pkgver}/" \
    -e "s/(make'? )/\1${MAKEFLAGS} /g" \
    -e "s/^REMAKE_INITRD=.*$//" \
    -i dkms.conf
}

package() {
  cd "$srcdir/$_pkgbase"
  install -dm755 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}
  cp -r ${srcdir}/${_pkgbase}/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
}