File it87.spec of Package it87
#
# spec file for package it87
#
# Copyright (c) 2017-2018 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/
#
Name: it87
Version: 0+git20180709
Release: 0
Summary: Kernel driver for IT8705F/IT871xF/IT872xF
License: GPL-2.0
Group: System/Kernel
Url: https://github.com/bbqlinux/it87
Source0: it87-%{version}.tar.xz
Source1: Makefile
Source2: preamble
Source3: get_from_git.sh
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: kernel-devel
BuildRequires: kernel-source
BuildRequires: module-init-tools
%kernel_module_package -p %{name}-preamble
%description
IT8705F/IT871xF/IT872xF hardware monitoring kernel driver
Need to add the following grub option to load module;
"acpi_enforce_resources=lax"
%prep
%setup -q
cp %{S:1} .
set -- *
mkdir source
mv "$@" 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
for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
M=$PWD/obj/$flavor
done
%files
%defattr(-,root,root)
%doc source/ITE_Register_map.pdf
%doc source/README
%changelog