File rtl8723bs.spec of Package rtl8723bs

# spec file for package rtl8723bs
# 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

Name:           rtl8723bs
Version:        20170406
Release:        0
Summary:        Realtek 8723BS wifi driver
License:        GPL-2.0
Group:          System/Kernel
Source:         %{name}-%{version}.tar.xz
Source1:        %{name}-kmp-preamble
#BuildRequires:  %{kernel_module_package_buildreqs}
# temporary workaround to avoid having to build xen and pv flavors
BuildRequires:  kernel-default-devel
BuildRequires:  kmod-compat
%{kernel_module_package -p %{name}-kmp-preamble -x xen pv}

This package contains kernel module for Realtek 8723BS wifi adapter
found in some Intel Baytrail based devices (e.g. Acer Aspire Switch 10E)
and related firmware files.

%setup -q
set -- *
mkdir source
mv "$@" source/
mkdir obj

for flavor in %{flavors_to_build}; do
    rm -rf obj/$flavor
    cp -r source obj/$flavor
    make %{?_smp_mflags} CONFIG_RTL8723BS=m -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor

export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
for flavor in %{flavors_to_build}; do
    make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
mkdir -p %{buildroot}/lib/firmware/rtlwifi
cp -vn source/rtl8723bs_*.bin %{buildroot}/lib/firmware/rtlwifi/

%package firmware
Summary:        Firmware files for Realtek 8723BS wifi driver
Group:          System/Kernel

%description firmware
Firmware files needed for Realtek 8723BS wifi driver.

%files firmware
%dir /lib/firmware/rtlwifi

openSUSE Build Service is sponsored by