50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
# Description: nVIDIA Linux Display Driver
|
|
# URL: http://www.nvidia.com/
|
|
# Maintainer: Matt Housh, jaeger at morpheus dot net
|
|
# Depends on: x11
|
|
|
|
# Nice to have: gl-select
|
|
|
|
name=nvidia
|
|
version=1.0-9746
|
|
release=1
|
|
source=(http://download.nvidia.com/XFree86/Linux-x86/$version/NVIDIA-Linux-x86-$version-pkg0.run \
|
|
$name-makefile.patch)
|
|
|
|
build() {
|
|
sh NVIDIA-Linux-x86-$version-pkg0.run --extract-only
|
|
cd NVIDIA-Linux-x86-$version-pkg0
|
|
|
|
# patch Makefile.kbuild for normal users and no load during build
|
|
patch -p0 -i $SRC/$name-makefile.patch usr/src/nv/Makefile.kbuild
|
|
|
|
# create directories the Makefile expects
|
|
mkdir -p $PKG/usr/lib \
|
|
$PKG/usr/X11R6/lib/modules/drivers \
|
|
$PKG/usr/X11R6/lib/modules/extensions \
|
|
$PKG/usr/bin $PKG/usr/man/man1
|
|
|
|
# install libraries
|
|
cp -a usr/X11R6/lib $PKG/usr/X11R6/
|
|
cp -a usr/lib/* $PKG/usr/lib/
|
|
sed -i -e 's|__LIBGL_PATH__|/usr/lib|' $PKG/usr/lib/libGL.la
|
|
|
|
# copy includes
|
|
mkdir -p $PKG/usr/include/nvidia
|
|
cp -r usr/include/GL $PKG/usr/include/nvidia/
|
|
|
|
# install xconfig/settings programs and manpages
|
|
install -m 0755 usr/bin/nvidia-{xconfig,settings} $PKG/usr/bin/
|
|
install -m 0644 usr/share/man/man1/nvidia-{xconfig,settings}.1.gz \
|
|
$PKG/usr/man/man1/
|
|
|
|
# build the module
|
|
cd usr/src/nv
|
|
ln -s Makefile{.kbuild,}
|
|
IGNORE_CC_MISMATCH=1 make module
|
|
|
|
# install it
|
|
install -m 0644 -D nvidia.ko \
|
|
$PKG/lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko
|
|
}
|