43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
pkgname=nvidia-open-gpu
|
|
pkgver=515.65.01
|
|
pkgrel=0
|
|
pkgdesc="NVIDIA Linux open GPU kernel modules"
|
|
url="https://github.com/NVIDIA/open-gpu-kernel-modules"
|
|
arch="x86_64"
|
|
license="MIT OR GPL-2.0"
|
|
makedepends="bash linux-headers linux-virt-dev"
|
|
options="!check"
|
|
|
|
source="nvidia-$pkgver.tar.gz::https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/$pkgver.tar.gz"
|
|
builddir="$srcdir/open-gpu-kernel-modules-$pkgver"
|
|
|
|
build() {
|
|
# Hack running the build inside a container other uname -r returns host kernel
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
|
|
|
make KERNEL_UNAME=$KERNEL_VERSION
|
|
}
|
|
|
|
package() {
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
|
|
|
modules="nvidia.ko \
|
|
nvidia-drm.ko \
|
|
nvidia-modeset.ko \
|
|
nvidia-uvm.ko \
|
|
nvidia-peermem.ko"
|
|
|
|
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel
|
|
for m in $modules; do
|
|
gzip -9 -c kernel-open/$m > "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel/$m.gz
|
|
done
|
|
|
|
depends="linux-virt=$(apk info linux-virt -d | grep description: | awk '{print $1}' | sed -e 's/linux-virt-//')"
|
|
}
|
|
|
|
sha512sums='
|
|
c2ff6fd02272b6981a65e7e14c6b636f0113e21da910898c27682f58e60fa8e6deea3670081c57e4961fb5e7794eef8eddb90d134ba1892536a8468c5dc9d669 nvidia-515.65.01.tar.gz
|
|
'
|