updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / nvidia-pf / PKGBUILD
blob18b7998ea37013db56d9a938e20eef813e81022f
1 # Maintainer : Luca Bennati <lucak3 AT gmail DOT com>
3 pkgname=nvidia-pf
4 pkgver=290.10
5 pkgrel=1
6 _goodkver=3.1
7 _badkver=3.2
8 _kernver="${_goodkver}-pf"
9 pkgdesc="NVIDIA drivers for linux-pf."
10 arch=('i686' 'x86_64')
11 url="http://www.nvidia.com/"
12 depends=("linux-pf>=${_goodkver}" "linux-pf<${_badkver}" "nvidia-utils=${pkgver}")
13 makedepends=("linux-pf-headers>=${_goodkver}" "linux-pf-headers<${_badkver}")
14 conflicts=('nvidia-96xx' 'nvidia-173xx')
15 license=('custom')
16 install=nvidia.install
17 options=(!strip)
19 if [ "$CARCH" = "i686" ]; then
20     _arch='x86'
21     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
22     source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23     md5sums=('50319a4b3818c12c9c7243525e0e6316')
24 elif [ "$CARCH" = "x86_64" ]; then
25     _arch='x86_64'
26     _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
27     source=("http://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
28     md5sums=('cebfba9a7e91716a06c66bb5b38d9661')
31 build() {
32     cd "${srcdir}"
33     [[ -d "${_pkg}" ]] && rm -rf "${_pkg}"
34     sh "${_pkg}.run" --extract-only
35     cd "${_pkg}/kernel"
36     make SYSSRC=/lib/modules/"${_kernver}/build" module
39 package() {
40     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
41         "${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko"
42     install -d -m755 "${pkgdir}/etc/modprobe.d"
43     echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist-pf.conf"
44     sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "${srcdir}/../nvidia.install"
45     #find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
46     gzip "${pkgdir}/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko"
47     install -D -m644 "${srcdir}/${_pkg}/LICENSE" \
48         "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"