Commit 9d7f81b3 authored by Helmut Stult's avatar Helmut Stult
Browse files

Initial commit

parents
# Maintainer: Philip Müller <philm[at]manjaro[dot]org>
# Maintainer: Bernhard Landauer <bernhard[at]manjaro[dot]org>
# Maintainer: Helmut Stult <helmut[at]manjaro[dot]org>
# Contributor: Joan Bruguera <joanbrugueram@gmail.com> (kernel-5.11.patch)
# Arch credits:
# Maintainer : Thomas Baechler <thomas@archlinux.org>
_linuxprefix=linux512
_extramodules=extramodules-5.12-MANJARO
# don't edit here
pkgver=460.56
_nver=460
# edit here for new version
_sver=56
# edit here for new build
pkgrel=0.1
pkgname=$_linuxprefix-nvidia
_pkgname=nvidia
_pkgver="${_nver}.${_sver}"
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("$_linuxprefix" "nvidia-utils=${_pkgver}")
makedepends=("$_linuxprefix-headers")
groups=("$_linuxprefix-extramodules")
provides=("$_pkgname=$pkgver" "$_linuxprefix-nvidia-418xx" "$_linuxprefix-nvidia-430xx"
"$_linuxprefix-nvidia-435xx" "$_linuxprefix-nvidia-440xx" "$_linuxprefix-nvidia-450xx")
conflicts=("$_linuxprefix-nvidia-340xx" "$_linuxprefix-nvidia-390xx" "$_linuxprefix-nvidia-418xx"
"$_linuxprefix-nvidia-430xx" "$_linuxprefix-nvidia-435xx" "$_linuxprefix-nvidia-440xx"
"$_linuxprefix-nvidia-450xx")
license=('custom')
install=nvidia.install
options=(!strip)
durl="https://us.download.nvidia.com/XFree86/Linux-x86"
source=("${durl}_64/${_pkgver}/NVIDIA-Linux-x86_64-${_pkgver}-no-compat32.run")
sha256sums=('6aa33772f6777dfaecf3142d7e01da9689a7206254e81ddbebf3ce6067c214a2')
_pkg="NVIDIA-Linux-x86_64-${_pkgver}-no-compat32"
pkgver() {
printf '%s' "${_pkgver}"
}
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}/kernel"
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}"/kernel
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package() {
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
}
post_install() {
EXTRAMODULES='extramodules-5.12-MANJARO'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-5.12-MANJARO'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-5.12-MANJARO'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment