aboutsummaryrefslogtreecommitdiffstats
path: root/community/rtl8821ce-lts/APKBUILD
blob: 4e8688ccb9ff6336115b8ddd7ed0d522788b4a1d (plain) (blame)
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
47
48
49
50
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>

_kver=5.10.63
_krel=0
_flavor="$FLAVOR"
[ -z "$_flavor" ] && _flavor=lts

_commit=7cda52ecb1486bc51139d6436d50d614c647897b
_rel=0
_kpkg=linux-$_flavor

pkgname="rtl8821ce-lts"
pkgver="$_kver"
pkgrel=$((_krel + _rel))
pkgdesc="Wifi drivers for Realtek 8821ce"
url="https://github.com/tomaspinho/rtl8821ce"
arch="x86_64 x86" # Only builds on these platforms
license="GPL-2.0-only"
makedepends="linux-lts-dev"
options="!check"
source="$pkgname-$_commit.tar.gz::https://github.com/tomaspinho/rtl8821ce/archive/$_commit.tar.gz"
builddir="$srcdir/rtl8821ce-$_commit"

prepare() {
	default_prepare

	if [ -z "$FLAVOR" ]; then
		(
			. "$startdir"/../../main/linux-$_flavor/APKBUILD
			[ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
			[ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
			return 0
		)
	fi
}

build() {
	make KVER=$_kver-$_krel-$_flavor \
		MODULES_DIR="/lib/modules/$_kver-$_krel-$_flavor"
}

package() {
	install -Dm0644 8821ce.ko \
		"$pkgdir"/lib/modules/$_kver-$_krel-$_flavor/extra/8821ce.ko
}

sha512sums="
86433347155dc88c4f9cb0a5608847b3ce81180e5dd9953e6e26ce5f259a0daaec7de445733eea4d3366283585407462ead70c53a46a79b93968cf1b065d8533  rtl8821ce-lts-7cda52ecb1486bc51139d6436d50d614c647897b.tar.gz
"