File rtl8188eu.spec of Package rtl8188eu
#
# spec file for package rtl8188eu
#
# Copyright (c) 2020 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/
#
%if 0%{?suse_version} >= 1230
%global __requires_exclude ksyms*|kernel-uname-r*
%endif
Name: rtl8188eu
Summary: RTL8188eu Linux Driver
Version: 0.0.1
Release: 0
Group: System/Kernel
License: GPL-2.0
Url: https://github.com/lwfinger/rtl8188eu
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.gz
Source1: preamble
Patch0: rtl8188eu-leap.patch
BuildRequires: %kernel_module_package_buildreqs
BuildRequires: libelf-devel
BuildRequires: unzip
BuildRequires: bc
Autoreqprov: on
%suse_kernel_module_package -n rtl8188eu -p %_sourcedir/preamble kdump ec2 um
%description
This package contains the rtl8188eu Driver for Linux
Its an Implacemant for some chips of the rtl8xxxu driver.
The driver will be called "rtl8188eu.ko"
%package KMP
Summary: RTL8188eu Linux Driver
Group: System/Kernel
%description KMP
This package contains the rtl8188eu Driver for Linux
Its an Implacemant for some chips of the rtl8xxxu driver.
The driver will be called "rtl8188eu.ko"
You need also the blacklist rpm.
%package blacklist-rtl8xxxu
Summary: To favour rtl8188eu blacklist the rtl8xxxu device driver
Group: Hardware/Wifi
Requires: %{name}-kmp = %{version}
%description blacklist-rtl8xxxu
On many Realtek Ethernet controllers the old device driver rtl8xxxu does
not work reliably. To solve this the rtl8xxxu kernel module has to be
blacklisted to enable the system to load the new device driver rtl8188eu.
%prep
echo %flavors_to_build
%autosetup -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj
%build
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
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 \
%if %{with buildjobs}
M=$PWD/obj/$flavor %{?jobs:-j%jobs}
%else
M=$PWD/obj/$flavor
%endif
done
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
export CONFIG_RTL8188EU=m
for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
M=$PWD/obj/$flavor
done
%{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d/
cat > %{buildroot}%{_sysconfdir}/modprobe.d/50-blacklist-rtl8xxxu.conf<<-'EOF'
#On many Realtek Ethernet controllers the old device driver rtl8xxxu does
#not work reliably. To solve this the rtl8xxxu kernel module has to be
#blacklisted to enable the system to load the new device driver rtl8188eu.
blacklist rtl8xxxu
EOF
%clean
rm -rf $RPM_BUILD_ROOT
%files blacklist-rtl8xxxu
%defattr(-, root, root)
%config %{_sysconfdir}/modprobe.d/50-blacklist-rtl8xxxu.conf
%changelog