blob: 14e6ded9f1af35291459514d7ad654c501a6967d (
plain)
1 # Description: nVIDIA Linux Display Driver
2 # URL: http://www.nvidia.com/
3 # Packager: Matt Housh, jaeger at morpheus dot net
4 # Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de
5 # Depends on: gtk gl-select
6
7 name=nvidia
8 version=185.18.31
9 release=1
10 source=(http://us.download.nvidia.com/XFree86/Linux-x86/$version/NVIDIA-Linux-x86-$version-pkg0.run \
11 $name-makefile.patch)
12
13 build() {
14 sh NVIDIA-Linux-x86-$version-pkg0.run --extract-only
15 cd NVIDIA-Linux-x86-$version-pkg0
16
17 # patch Makefile.kbuild for normal users and no load during build
18 patch -p0 -i $SRC/$name-makefile.patch usr/src/nv/Makefile.kbuild
19
20 # create directories the Makefile expects
21 mkdir -p $PKG/usr/lib \
22 $PKG/usr/lib/xorg/modules/drivers \
23 $PKG/usr/lib/xorg/modules/extensions \
24 $PKG/usr/bin $PKG/usr/man/man1
25
26 # install libraries
27 cp -a usr/X11R6/lib/* $PKG/usr/lib/xorg/
28 cp -a usr/lib/* $PKG/usr/lib/
29 sed -i -e 's|__LIBGL_PATH__|/usr/lib|' $PKG/usr/lib/libGL.la
30 ln -sf libGLcore.so.$version $PKG/usr/lib/libGLcore.so
31 ln -sf /usr/lib/libGLcore.so $PKG/usr/lib/xorg/modules/extensions/libGLcore.so
32
33 # additional symlinks required by gl-select
34 ln -s libGL.so.$version $PKG/usr/lib/libGL_so_1_2_nvidia
35 ln -s libglx.so.$version $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia
36
37 # copy includes
38 mkdir -p $PKG/usr/include/nvidia
39 cp -r usr/include/GL $PKG/usr/include/nvidia/
40
41 # install xconfig/settings programs and manpages
42 install -m 0755 usr/bin/nvidia-{xconfig,settings} $PKG/usr/bin/
43 install -m 0644 usr/share/man/man1/nvidia-{xconfig,settings}.1.gz \
44 $PKG/usr/man/man1/
45
46 # build the module
47 cd usr/src/nv
48 ln -s Makefile{.kbuild,}
49 IGNORE_CC_MISMATCH=1 make module
50
51 # install it
52 install -m 0644 -D nvidia.ko \
53 $PKG/lib/modules/`uname -r`/extra/nvidia.ko
54 }
|