mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 18:34:40 +08:00
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
|
|
pkgname=nvidia-390xx-lts
|
|
pkgver=390.77
|
|
pkgrel=5
|
|
pkgdesc="NVIDIA drivers for linux-lts, 390xx legacy branch"
|
|
arch=('x86_64')
|
|
url="http://www.nvidia.com/"
|
|
depends=("linux-lts=4.4.154" "nvidia-390xx-utils=${pkgver}")
|
|
makedepends=("linux-lts-headers=4.4.154")
|
|
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
|
|
license=('custom')
|
|
options=('!strip')
|
|
_extramodules=extramodules-CHAKRA-LTS
|
|
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
|
|
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
|
|
sha512sums=('517947c63dceefd4c9ef27226e39abba727baa4e5493543edf2e0d3cd16341b35e90d02b5ec7319e76c75a0adbc4ae451ede5fc48a6fc38cc2823425dfaefd7d')
|
|
|
|
|
|
prepare() {
|
|
sh "${_pkg}.run" --extract-only
|
|
cd "${_pkg}"
|
|
}
|
|
|
|
build() {
|
|
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
|
|
msg2 "Kernel = $KERNEL_VERSION"
|
|
|
|
cd "${_pkg}/kernel"
|
|
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
|
|
}
|
|
|
|
package() {
|
|
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
|
|
"${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
|
|
|
|
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
|
|
|
|
echo "blacklist nouveau" |
|
|
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
|
|
|
|
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
|
|
}
|