[arch-commits] Commit in nvidia-lts/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Sun Apr 5 02:18:28 UTC 2020


    Date: Sunday, April 5, 2020 @ 02:18:28
  Author: heftig
Revision: 379526

440.64-10: build from nvidia-dkms

Modified:
  nvidia-lts/trunk/PKGBUILD

----------+
 PKGBUILD |   32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-05 02:18:26 UTC (rev 379525)
+++ PKGBUILD	2020-04-05 02:18:28 UTC (rev 379526)
@@ -3,40 +3,36 @@
 
 pkgname=nvidia-lts
 pkgver=440.64
-pkgrel=9
+pkgrel=10
 epoch=1
 pkgdesc="NVIDIA drivers for linux-lts"
 arch=('x86_64')
 url="https://www.nvidia.com/"
-makedepends=("nvidia-utils=${pkgver}" 'libglvnd' 'linux-lts-headers')
-provides=('nvidia')
+makedepends=('linux-lts-headers' "nvidia-dkms=$pkgver")
+provides=('NVIDIA-MODULE')
 license=('custom')
 options=('!strip')
-_pkg="NVIDIA-Linux-x86_64-${pkgver}"
-source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
-sha512sums=('26156974d9a18456ada329f19e93c2f2abb1c5b12fec47df870a0e5b7788204cf0a745ebfefad6ab50d8f659127722905d5156462d4ce794cc52d796b762bf43')
 
-prepare() {
-    sh "${_pkg}.run" --extract-only
-    cd "${_pkg}"
-}
+build() {
+    _kernver=$(</usr/src/linux-lts/version)
 
-build() {
-    cd "${_pkg}"/kernel
-    make SYSSRC=/usr/src/linux-lts module
+    dkms build --dkmstree "${srcdir}" -m nvidia/${pkgver} -k ${_kernver}
 }
 
 package() {
     depends=('linux-lts' "nvidia-utils=${pkgver}" 'libglvnd')
 
-    _extradir="/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules"
-    install -Dt "${pkgdir}${_extradir}" -m644 \
-      "${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
+    _kernver="$(</usr/src/linux-lts/version)"
 
-    find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
+    install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/extramodules" -m644 \
+        nvidia/${pkgver}/${_kernver}/${CARCH}/module/*
 
+    # compress each module individually
+    find "$pkgdir" -name '*.ko' -exec xz -T1 {} +
+
     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"
+    install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 \
+        /usr/share/licenses/nvidia-dkms/LICENSE
 }



More information about the arch-commits mailing list