%global debug_package %{nil} %define buildforkernels akmod %define modname msi-ec %define version 0.13 %define spec_name msi-ec %define release 1.202605271957gite538f85 %global repo rpmfusion Name: %{modname}-kmod Version: %{version} Release: %{release}%{?dist} Summary: Kernel module(s) for MSI-EC out of tree driver for MSI Laptops Embeded controllers. Group: System Environment/Kernel License: GPLv2 URL: https://github.com/BeardOverflow/msi-ec/ Source0: %{modname}-%{version}.tar.gz Source1: module-load.conf Source2: depmod-override.conf BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_bindir}/kmodtool ExclusiveArch: i686 x86_64 # Detecting if we are building on COPR %if "%{?copr_username}" != "" || 0%{?fedora} BuildRequires: gcc, make, elfutils-libelf-devel BuildRequires: kernel-devel BuildRequires: kmodtool BuildRequires: akmods %else # Or Else, we are using the RPM Fusion Macro %{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } %endif # kmodtool does its magic here %{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %description %package common Summary: Common files for the %{modname} kernel module BuildArch: noarch Provides: %{modname}-kmod-common = %{version}-%{release} %description common This package contains the license, documentation and common files for the %{modname} kernel module. %prep # error out if there was something wrong with kmodtool %{?kmodtool_check} # print kmodtool output for debugging purposes: kmodtool --target %{_target_cpu} --repo %{repo} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null %setup -q -c -T -a 0 for kernel_version in %{?kernel_versions} ; do cp -a %{modname}-%{version} _kmod_build_${kernel_version%%___*} done %build for kernel_version in %{?kernel_versions}; do make %{?_smp_mflags} -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*} modules done %install rm -rf ${RPM_BUILD_ROOT} for kernel_version in %{?kernel_versions}; do # make install DESTDIR=${RPM_BUILD_ROOT} KMODPATH=%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix} mkdir -p ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ install -D -m 755 _kmod_build_${kernel_version%%___*}/%{modname}.ko ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{modname}.ko done mkdir -p %{buildroot}%{_sysconfdir}/modules-load.d/ install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/modules-load.d/msi-ec.conf mkdir -p %{buildroot}%{_sysconfdir}/depmod.d/ install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/depmod.d/msi-ec.conf %{?akmod_install} %post if [ -x /usr/sbin/depmod ]; then /usr/sbin/depmod -a > /dev/null 2>&1 || : fi # To be filled by kmodtool %files %files common %config(noreplace) %{_sysconfdir}/modules-load.d/msi-ec.conf %config(noreplace) %{_sysconfdir}/depmod.d/msi-ec.conf %clean rm -rf $RPM_BUILD_ROOT # Changelog will be injected by Makefile under here. %changelog * Wed May 27 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - Add support for MSI Pulse GL66 12UEK (#732) (e538f85) * Tue May 26 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - AI Policy (#730) (064e3e9) * Wed May 13 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - Merge pull request #720 from basselemam0612/add-raider-18-hx-ai-1824ems1108 (0a46d9c) * Wed May 13 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - Add support for Raider 18 HX AI A2XWJG (1824EMS1.108) (d209439) * Mon Apr 20 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - Merge pull request #600 from glpnk/upd600 (1f3fa34) * Sat Mar 21 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - G2_3 add `15A1EMS1.105`, `15A3EMS1.104` G2_10 add `15F5EMS1.103`, `15FMIBA1.102`, `17Q1IMS1.10C` (02b5b7a) * Thu Feb 12 2026 GitHub Actions - 0.13-1.202605271957gite538f85 - G1_1 upd `17E7EMS1.107` G1_5 upd `14JKEMS1.501` G1_6 upd `15HKEMS1.501` G1_8 upd `16S1EMS1.106` G2_1 upd `17LNIMS1.506` G2_2 upd `1543EMS1.107`, `17KKIMS1.112` G2_3 upd `14J1IMS1.218` G2_4 upd `14P1IMS1.104` G2_5 upd `14K1EMS1.107` G2_6 upd `16R7IMS1.005` G2_10 upd `1587EMS1.106`, `15F4EMS1.107`, `15K2EMS1.109`, `15M1IMS1.114`, `17L7EMS1.104` (9d26935)