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

Generated by cgit