void-packages/srcpkgs/rtl8821cu-dkms/template

40 lines
1.1 KiB
Bash

# Template file for 'rtl8821cu-dkms'
pkgname=rtl8821cu-dkms
version=20210916
revision=2
_modver=5.12.0.4
_gitrev=dc9ee6c6a8b47d0e365fcf1977439c7243da71d5
depends="dkms bc"
short_desc="Realtek 8811CU/8821CU/8731AU USB WiFi driver (DKMS)"
maintainer="classabbyamp <void@placeviolette.net>"
license="GPL-2.0-only"
homepage="https://github.com/morrownr/8821cu"
distfiles="https://github.com/morrownr/8821cu-${version}/archive/${_gitrev}.tar.gz"
checksum=78a8e730ad1ec05b10c4ee97b5cf0a8f5bcd1654b2c5332533c5cf4bd77078d8
dkms_modules="rtl8821cu ${_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
do_install() {
local dest=/usr/src/rtl8821cu-${_modver}
vmkdir ${dest}
for itm in dkms.conf rtl8821c.mk halmac.mk Kconfig Makefile platform core hal include os_dep dkms-make.sh; do
vcopy ${itm} ${dest}
done
vinstall 8821cu.conf 644 usr/lib/modprobe.d
# modules-load.d(5) file.
vmkdir usr/lib/modules-load.d
echo "8821cu" > ${DESTDIR}/usr/lib/modules-load.d/${pkgname}.conf
}