55 lines
1.7 KiB
Plaintext
55 lines
1.7 KiB
Plaintext
# Description: nVIDIA Linux Display Driver
|
|
# URL: http://www.nvidia.com/
|
|
# Packager: Matt Housh, jaeger at morpheus dot net
|
|
# Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de
|
|
# Depends on: gtk gl-select
|
|
|
|
name=nvidia
|
|
version=185.18.14
|
|
release=1
|
|
source=(http://us.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/lib/xorg/modules/drivers \
|
|
$PKG/usr/lib/xorg/modules/extensions \
|
|
$PKG/usr/bin $PKG/usr/man/man1
|
|
|
|
# install libraries
|
|
cp -a usr/X11R6/lib/* $PKG/usr/lib/xorg/
|
|
cp -a usr/lib/* $PKG/usr/lib/
|
|
sed -i -e 's|__LIBGL_PATH__|/usr/lib|' $PKG/usr/lib/libGL.la
|
|
ln -sf libGLcore.so.$version $PKG/usr/lib/libGLcore.so
|
|
ln -sf /usr/lib/libGLcore.so $PKG/usr/lib/xorg/modules/extensions/libGLcore.so
|
|
|
|
# additional symlinks required by gl-select
|
|
ln -s libGL.so.$version $PKG/usr/lib/libGL_so_1_2_nvidia
|
|
ln -s libglx.so.$version $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia
|
|
|
|
# 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`/extra/nvidia.ko
|
|
}
|