%if 0%{?fedora} %global buildforkernels akmod %global debug_package %{nil} %endif %global prjname acer-predator-turbo-and-rgb-keyboard-linux-module %global gitabbrev 84b84b2 %global gitdate 20241015 %global rel %{gitdate}git%{gitabbrev} Name: %{prjname}-kmod Summary: Kernel module (kmod) for %{prjname} Version: 0 Release: 5%{?rel:.%{rel}}%{?dist} License: GPLv2+ URL: https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module Source0: %{url}/archive/v%{version}/%{prjname}-%{version}%{?gitdate:-%{rel}}.tar.gz BuildRequires: gcc BuildRequires: elfutils-libelf-devel BuildRequires: kmodtool %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %description Unofficial Acer Gaming RGB keyboard backlight and Turbo mode Linux kernel module (Acer Predator, Acer Helios, Acer Nitro) Inspired by [faustus(for asus)](https://github.com/hackbnw/faustus), this project extends current acer-wmi linux kernel module to support Acer gaming functions. **Warning** Use at your own risk! Acer was not involved in developing this driver, and everything is developed by reverse engeineering official Predator Sense app. This driver interacts with low-level WMI methods which haven't been tested on all series. Also, this package blacklists the builtin acer_wmi kernel module. %package -n %{prjname}-kmodsrc Summary: module sources for %{name} %description -n %{prjname}-kmodsrc Source tree. %prep %{?kmodtool_check} kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null ##%autosetup -c -p0 %autosetup -c for kernel_version in %{?kernel_versions} ; do cp -a %{prjname} _kmod_build_${kernel_version%%___*} done %build for kernel_version in %{?kernel_versions} ; do make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules done %install install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/%{prjname} install -m 644 %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/%{prjname} for kernel_version in %{?kernel_versions}; do mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ install -D -m 755 _kmod_build_${kernel_version%%___*}/src/facer.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko done %{?akmod_install} %files -n %{prjname}-kmodsrc %{_datadir}/%{prjname} %changelog * Tue Oct 15 2024 Andrea Santilli - 0-5.20241015git84b84b2 - Update to commit 84b84b221dad35fc66824a723a6debe3471d5c80 * Tue Jul 25 2023 Andrea Santilli - 0-4.20230305gitf9deb86 - Workaround to build against 6.4.x kernels. * Thu Jun 29 2023 Andrea Santilli - 0-3.20230305gitf9deb86 - General cleanup. - Remove dependencies on rpmfusion's buildsys. * Sat Mar 11 2023 Andrea Santilli - 0-2.20230305gitf9deb86 - Update to the 11th March 2023 commit, which supports 6.2.x kernels. * Fri Jan 06 2023 Andrea Santilli - 0-1.20221223git8c2b628 - Initial akmod RPM release.