#!/bin/bash #Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild #Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven. #Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden. ##################################### Build dependency info: #DEP:linux_src #DEP:xorg_proto #DEP:xorg_xserver #DEP:linux #######Essential package info. #Change these if autodetection fails. #Name of the Syn-3 package that we are going to create NAME=`basename $0|sed 's/.SlackBuild//'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` VER=`echo *run | cut -f4 -d-` || exit 1 ########Build and create the pacakge. #Uncomment the stuff that you dont want or need sh NVIDIA-Linux-*.run -x || exit 1 cd NVIDIA* || exit 1 #compile and install kernel module pushd kernel || exit 1 make IGNORE_CC_MISMATCH=1 SYSSRC=/usr/src/linux module || exit 1 mkdir -p /tmp/pkg/lib/modules/`uname -r`/video || exit 1 cp nvidia.ko /tmp/pkg/lib/modules/`uname -r`/video || exit 1 popd mkdir -p /tmp/pkg/usr/lib cp libvdpau* /tmp/pkg/usr/lib || exit 1 cp libcuda* /tmp/pkg/usr/lib || exit 1 mkdir -p /tmp/pkg/usr/X11/lib/xorg/modules/extensions cp libXvMCNVIDIA.so* /tmp/pkg/usr/X11/lib || exit 1 cp libgl*so* /tmp/pkg/usr/X11/lib/xorg/modules/extensions || exit 1 cp libGL*so* /tmp/pkg/usr/X11/lib/xorg/modules/extensions || exit 1 mkdir -p /tmp/pkg/usr/X11/lib/xorg/modules/drivers cp nvidia_drv.so /tmp/pkg/usr/X11/lib/xorg/modules/drivers || exit 1 mkdir -p /tmp/pkg/usr/bin cp nvidia-settings /tmp/pkg/usr/bin || exit 1 chmod +x /tmp/pkg/usr/bin/* #symlinkje pushd /tmp/pkg/usr/X11/lib/xorg/modules ln -s libnvidia-wfb.so.* libwfb.so || exit 1 popd cd .. #strip bins and other stuff syn3_strip /tmp/pkg || exit 1 #move development stuff and create seperate development package #syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 #syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1