# # spec file for package rtl8812au # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: rtl8812au Version: 4.3.20 Release: 0 Summary: Kernel driver for Realtek 802.11ac 8812au wifi cards License: GPL-2.0 Group: System/Kernel Url: https://github.com/diederikdehaas/rtl8812AU Source0: %{name}-%{version}.tar.xz Source1: %{name}-preamble Patch0: 0001-add-support-for-kernel-4.11.patch Patch1: 0002-add-support-for-kernel-4.12.patch Patch2: 0003-Fix-build-with-kernel-4.11.9.patch Patch3: 0004-Fix-for-Linux-kernel-4.12.5.patch BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: fdupes BuildRequires: kernel-devel BuildRequires: kernel-source BuildRequires: module-init-tools BuildRequires: binutils BuildRoot: %{_tmppath}/%{name}-%{version}-build #BuildArch: noarch %kernel_module_package -p %{name}-preamble %description Kernel driver for Realtek 802.11ac 8812au wifi cards The sources were obtained from https://github.com/diederikdehaas/rtl8812AU, which adapted the official driver released by Realtek to build on recent kernels. %package KMP Summary: Kernel driver for Realtek 802.11ac rtl8812au wifi cards Group: System/Kernel %description KMP Kernel driver for Realtek 802.11ac 8812au wifi cards The sources were obtained from https://github.com/diederikdehaas/rtl8812AU, which adapted the official driver released by TP-Link for the Archer T4U AC1200 V1 to build on recent kernels. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 set -- * mkdir source mv "$@" source/ mkdir obj %build for flavor in %{flavors_to_build} ; do # rm -rf obj/$flavor cp -a source obj/$flavor pushd obj/$flavor sed -i -e "s,^KSRC := /lib/modules/\$(KVER)/build$,KSRC := /usr/src/linux-obj/%_target_cpu/$flavor," Makefile make popd done %install export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=%{kernel_module_package_moddir} kernel_version=`uname -r | sed -e "s/\(-[0-9\.]*\)-.*/\1/"` echo ${kernel_version} for flavor in %{flavors_to_build} ; do pushd obj/$flavor install -d %{buildroot}/lib/modules/${kernel_version}-$flavor/${INSTALL_MOD_DIR}/ install -p -m 644 8812au.ko %{buildroot}/lib/modules/${kernel_version}-$flavor/${INSTALL_MOD_DIR}/ popd done %files %defattr(-,root,root) %doc source/LICENSE source/README.md %changelog