%define kmod_name prefetch_tuning Name : prefetch_tuning Summary : CPU prefetch tuning module for Kunpeng 920 Version : 1.0 Release : 3 License : GPLv2 Source0 : %{kmod_name}-%{version}.tar.gz buildroot : %{_tmppath}/%{kmod_name}-%{version}-build BuildRequires: make BuildRequires: gcc BuildRequires: kernel-devel %description The driver of CPU prefetch tuning module for Kunpeng 920. Users can user this module to control CPU prefetch settings. %global debug_package %{nil} %prep %setup -n %{kmod_name}-%{version} sed -i 's/EXTRA_CFLAGS += -Wall -Werror/EXTRA_CFLAGS += -Wall/g' Makefile %build %make_build %install mkdir -p %{buildroot}/lib/modules/%{kmod_name} install -m 640 %{kmod_name}.ko %{buildroot}/lib/modules/%{kmod_name}/%{kmod_name}.ko %clean rm -rf %{buildroot} rm -rf %_builddir/%{kmod_name}-%{version} %files %license License/LICENSE %defattr(-,root,root) %dir /lib/modules/%{kmod_name} %attr(0640,root,root) /lib/modules/%{kmod_name}/%{kmod_name}.ko %pre %posttrans insmod /lib/modules/%{kmod_name}/%{kmod_name}.ko %preun rmmod prefetch_tuning %changelog * Thu Aug 6 2020 hanxinke - 1.0-3 - Fix the prefetch_tuning.ko loading * Sat Feb 29 2020 openEuler Buildteam - 1.0-2 - Fix warning exception caused by compilation options * Mon Nov 4 2019 openEuler Buildteam - 1.0-1 - Package init