File atheros-alx.spec of Package atheros-alx

#
# spec file for package atheros-alx
#
# Copyright (c) 2016 SUSE LINUX Products 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://support.novell.com
#

# needssslcertforbuild

Name:           atheros-alx
Summary:        Driver for Qualcomm Atheros AR816x/AR817x based adapters
Version:        1
Release:        0
Source0:        alx.tar.bz2
Patch1:         0001-Backport-alx-to-sp4-interfaces.patch
License:        GPL-2.0
Group:          System/Kernel
BuildRequires:  %kernel_module_package_buildreqs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%kernel_module_package -p %_sourcedir/preamble

%description
This package contains the kernel module providing support for Qualcomm Atheros
AR816x/AR817x based adapters.

It is based on drivers/net/ethernet/atheros/alx/ from the linux kernel sources
at revision 67bef94.

%prep
%setup -n alx
%patch1 -p6
set -- *
mkdir source
mv "$@" source/
mkdir obj

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

%install
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
done

%changelog