Commit 1e16fdf8 authored by Neophytos's avatar Neophytos

nvidia-304xx-lts: added to repos

parent 0cd87422
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Find the kernel name inside the chroot
_extramodules=extramodules-3.2-CHAKRA-LTS
_kver="3.2.51-1-lts"
pkgname=nvidia-304xx-lts
pkgver=304.117
pkgrel=1
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=('linux-lts>=3.2' 'linux-lts<3.4' "nvidia-304xx-utils=${pkgver}")
makedepends=('linux-lts-headers')
conflicts=('nvidia-96xx-lts' 'nvidia-173xx-lts' 'nvidia-lts')
license=('custom')
install=nvidia.install
_pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
md5sums=('8ee9f672028971c6d36118894d0e2c59')
build() {
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
cd "${_pkg}/kernel"
make SYSSRC=/lib/modules/"${_kver}/build" module
}
package() {
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/etc/modprobe.d"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
}
post_install() {
EXTRAMODULES='extramodules-3.2-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_upgrade() {
EXTRAMODULES='extramodules-3.2-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_remove() {
EXTRAMODULES='extramodules-3.2-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
rm "/etc/modprobe.d/nouveau_blacklist.conf"
}
Markdown is supported
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