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