%global debug_package %{nil} %global dkms_name gasket Name: %{dkms_name}-dkms Version: 0.0.git.256.20250325 Release: 1%{?dist} Summary: The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems License: GPLv2 URL: https://github.com/KyleGospo/gasket-dkms/ BuildArch: noarch Source: gasket-dkms-b6a7c6d8.tar.gz Patch0: gasket-dkms-6.12.patch Provides: %{dkms_name}-dkms = %{version} Requires: dkms %description The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems. The driver contains two modules: Gasket: Gasket (Google ASIC Software, Kernel Extensions, and Tools) is a top level driver for lightweight communication with Google ASICs; and Apex: The EdgeTPU v1. %prep %setup -T -b 0 -q -n gasket-dkms %patch 0 -p1 %build %install # Create empty tree mkdir -p %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ cp -fr src/* %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ install -d %{buildroot}%{_sysconfdir}/modules-load.d cat > %{buildroot}%{_sysconfdir}/modules-load.d/gasket.conf << EOF gasket apex EOF install -d %{buildroot}%{_sysconfdir}/udev/rules.d cat > %{buildroot}%{_sysconfdir}/udev/rules.d/65-apex.rules << EOF SUBSYSTEM=="apex", MODE="0660", GROUP="apex" EOF %pre getent group apex >/dev/null || groupadd -r apex %post -n %{name} if [ -S /run/udev/control ]; then udevadm control --reload udevadm trigger fi dkms add -m %{dkms_name} -v %{version} -q || : # Rebuild and make available for the currently running kernel dkms build -m %{dkms_name} -v %{version} -q || : dkms install -m %{dkms_name} -v %{version} -q --force || : %preun # Remove all versions from DKMS registry dkms remove -m %{dkms_name} -v %{version} -q --all || : %files %license LICENSE %doc README.md %{_usrsrc}/%{dkms_name}-%{version} %{_sysconfdir}/modules-load.d/gasket.conf %{_sysconfdir}/udev/rules.d/65-apex.rules %changelog * Thu Mar 27 2025 Greg Wildman - 0.0.git.256.20250325-1 - Added patches to compile for kernel > 6.11 - stop using no_llseek - Change MODULE_IMPORT_NS() parameter to string literal