46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
# Template file for 'rtl8822bu-dkms'
|
|
pkgname=rtl8822bu-dkms
|
|
version=20230424
|
|
revision=1
|
|
_gitrev=3de98611f8259a5537a3af22dfe47a093611be11
|
|
depends="dkms bc"
|
|
short_desc="Realtek 8822BU USB WiFi driver (DKMS)"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://www.tp-link.com"
|
|
distfiles="https://github.com/cilynx/rtl88x2bu/archive/${_gitrev}.tar.gz"
|
|
checksum=1dea3e201c5c50e18b40ce642753fa73b2f355a63dec401d7bf999359561f58d
|
|
dkms_modules="88x2bu ${version}"
|
|
|
|
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
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir /usr/src/88x2bu-${version}
|
|
rm 000*.patch
|
|
vcopy "*" usr/src/88x2bu-${version}
|
|
vinstall ${FILESDIR}/dkms.conf 644 usr/src/88x2bu-${version}
|
|
sed -i -e "s/@VERSION@/${version}-${revision}/" ${PKGDESTDIR}/usr/src/88x2bu-${version}/dkms.conf
|
|
|
|
# modules-load.d(5) file.
|
|
vmkdir usr/lib/modules-load.d
|
|
echo "88x2bu" > ${DESTDIR}/usr/lib/modules-load.d/88x2bu.conf
|
|
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/88x2bu.conf
|
|
}
|