summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 39f6ef5e0061185d63a1ed48f255c3114b873909 (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
45
46
# Maintainer: Victor Golovanenko <drygdryg2014 (at) yandex (d0t) com>

_pkgname=8188eu
_pkgver=5.3.9
pkgname=8188eu-aircrack-dkms-git
pkgver=5.3.9.r196.3fae723
pkgrel=4
pkgdesc="Realtek RTL8188EUS and RTL8188ETV Wi-Fi driver with monitor mode & frame injection support"
arch=('x86_64' 'i686' 'pentium4' 'aarch64')
url="https://github.com/aircrack-ng/rtl8188eus"
license=('GPL')
depends=('dkms')
makedepends=('git')
provides=('8188eu-dkms')
conflicts=('8188eu-dkms' '8188eu-dkms-git')
source=("${_pkgname}::git+${url}#branch=v${_pkgver}"
	'https://github.com/aircrack-ng/rtl8188eus/pull/275.patch'
        'blacklist-r8188eu.conf')
md5sums=('SKIP'
         '3e2686afdd8e48e461562ece0825a8ed'
         '8af5df9ed717b3bb48df59dac0c8a9c8')

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

prepare() {
	patch -p1 -d $srcdir/8188eu/ < 275.patch
}

package() {
	# Blacklist in-kernel r8188eu
	install -Dm644 blacklist-r8188eu.conf "${pkgdir}/etc/modprobe.d/r8188eu.conf"

	cd "${_pkgname}"
	local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"
	install -Dm644 dkms.conf "${install_dir}/dkms.conf"
	for d in "core" "hal" "include" "os_dep" "platform"; do
		for f in $(find "$d" -type f); do
	    	install -Dm644 "$f" "${install_dir}/$f"
		done
	done

	install -m644 "Makefile" "${install_dir}/Makefile"
}