%if 0%{?fedora} || 0%{?rhel} # kmod fails on rhel9 kernel - just build an akmod there %global buildforkernels akmod %endif %global debug_package %{nil} %global usbio_commit 70c524c5475646588a0a946951305e3da180658c %global usbio_commitdate 20240810 %global usbio_shortcommit %(c=%{usbio_commit}; echo ${c:0:7}) %global prjname intel-usbio Name: %{prjname}-kmod Summary: Kernel module (kmod) for %{prjname} Version: 0.0 Release: 3.%{usbio_commitdate}git%{usbio_shortcommit}%{?dist} License: GPLv2 URL: https://github.com/intel Source: %{url}/usbio-drivers/archive/%{usbio_commit}/usbio-drivers-%{usbio_shortcommit}.tar.gz BuildRequires: gcc BuildRequires: elfutils-libelf-devel BuildRequires: kmodtool # Patches # kmodtool does its magic here %{expand:%(kmodtool --target %{_target_cpu} --repo enterprise-usbio --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %description This enables Intel USBIO extension drivers on Intel Alder Lake platforms. The source can be found from the following URL. https://github.com/intel/usbio-drivers This package contains the kmod module for %{prjname}. %prep # error out if there was something wrong with kmodtool %{?kmodtool_check} # print kmodtool output for debugging purposes: kmodtool --target %{_target_cpu} --repo copr --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null %setup -q -c (cd usbio-drivers-%{usbio_commit} #patch -p1 ) for kernel_version in %{?kernel_versions} ; do cp -a usbio-drivers-%{usbio_commit}/ _kmod_build_${kernel_version%%___*} done %build for kernel_version in %{?kernel_versions} ; do make -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules done %install for kernel_version in %{?kernel_versions}; do mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ install -D -m 755 _kmod_build_${kernel_version%%___*}/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix} chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko done %{?akmod_install} %changelog * Wed Sep 18 2024 Jean-Marc Liger - 0.0-3.20240810git70c524c - Update to commit 70c524c5475646588a0a946951305e3da180658c - Add MTL HWID and support 6.11+ kernel * Sat Jun 29 2024 Jean-Marc Liger - 0.0-2.20240625git6e6f1d1 - Update to commit 6e6f1d1b516fd987950549d004ab87880ee96f42 - Update for Lunar Lake platform and support for one GPIO pin per packet * Fri May 31 2024 Jean-Marc Liger - 0.0-1.20240411git74677ed - First release