File rtl8812AU_8821AU.spec of Package rtl8812AU_8821AU

#
# spec file for package rtl8812AU_8821AU
#
#
# Copyright (c) 2018 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/
#
# norootforbuild
#

%if 0%{?suse_version} >= 1230
%global __requires_exclude ksyms*|kernel-uname-r*
%endif

%define upstream_version 20180216

Name:		rtl8812AU_8821AU
BuildRequires:	%kernel_module_package_buildreqs xz
BuildRequires:	libelf-devel
Summary:	Realtek 8812AU 8821AU Wireless LAN Drivers
Version:	%{upstream_version}
Release:	0
Group:		System/Kernel
License:	GPL-2.0
Url:		https://github.com/abperiasamy/rtl8812AU_8821AU_linux
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
Source0:	%{name}_linux.tar.xz
Source1:	preamble
Source100:	%{name}.changes
#Patch0:         %{name}-%{upstream_version}-4.15.patch
Autoreqprov:	on

%suse_kernel_module_package -n rtl8812AU_8821AU -p %_sourcedir/preamble kdump ec2 um xen

%description

This package contains the rtl8812AU_8821AU linux kernel driver for AC1200 (801.11ac) Wireless Dual-Band USB Adapters.

The module will be called "rtl8812au.ko".

%debug_package

%prep
%setup -q -n %{name}_linux
#%patch0 -p0

### yeah well
sed -i '/\-Werror/d' Makefile

set -- *
mkdir source
mv "$@" source/
mkdir obj

%build
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
export CONFIG_RTL8812AU_8821AU=m
for flavor in %flavors_to_build; do
	rm -rf obj/$flavor
	cp -r source obj/$flavor
	make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
	M=$PWD/obj/$flavor
done

%install
#install the module
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
export CONFIG_RTL8812AU_8821AU=m
for flavor in %flavors_to_build; do
	make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
		M=$PWD/obj/$flavor
done

%changelog
openSUSE Build Service is sponsored by