summaryrefslogtreecommitdiff
path: root/nvidia/Pkgfile
blob: afc832528746987b3a783bbc00368170936d4095 (plain)
    1 # Description: nVIDIA Linux Display Driver
    2 # URL: http://www.nvidia.com/
    3 # Packager: Matt Housh, jaeger at morpheus dot net
    4 # Maintainer: Brett Goulder, predatorfreak at dcaf-security dot org
    5 # Depends on: xorg, gl-select
    6 
    7 name=nvidia
    8 version=100.14.19
    9 release=1
   10 source=(http://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 
   31 	# copy includes
   32 	mkdir -p $PKG/usr/include/nvidia
   33 	cp -r usr/include/GL $PKG/usr/include/nvidia/
   34 
   35 	# install xconfig/settings programs and manpages
   36 	install -m 0755 usr/bin/nvidia-{xconfig,settings} $PKG/usr/bin/
   37 	install -m 0644 usr/share/man/man1/nvidia-{xconfig,settings}.1.gz \
   38 		$PKG/usr/man/man1/
   39 
   40 	# build the module
   41 	cd usr/src/nv
   42 	ln -s Makefile{.kbuild,}
   43 	IGNORE_CC_MISMATCH=1 make module
   44 
   45 	# install it
   46 	install -m 0644 -D nvidia.ko \
   47 		$PKG/lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko
   48 }

Generated by cgit