Dominique Leuenberger 2017-02-05 14:50:09 +00:00 committed by Git OBS Bridge
commit 2c8e95845f
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Dec 28 20:47:07 CET 2016 - tiwai@suse.de
- build KMP only for older distros, as TW 4.8+ kernels already
contain the module (boo#997172)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 4 06:20:43 UTC 2016 - mpluskal@suse.com Sun Sep 4 06:20:43 UTC 2016 - mpluskal@suse.com

View File

@ -16,6 +16,13 @@
# #
%if 0%{?suse_version} > 1320
# TW 4.8 or later kernel already contains the module
%define build_kmp 0
%else
%define build_kmp 1
%endif
Name: ftsteutates Name: ftsteutates
Version: 20160601 Version: 20160601
Release: 0 Release: 0
@ -24,10 +31,14 @@ License: GPL-2.0+
Group: System/Kernel Group: System/Kernel
Url: ftp://ftp.ts.fujitsu.com/pub/Mainboard-OEM-Sales/Services/ Url: ftp://ftp.ts.fujitsu.com/pub/Mainboard-OEM-Sales/Services/
Source0: ftp://ftp.ts.fujitsu.com/pub/Mainboard-OEM-Sales/Services/Software&Tools/Linux_SystemMonitoring&Watchdog&GPIO/ftsteutates-module_%{version}.zip Source0: ftp://ftp.ts.fujitsu.com/pub/Mainboard-OEM-Sales/Services/Software&Tools/Linux_SystemMonitoring&Watchdog&GPIO/ftsteutates-module_%{version}.zip
%if %build_kmp
BuildRequires: %{kernel_module_package_buildreqs} BuildRequires: %{kernel_module_package_buildreqs}
%endif
BuildRequires: unzip BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %build_kmp
%kernel_module_package %kernel_module_package
%endif
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64
%description %description
@ -47,19 +58,24 @@ lm-sensors output.
%prep %prep
%setup -q -n ftsteutates %setup -q -n ftsteutates
%if %build_kmp
mkdir source mkdir source
mkdir obj mkdir obj
cp -a Makefile ftsteutates.c source/ cp -a Makefile ftsteutates.c source/
%endif
%build %build
%if %build_kmp
for flavor in %{flavors_to_build}; do for flavor in %{flavors_to_build}; do
rm -rf obj/$flavor rm -rf obj/$flavor
cp -r source obj/$flavor cp -r source obj/$flavor
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \ make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules \
M=$PWD/obj/$flavor M=$PWD/obj/$flavor
done done
%endif
%install %install
%if %build_kmp
# install kernel modules # install kernel modules
export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates export INSTALL_MOD_DIR=updates
@ -67,6 +83,7 @@ for flavor in %{flavors_to_build}; do
make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \ make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \
M=$PWD/obj/$flavor M=$PWD/obj/$flavor
done done
%endif
%files sensors %files sensors
%defattr(-,root,root) %defattr(-,root,root)