54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
# Template file for 'rtl8812au-dkms'
|
|
pkgname=rtl8812au-dkms
|
|
version=20210629
|
|
revision=3
|
|
_modver=5.13.6
|
|
_gitrev=b5f4e6e894eca8fea38661e2fc22a2570e0274ad
|
|
depends="dkms"
|
|
short_desc="Realtek 8812AU/8821AU USB WiFi driver (DKMS)"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://github.com/morrownr/8812au"
|
|
distfiles="https://github.com/morrownr/8812au-${version}/archive/${_gitrev}.tar.gz"
|
|
checksum=8eb01e1c9159cbeea1fd7a0d711a87e05380183487d244ce26fb58c03f081038
|
|
dkms_modules="rtl8812au ${_modver}"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*) _karch="x86_64";;
|
|
i686*) _karch="i386";;
|
|
aarch64*) _karch="arm64";;
|
|
arm*) _karch="arm";;
|
|
ppc*) _karch="powerpc";;
|
|
mips*) _karch="mips";;
|
|
*) broken="kernel arch not defined";;
|
|
esac
|
|
|
|
post_patch() {
|
|
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
|
|
vsed -i 's,@@VOID_ENDIAN@@,BIG,g' Makefile
|
|
else
|
|
vsed -i 's,@@VOID_ENDIAN@@,LITTLE,g' Makefile
|
|
fi
|
|
vsed -i "s,@@VOID_ARCH@@,${_karch},g" Makefile
|
|
rm *.patch
|
|
}
|
|
|
|
do_install() {
|
|
local dest=/usr/src/rtl8812au-${_modver}
|
|
|
|
cat <<-EOF >dkms.conf
|
|
PACKAGE_NAME="rtl8812au"
|
|
PACKAGE_VERSION="${_modver}"
|
|
MAKE="'make' KVER=\${kernelver}"
|
|
BUILT_MODULE_NAME[0]="8812au"
|
|
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
|
|
EOF
|
|
vmkdir ${dest}
|
|
cp -r dkms.conf Kconfig Makefile platform core hal include os_dep ${DESTDIR}/${dest}
|
|
|
|
# modules-load.d(5) file.
|
|
vmkdir usr/lib/modules-load.d
|
|
echo "8812au" > ${DESTDIR}/usr/lib/modules-load.d/${pkgname}.conf
|
|
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/${pkgname}.conf
|
|
}
|