Files
gasket-driver/gasket-driver.spec
Dustin C. Hatch 71bb2e8de5
Some checks failed
RPMs/gasket-driver/pipeline/head There was a failure building this commit
Provide installonlypkg(kernel-module)
This should hopefully allow multiple simultaneous versions of the
package to be installed (i.e. one for each installed kernel), without
having to explicitly specify `installonlypkgs = gasket-driver` in
`dnf.conf`.
2025-11-23 18:15:08 -06:00

62 lines
1.9 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: 4.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
Provides: installonlypkg(kernel-module)
Requires: kernel-core == %{kernel_version}
Conflicts: 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 23 2025 Dustin C. Hatch <dustin@hatch.name> [0.0.git5815ee3-4]
- Provide installonlypkg(kernel-module)
* 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