%define spec_release 1 %define kmod_name 88XXau %define kmod_driver_version 5.6.4.2 %define kmod_rpm_release %{spec_release} %define kmod_kernel_version 5.18.5-200 # Disable the scanning for a debug package %global debug_package %{nil} Source0: rtl8812au-%{kmod_driver_version}.tgz Name: kmod-rtl8812au Version: %{kmod_driver_version} Release: %{kmod_rpm_release}%{?dist} Summary: RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection. License: GPLv2 URL: https://github.com/aircrack-ng/rtl8812au BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: dkms Requires: kernel-devel >= %{kmod_kernel_version} Requires: make %if 0%{?fedora} # Fedora requires elfutils-libelf-devel, while rhel does not. BuildRequires: elfutils-libelf-devel %endif BuildRequires: glibc %if 0%{?rhel} && 0%{?rhel} < 9 # Fedora doesn't have abi whitelists, # And RHEL9 doesn't have it yet. BuildRequires: kernel-abi-whitelists %endif BuildRequires: libuuid-devel BuildRequires: redhat-rpm-config ExclusiveArch: x86_64 ExcludeArch: s390 ExcludeArch: s390x ExcludeArch: ppc ExcludeArch: ppc64 ExcludeArch: ppc64le ExcludeArch: aarch64 ExcludeArch: i686 %description RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection %post set -x /usr/sbin/dkms --rpm_safe_upgrade add -m %{kmod_name} -v %{version} /usr/sbin/dkms --rpm_safe_upgrade build -m %{kmod_name} -v %{version} /usr/sbin/dkms --rpm_safe_upgrade install -m %{kmod_name} -v %{version} %preun # Check whether kvdo or uds is loaded, and if so attempt to remove it. A # failure here means there is still something using the module, which should be # cleared up before attempting to remove again. if grep -q "88XXau" /proc/modules; then modprobe -r ${module} fi /usr/sbin/dkms --rpm_safe_upgrade remove -m %{kmod_name} -v %{version} --all || : %prep %setup -n rtl8812au-%{kmod_driver_version} %build # Nothing doing here, as we're going to build on whatever kernel we end up # running inside. %install mkdir -p $RPM_BUILD_ROOT/%{_usr}/src/rtl8812au-%{version} cp -r * $RPM_BUILD_ROOT/%{_usr}/src/rtl8812au-%{version}/ cat > $RPM_BUILD_ROOT/%{_usr}/src/rtl8812au-%{version}/dkms.conf < - 8.1.1.371-1 - See https://github.com/IsaacMilarky/rtl8812au-COPR