mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 19:57:16 +08:00
51 lines
1.8 KiB
Bash
51 lines
1.8 KiB
Bash
#
|
|
# 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>
|
|
|
|
# include global config
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
pkgname=nvidia
|
|
pkgver=256.53
|
|
pkgrel=2
|
|
# Find the kernel name inside the chroot
|
|
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
|
pkgdesc="NVIDIA drivers for kernel26."
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.nvidia.com/"
|
|
depends=('kernel26>=2.6.35' 'kernel26<2.6.36' "nvidia-utils=${pkgver}")
|
|
makedepends=('kernel26-headers>=2.6.35' 'kernel26-headers<2.6.36')
|
|
conflicts=('nvidia-96xx' 'nvidia-173xx')
|
|
license=('custom')
|
|
install=nvidia.install
|
|
|
|
if [ "$CARCH" = "i686" ]; then
|
|
_barch='x86'
|
|
_pkg="NVIDIA-Linux-${_barch}-${pkgver}"
|
|
source=("ftp://download.nvidia.com/XFree86/Linux-${_barch}/${pkgver}/${_pkg}.run")
|
|
md5sums=('21fe3fe0afed7818b7adf383477b2155')
|
|
elif [ "$CARCH" = "x86_64" ]; then
|
|
_barch='x86_64'
|
|
_pkg="NVIDIA-Linux-${_barch}-${pkgver}-no-compat32"
|
|
source=("ftp://download.nvidia.com/XFree86/Linux-${_barch}/${pkgver}/${_pkg}.run")
|
|
md5sums=('73f08a19e00d05165cbbfc74e2fa4bdd')
|
|
fi
|
|
|
|
build() {
|
|
cd $srcdir
|
|
sh ${_pkg}.run --extract-only
|
|
cd ${_pkg}/kernel
|
|
make SYSSRC=/lib/modules/${_kernver}/build module
|
|
}
|
|
|
|
package() {
|
|
install -D -m644 $srcdir/${_pkg}/kernel/nvidia.ko \
|
|
$pkgdir/lib/modules/${_kernver}/kernel/drivers/video/nvidia.ko
|
|
install -d -m755 $pkgdir/etc/modprobe.d
|
|
echo "blacklist nouveau" >> $pkgdir/etc/modprobe.d/nouveau_blacklist.conf
|
|
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/nvidia.install
|
|
}
|
|
|