2021-02-25 03:22:08 +08:00
|
|
|
# Maintainer: Jerry Xiao <aur@mail.jerryxiao.cc>
|
2019-10-15 04:08:30 +08:00
|
|
|
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
|
|
|
|
# Contributor: Eric Bélanger <eric@archlinux.org>
|
2022-10-13 11:35:20 +08:00
|
|
|
# Contributor: graysky <graysky AT archlinux DOT us>
|
2019-06-07 18:24:37 +08:00
|
|
|
|
|
|
|
pkgbase=nvidia-340xx
|
2021-06-06 10:12:43 +08:00
|
|
|
pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms)
|
2019-12-25 19:29:12 +08:00
|
|
|
pkgver=340.108
|
2024-03-17 14:40:24 +08:00
|
|
|
pkgrel=36
|
2019-06-07 18:24:37 +08:00
|
|
|
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
|
|
|
|
arch=('x86_64')
|
2019-10-15 04:08:30 +08:00
|
|
|
url="https://www.nvidia.com/"
|
2020-02-05 05:36:55 +08:00
|
|
|
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.5' 'linux-headers>=5.5')
|
2019-06-07 18:24:37 +08:00
|
|
|
conflicts=('nvidia')
|
|
|
|
license=('custom')
|
2019-10-15 04:08:30 +08:00
|
|
|
options=(!strip)
|
2021-02-25 03:22:08 +08:00
|
|
|
# https://github.com/warpme/minimyth2/tree/master/script/nvidia/nvidia-340.108/files
|
2019-10-15 04:08:30 +08:00
|
|
|
source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
|
2021-02-25 10:34:33 +08:00
|
|
|
20-nvidia.conf
|
2021-02-25 03:22:08 +08:00
|
|
|
0001-kernel-5.7.patch
|
|
|
|
0002-kernel-5.8.patch
|
|
|
|
0003-kernel-5.9.patch
|
|
|
|
0004-kernel-5.10.patch
|
|
|
|
0005-kernel-5.11.patch
|
2021-09-12 23:10:12 +08:00
|
|
|
0006-kernel-5.14.patch
|
2021-11-23 17:31:39 +08:00
|
|
|
0007-kernel-5.15.patch
|
2022-01-14 10:58:19 +08:00
|
|
|
0008-kernel-5.16.patch
|
2022-04-02 19:12:20 +08:00
|
|
|
0009-kernel-5.17.patch
|
2022-05-29 22:26:53 +08:00
|
|
|
0010-kernel-5.18.patch
|
2022-10-13 11:35:20 +08:00
|
|
|
0011-kernel-6.0.patch
|
2023-02-24 18:39:25 +08:00
|
|
|
0012-kernel-6.2.patch
|
2023-05-03 17:56:45 +08:00
|
|
|
0013-kernel-6.3.patch
|
2023-08-30 20:42:23 +08:00
|
|
|
0014-kernel-6.5.patch
|
2023-11-05 11:24:43 +08:00
|
|
|
0015-kernel-6.6.patch
|
2024-03-17 14:40:24 +08:00
|
|
|
0016-kernel-6.8.patch
|
2019-10-15 04:08:30 +08:00
|
|
|
)
|
2020-08-15 17:37:50 +08:00
|
|
|
b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028'
|
2021-11-11 20:20:02 +08:00
|
|
|
'49d99f612e8eee3ab5e34083c25348bfd14ed5fc8a7984dafc0dad7c0ae0df2c0b2a63a1bb993da440eb0a60293d7c753ca3889bd2f51991b8ddc51bce2fe4a8'
|
2021-02-25 03:22:08 +08:00
|
|
|
'7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1'
|
|
|
|
'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896'
|
|
|
|
'947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1'
|
|
|
|
'665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f'
|
2021-09-12 23:10:12 +08:00
|
|
|
'344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35'
|
2021-11-23 17:31:39 +08:00
|
|
|
'31a4047ab84d13e32fd7fdbf9f69c696d3fab6666c541d2acf0a189c1d17c876970985167fd389a4adc0f786021172bdec1aa6d690736e3cf9fcd8ceabe5fd32'
|
2022-01-14 11:07:01 +08:00
|
|
|
'b3b7bbd597252b25ccb68f431f83707a10d464996f6c74bb67143795df96054da719faf09c1ad2e1c215261356833ad3fa0d9e60552151f827f9d7be7ae44605'
|
2022-04-02 19:12:20 +08:00
|
|
|
'caedc5651bfd14c02fb677f9c5e87adef298d871c6281b78ce184108310e4243ded82210873014be7fedee0dd6251305fa9bbce0c872b76438e0895ef76109d9'
|
2022-05-29 22:26:53 +08:00
|
|
|
'0266e1baaac9ffbb94d9e916a693b1663d8686b15e970bfc30f7c51f051a0af9267aa5f6a12b68586c69d2e9796a1124488b3997ba4b26db1a5ac10a892f0df2'
|
2022-10-13 11:35:20 +08:00
|
|
|
'd69c9acbe550d5fccca68ca6a0d5095cbcaf887d2bc43704a8eb85533896692f16701eef07ead297881f596f5502c3105bb5bea77b2dcaf6c4dc2b49941f9f19'
|
2023-02-28 14:14:41 +08:00
|
|
|
'682a7b8e58d2a008531b7e5179e32c0c71adad673891a1057acd1aa26e410d9d93ff607e46257c6701619621cee1a27e613ec9ae19a580acdd6f68f1c1fdedea'
|
2023-05-03 17:56:45 +08:00
|
|
|
'47681d1e4b16f0b50775120b0a02bc6d279de692cde6086b895eef80bb4598e914ffe1fae81707a771d00f23df60ee4df591dfe042f5b764856d2e07306f3821'
|
2023-08-30 20:42:23 +08:00
|
|
|
'ae16e2a5674a8a93c85aa624e73b1671e85b2be1854caf967986f5764b946f7ca39a1e75c1617ee79da40a8d9a86cc1b17f64a787bc7a8c38f8dca426edeff46'
|
2023-11-05 11:24:43 +08:00
|
|
|
'01192b20986be28bd270842afcf022fbe43536dc2aac6479bc41b7760118aee8e6610290444212ed117d1a006bc24cca205aa39ccc760c6cbcb42f9102b815eb'
|
2024-03-17 14:40:24 +08:00
|
|
|
'5e88a31f1f25744b1136ac8972f652dbfb63cbd9d54596f616e7c861ac3ce624554ea68b6a7f99c275495d2f55f755b7208ada161cd25c449166dd5cce3050a2'
|
|
|
|
'834cebe75ee128d3a3dc69c1e65c579c23a6d39b1dedd77d1333057696168d264a8131dab88997d73801595fa46bf69a8be02411a383bb2067744cbf754c61a0')
|
2019-06-07 18:24:37 +08:00
|
|
|
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
# default is 'linux' substitute custom name here
|
|
|
|
_kernelname=linux
|
|
|
|
_kernver="$(</usr/src/$_kernelname/version)"
|
|
|
|
_extradir="/usr/lib/modules/$_kernver/extramodules"
|
|
|
|
|
2019-06-07 18:24:37 +08:00
|
|
|
prepare() {
|
2019-10-15 04:08:30 +08:00
|
|
|
sh "${_pkg}.run" --extract-only
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2020-10-22 19:05:19 +08:00
|
|
|
cd "${_pkg}"
|
2021-02-24 19:30:11 +08:00
|
|
|
|
|
|
|
local src
|
|
|
|
for src in "${source[@]}"; do
|
|
|
|
src="${src%%::*}"
|
|
|
|
src="${src##*/}"
|
2021-02-25 03:22:08 +08:00
|
|
|
[[ $src = 0*.patch ]] || continue
|
2021-02-24 19:30:11 +08:00
|
|
|
echo "Applying patch $src..."
|
|
|
|
patch -Np1 < "../$src"
|
|
|
|
done
|
2020-08-15 17:37:50 +08:00
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
cp -a kernel kernel-dkms
|
2019-06-07 18:24:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2021-06-06 10:12:43 +08:00
|
|
|
[ -n "$NVIDIA_340XX_DKMS_ONLY" ] && return 0
|
2019-10-15 04:08:30 +08:00
|
|
|
cd "${_pkg}/kernel"
|
|
|
|
make SYSSRC="/usr/src/$_kernelname" module
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
cd uvm
|
|
|
|
make SYSSRC="/usr/src/$_kernelname" module
|
2019-06-07 18:24:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package_nvidia-340xx() {
|
2019-10-15 04:08:30 +08:00
|
|
|
pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
|
2019-10-23 05:07:39 +08:00
|
|
|
depends=('linux>=5.3.6' "nvidia-340xx-utils=$pkgver" 'libgl')
|
2021-02-25 10:34:33 +08:00
|
|
|
install=nvidia-340xx.install
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
install -Dt "${pkgdir}${_extradir}" -m644 \
|
|
|
|
"${srcdir}/${_pkg}/kernel"/{nvidia,uvm/nvidia-uvm}.ko
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2019-10-15 04:08:30 +08:00
|
|
|
echo "blacklist nouveau" |
|
2019-10-23 05:07:39 +08:00
|
|
|
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/nvidia-340xx.conf"
|
2021-02-25 10:34:33 +08:00
|
|
|
|
|
|
|
install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
|
2019-06-07 18:24:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package_nvidia-340xx-dkms() {
|
2021-02-25 10:34:33 +08:00
|
|
|
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')
|
|
|
|
install=nvidia-340xx.install
|
|
|
|
|
|
|
|
cd "${_pkg}"
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2021-02-25 10:34:33 +08:00
|
|
|
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
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2021-02-25 10:34:33 +08:00
|
|
|
echo "blacklist nouveau" |
|
|
|
|
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
|
2019-06-07 18:24:37 +08:00
|
|
|
|
2021-02-25 10:34:33 +08:00
|
|
|
install -Dm644 "$srcdir/20-nvidia.conf" "$pkgdir/usr/share/nvidia-340xx/20-nvidia.conf"
|
2019-06-07 18:24:37 +08:00
|
|
|
}
|
2019-10-15 04:08:30 +08:00
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|