%define real_name gna-drv-mod Summary: Driver for GNA device Name: dkms-intel_gna Version: 1.3.5 Release: 1 License: GPL-2.0-only Group: System Environment/Kernel URL: https://storage.openvinotoolkit.org/drivers/gna/ Source: https://storage.openvinotoolkit.org/drivers/gna/gna-drv-linux-%{version}.zip BuildArch: noarch Requires: gcc Requires: make Requires: kernel-devel Requires(post): dkms Requires(preun): dkms %description Driver for Intel(R) Gaussian & Neural Accelerator (Intel(R) GNA) device %prep %setup -n %{real_name}.%{version} %build %install %{__rm} -rf %{buildroot} %define dkms_name intel_gna %define dkms_vers %{version}-%{release} %define quiet -q # Kernel module sources install for dkms %{__mkdir_p} %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/ %{__cp} -a src/* %{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/ # Configuration for dkms %{__cat} <<'EOF' >%{buildroot}%{_usrsrc}/%{dkms_name}-%{dkms_vers}/dkms.conf PACKAGE_NAME=%{dkms_name} PACKAGE_VERSION=%{dkms_vers} MAKE[0]="'make' -j$(nproc) KVER=${kernelver}" CLEAN[0]="'make' clean" BUILT_MODULE_NAME[0]=%{dkms_name} DEST_MODULE_LOCATION[0]=/kernel/drivers/misc AUTOINSTALL="YES" EOF %clean %{__rm} -rf %{buildroot} %post # Add to DKMS registry dkms add -m %{dkms_name} -v %{dkms_vers} %{?quiet} || : # Rebuild and make available for the currenty running kernel dkms build -m %{dkms_name} -v %{dkms_vers} %{?quiet} || : dkms install -m %{dkms_name} -v %{dkms_vers} %{?quiet} --force || : %preun # Remove all versions from DKMS registry dkms remove -m %{dkms_name} -v %{dkms_vers} %{?quiet} --all || : %files %license COPYING %doc README %{_usrsrc}/%{dkms_name}-%{dkms_vers}/ %changelog * Sat Aug 12 2023 Paweł Marciniak - 1.3.5-1 - Initial version