# Maintainer: Jerry Xiao # Maintainer: graysky # Contributor: Giancarlo Razzolini # Contributor: Eric BĂ©langer pkgbase=nvidia-340xx pkgname=(nvidia-340xx nvidia-340xx-dkms) pkgver=340.108 pkgrel=10 pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" arch=('x86_64') url="https://www.nvidia.com/" makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.5' 'linux-headers>=5.5') conflicts=('nvidia') license=('custom') options=(!strip) source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" nvidia-340.108-fix-5.9-kernel-compile.patch::https://raw.githubusercontent.com/warpme/minimyth2/master/script/nvidia/nvidia-340.108/files/nvidia-340.108-fix-5.9-kernel-compile.patch ) b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028' 'daf886ec4622b0800fc82784f08f4fc0f6dfa1b70ef7c87a91bded2221b710da2baf4b3129542da6210fda5e5b862876ccd5e93d799f60fc6d75d83ef302210b') _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" # default is 'linux' substitute custom name here _kernelname=linux _kernver="$(=5.3.6' "nvidia-340xx-utils=$pkgver" 'libgl') install -Dt "${pkgdir}${_extradir}" -m644 \ "${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko find "${pkgdir}" -name '*.ko' -exec gzip -n {} + echo "blacklist nouveau" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx.conf" } package_nvidia-340xx-dkms() { pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch" depends=('dkms' "nvidia-340xx-utils=$pkgver" 'libgl') optdepends=('linux-headers: Build the module for Arch kernel') provides=("nvidia-340xx=$pkgver") conflicts+=('nvidia-340xx') cd "${_pkg}" install -dm 755 "${pkgdir}"/usr/src cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}" cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf echo "blacklist nouveau" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf" } # vim:set ts=2 sw=2 et: