updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nvidia-bfs-beta / PKGBUILD
blobe7d6111c11ee64811630cde531b47f94658985a4
1 # Contributor: JokerBoy <jokerboy at punctweb dot ro>
2 # Contributor: Thomas Baechler <thomas@archlinux.org>
4 pkgname=nvidia-bfs-beta
5 pkgver=295.09
6 _extramodules=extramodules-3.1-bfs
7 _kernver="$(cat /lib/modules/${_extramodules}/version)"
8 pkgrel=1
9 pkgdesc="NVIDIA beta drivers for linux-bfs."
10 arch=('i686' 'x86_64')
11 url="http://www.nvidia.com/"
12 depends=('linux-bfs>=3.1' 'linux-bfs<3.2' "nvidia-utils-beta=${pkgver}")
13 makedepends=('linux-bfs-headers>=3.1' 'linux-bfs-headers<3.2')
14 conflicts=('nvidia-bfs-96xx' 'nvidia-bfs-173xx' 'nvidia-bfs')
15 provides=("nvidia=${pkgver}" "nvidia-bfs=${pkgver}")
16 license=('custom')
17 install=nvidia.install
18 options=(!strip)
19 [ "$CARCH" = "i686" ] && _arch='x86' && _pkg="NVIDIA-Linux-${_arch}-${pkgver}" && md5sums=('cd0a20afd4d891adb884b9ad054fa2b6')
20 [ "$CARCH" = "x86_64" ] && _arch='x86_64' && _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32" && md5sums=('d3746ccbfdffed6dc984703c5163a0e9')
21 source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
23 build() {
24     cd "${srcdir}"
25     sh "${_pkg}.run" --extract-only
26     cd "${_pkg}/kernel"
27     make SYSSRC="/lib/modules/${_kernver}/build" module
30 package() {
31     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
32         "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
33     install -d -m755 "${pkgdir}/etc/modprobe.d"
34     echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_bfs_blacklist.conf"
35     sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
36     gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"