File r8126.spec of Package r8126

#
# spec file for package r8125.spec
#
# Copyright (c) 2024 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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
# needssslcertforbuild

Name:           r8126
Version:        10.013.00
Release:        1.2
Summary:        Linux device driver for Realtek Ethernet controllers
License:        GPL-2.0+
Group:          System/Kernel
Url:            https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Source0:        %{name}-%{version}.tar.bz2
Source1:        preamble

Patch1:         leap155.patch

Conflicts:      r8168-kmp-default

BuildRequires:	%kernel_module_package_buildreqs
BuildRequires:  pesign-obs-integration

%kernel_module_package -n r8126 -x debug -x trace -c %_sourcedir/_projectcert.crt -p %_sourcedir/preamble

%description
This is the Linux device driver released for Realtek RTL8126 
5 Gigabit Ethernet controllers with PCI-Express interface.

%prep
%setup -q

%if 0%{?sle_version} == 150500
%patch -P 1 -p1
%endif

set -- src/*
mkdir source
cp "$@" source/
mkdir obj

%build
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
export KBUILD_NOPEDANTIC=1
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
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
export BRP_PESIGN_FILES='*.ko'
export BRP_PESIGN_COMPRESS_MODULE="xz"

for flavor in %flavors_to_build; do
	make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
		M=$PWD/obj/$flavor
done

%clean
%{__rm} -rf %{buildroot}

	
%changelog
openSUSE Build Service is sponsored by