# Template file for 'nvidia-container-toolkit'
pkgname=nvidia-container-toolkit
version=1.11.0
revision=3
archs="x86_64"
build_style=go
go_import_path=github.com/NVIDIA/nvidia-container-toolkit
go_package="${go_import_path}/cmd/nvidia-container-runtime-hook
 ${go_import_path}/cmd/nvidia-container-runtime
 ${go_import_path}/cmd/nvidia-ctk"
depends="libnvidia-container"
short_desc="Build and run containers leveraging NVIDIA GPUs"
maintainer="Quentin Freimanis <quentinfreimanis@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/NVIDIA/nvidia-container-toolkit/"
distfiles="https://github.com/NVIDIA/nvidia-container-toolkit/archive/v${version}.tar.gz"
checksum=016e20b3a1a59409da131817d84b9fc56eab72d3f69a9797bbf960f73c9e5262

post_install() {
	ln -sf /usr/bin/nvidia-container-runtime-hook ${DESTDIR}/usr/bin/${pkgname}
	vmkdir /etc/nvidia-container-runtime 755
	vinstall config/config.toml.rpm-yum 644 /etc/nvidia-container-runtime config.toml
	vinstall oci-nvidia-hook.json 644 /usr/share/containers/oci/hooks.d 00-oci-nvidia-hook.json
}
