core/nvidia-173xx/PKGBUILD

47 lines
1.8 KiB
Bash
Raw Normal View History

2010-07-27 04:12:07 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-05-25 02:05:16 +08:00
2010-07-27 04:12:07 +08:00
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
2010-06-27 19:29:21 +08:00
2010-07-27 04:12:07 +08:00
pkgname=nvidia-173xx
pkgver=173.14.27
2010-09-26 11:34:02 +08:00
pkgrel=4
2010-06-27 19:29:21 +08:00
# Find the kernel name inside the chroot
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
2010-05-25 02:05:16 +08:00
pkgdesc="NVIDIA drivers for kernel26, 173xx branch."
arch=('i686' 'x86_64')
[ "$CARCH" = "i686" ] && ARCH=x86
[ "$CARCH" = "x86_64" ] && ARCH=x86_64
url="http://www.nvidia.com/"
depends=('kernel26>=2.6.35' 'kernel26<2.6.36' 'nvidia-173xx-utils')
makedepends=('kernel26-headers>=2.6.35' 'kernel26-headers<2.6.36')
conflicts=('nvidia-96xx' 'nvidia' 'nvidia-173xx')
2010-05-25 02:05:16 +08:00
license=('custom')
install=nvidia.install
source=("http://download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run")
2010-07-27 04:12:07 +08:00
md5sums=('35a6531f71cd6b070f10be8ed11093d4')
[ "$CARCH" = "x86_64" ] && md5sums=('269425dbc2d9d4ecdc54692281d6d738')
2010-05-25 02:05:16 +08:00
build() {
2010-07-27 04:12:07 +08:00
cd $srcdir
sh NVIDIA-Linux-$ARCH-${pkgver}-pkg0.run --extract-only
cd NVIDIA-Linux-$ARCH-${pkgver}-pkg0
cd usr/src/nv/
ln -s Makefile.kbuild Makefile
make SYSSRC=/lib/modules/${_kernver}/build module || return 1
}
2010-05-25 02:05:16 +08:00
2010-07-27 04:12:07 +08:00
package() {
cd $srcdir/NVIDIA-Linux-$ARCH-${pkgver}-pkg0/usr/src/nv/
mkdir -p $pkgdir/lib/modules/${_kernver}/kernel/drivers/video/
install -m644 nvidia.ko $pkgdir/lib/modules/${_kernver}/kernel/drivers/video/
mkdir -p $pkgdir/etc/modprobe.d
echo "blacklist nouveau" >> $pkgdir/etc/modprobe.d/nouveau_blacklist.conf || return 1
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/nvidia.install
2010-05-25 02:05:16 +08:00
}