%define _disable_source_fetch 0 %define debug_package %{nil} Name: ec_sys-dkms Version: 1.0.0 Release: 2%{?dist} Summary: EC_SYS DKMS module License: GPL URL: https://gitlab.com/eyes1971/ec_sys-dkms.git Source0: https://gitlab.com/eyes1971/ec_sys-dkms/-/archive/%{version}/ec_sys-dkms-%{version}.tar.gz BuildRequires: kernel-devel BuildRequires: dkms %description EC_SYS DKMS module %prep %setup -q -n ec_sys-dkms-%{version} %build # Nothing to do %install mkdir -p %{buildroot}/usr/src/%{name}-%{version} cp -a * %{buildroot}/usr/src/%{name}-%{version} %post dkms add -m %{name} -v %{version} || true dkms build -m %{name} -v %{version} || true dkms install -m %{name} -v %{version} || true %postun if [ $1 -eq 0 ] ; then dkms remove -m %{name} -v %{version} --all || true fi %files /usr/src/%{name}-%{version} %changelog * Mon May 06 2024 Your Name - 1.0.0-2 - Modified the %post and %postun sections to automatically compile and install the module when a new kernel version is installed * Sun Apr 21 2024 Your Name - 1.0.0-1 - First Build