File it87.spec of Package it87
#
# spec file for package it87
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: it87
Version: 1.0.20240922
Release: 0
Summary: Kernel module for IT8[67]xxxx Super-I/O chips
License: GPL-2.0-only
Group: System/Kernel
URL: https://github.com/frankcrawford/it87
Source0: %{name}-%{version}.tar.xz
Source1: %{name}-kmp-preamble
Source2: 70-%{name}.conf
BuildRequires: %{kernel_module_package_buildreqs}
%kernel_module_package -p %{name}-kmp-preamble default
%description
This driver implements support for a large number of IT8[67]xxxx Super I/O chips.
It is a superset of the chipsets found in the official Linux kernel module.
%package KMP
Summary: Kernel module for IT8[67]xxxx Super-I/O chips
Group: System/Kernel
%description KMP
This driver implements support for a large number of IT8[67]xxxx Super I/O chips.
It is a superset of the chipsets found in the official Linux kernel module.
%prep
%setup -q
sed -i "s/<unknown>/%{version}/" Makefile
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_build -C %{kernel_source $flavor} %{?linux_make_arch} \
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
install -m 0644 -D -t %{buildroot}%{_modprobedir} %{SOURCE2}
%files
%dir %{_modprobedir}
%{_modprobedir}/70-%{name}.conf
%changelog