Files
gasket-driver/gasket-driver.spec
Dustin C. Hatch 1a3a502213
All checks were successful
RPMs/gasket-driver/pipeline/head This commit looks good
Include kernel version in release tag
This will allow `dnf` to automatically upgrade the package when a new
build is published for a new kernel release.
2025-11-16 09:30:18 -06:00

57 lines
1.7 KiB
RPMSpec

%global git_revision 5815ee3
%global git_revision_full 5815ee3908a46a415aac616ac7b9aedcb98a504c
%global kernel_version %(rpm -q --qf %{VERSION} kernel-devel)
%global kernel_release %(rpm -q --qf %{RELEASE} kernel-devel)
%global kernel_ver %{kernel_version}-%{kernel_release}
%define _debugsource_template %{nil}
Name: gasket-driver
Version: 0.0.git%{git_revision}
Release: 2.k%{kernel_version}%{?dist}
Summary: The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems
License: GPL-2.0
URL: https://github.com/google/gasket-driver/
Source0: %{name}-%{git_revision_full}.tar.gz
Patch0: 0001-core-Omit-no_llseek-reference.patch
Patch1: 0002-Update-gasket_page_table.c-Fix-MODULE_IMPORT_NS.patch
BuildRequires: kernel-devel
Requires: kernel-core == %{kernel_version}
Requires(post): kmod
%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.
Apex: Apex refers to the EdgeTPU v1
%prep
%autosetup -n %{name}-%{git_revision_full} -p1
%build
make -C /usr/src/kernels/%{kernel_ver}.%{_arch} M=${PWD}/src modules
%install
make -C /usr/src/kernels/%{kernel_ver}.%{_arch} M=${PWD}/src INSTALL_MOD_PATH="${RPM_BUILD_ROOT}" DEPMOD=true modules_install
%post
depmod -a %{kernel_ver}.%{_arch}
%files
/lib/modules/%{kernel_ver}.%{_arch}/updates/*.ko
%changelog
* Sun Nov 16 2025 Dustin C. Hatch <dustin@hatch.name> [0.0.git5815ee3-2]
- Include kernel version in release tag
* Wed Aug 06 2025 Dustin C. Hatch <dustin@hatch.name> [0.0.git5815ee3-1]
- Initial package