wok-6.x annotate nvidia/receipt @ rev 3709
Add: leocad
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Mon Jul 20 13:40:12 2009 +0000 (2009-07-20) |
parents | f306d126580e |
children |
rev | line source |
---|---|
b1+slitaz@1836 | 1 # SliTaz package receipt. |
b1+slitaz@1836 | 2 |
b1+slitaz@1836 | 3 PACKAGE="nvidia" |
b1+slitaz@1836 | 4 VERSION="177.82" |
b1+slitaz@1836 | 5 CATEGORY="non-free" |
b1+slitaz@1836 | 6 SHORT_DESC="NVIDIA X.org kernel driver." |
b1+slitaz@1836 | 7 MAINTAINER="b1+slitaz@nagel.org" |
b1+slitaz@1836 | 8 DEPENDS="xorg xorg-server linux-agp" |
b1+slitaz@1836 | 9 TARBALL="NVIDIA-Linux-x86-$VERSION-pkg0.run" |
b1+slitaz@1836 | 10 WEB_SITE="http://www.nvidia.com" |
b1+slitaz@1836 | 11 _WGET_URL="http://us.download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" |
b1+slitaz@1836 | 12 |
b1+slitaz@1836 | 13 # Rules to configure and make the package. |
b1+slitaz@1836 | 14 compile_rules() |
b1+slitaz@1836 | 15 { |
b1+slitaz@1836 | 16 if [ ! -d $WOK/linux/taz ]; then |
b1+slitaz@1836 | 17 tazwok cook linux |
b1+slitaz@1836 | 18 fi |
b1+slitaz@1836 | 19 if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then |
b1+slitaz@1836 | 20 cd $SOURCES_REPOSITORY |
b1+slitaz@1836 | 21 download $_WGET_URL |
b1+slitaz@1836 | 22 if [ ! -f "$SOURCES_REPOSITORY/$TARBALL" ]; then |
b1+slitaz@1836 | 23 echo -e "\nDownload failed, exiting. Please check WGET_URL variable.\n" |
b1+slitaz@1836 | 24 exit 1 |
b1+slitaz@1836 | 25 fi |
b1+slitaz@1836 | 26 else |
b1+slitaz@1836 | 27 echo -n "Source tarball exit... " |
b1+slitaz@1836 | 28 status |
b1+slitaz@1836 | 29 fi |
b1+slitaz@1836 | 30 if [ ! -d $src ]; then |
b1+slitaz@1836 | 31 cd $WOK/$PACKAGE |
b1+slitaz@1836 | 32 sh "$SOURCES_REPOSITORY/$TARBALL" --extract-only |
b1+slitaz@1836 | 33 mv "NVIDIA-Linux-x86-$VERSION-pkg0" "$PACKAGE-$VERSION" |
b1+slitaz@1836 | 34 fi |
b1+slitaz@1836 | 35 cd $src/usr/src/nv |
pascal@3140 | 36 if [ ! -d $WOK/linux/taz ]; then |
pascal@3140 | 37 tazwok cook linux |
pascal@3140 | 38 fi |
pascal@3140 | 39 kver=$(ls $WOK/linux/taz); kver=${kver#*-} |
pascal@3140 | 40 sed -i "s/uname -r/echo $kver/g" ?akefile* conftest.sh |
pascal@3140 | 41 sed -i "s| /lib/modules| $WOK/linux/linux-$kver/lib/modules|" ?akefile* |
b1+slitaz@1836 | 42 [ ! -f Makefile ] && ln -s Makefile.kbuild Makefile |
pascal@3140 | 43 make SYSSRC=$(ls -d $WOK/linux/linux-$kver/) module |
b1+slitaz@1836 | 44 } |
b1+slitaz@1836 | 45 |
b1+slitaz@1836 | 46 # Rules to gen a SliTaz package suitable for Tazpkg. |
b1+slitaz@1836 | 47 genpkg_rules() |
b1+slitaz@1836 | 48 { |
pascal@2062 | 49 KERNEL_VERSION=$(grep "kernel version" ../linux/$(ls ../linux/taz)/.config) |
pascal@1841 | 50 KERNEL_VERSION=${KERNEL_VERSION##* }-slitaz |
b1+slitaz@1836 | 51 mkdir -p $fs/lib/modules/$KERNEL_VERSION/kernel/drivers/video |
b1+slitaz@1836 | 52 install -m644 $src/usr/src/nv/nvidia.ko $fs/lib/modules/$KERNEL_VERSION/kernel/drivers/video/ |
b1+slitaz@1836 | 53 mkdir -p $fs/usr/share/doc/nvidia |
b1+slitaz@1836 | 54 cp $src/LICENSE $fs/usr/share/doc/nvidia |
b1+slitaz@1836 | 55 } |
b1+slitaz@1836 | 56 |
b1+slitaz@1836 | 57 # Post install/remove commands for Tazpkg. |
b1+slitaz@1836 | 58 post_install() |
b1+slitaz@1836 | 59 { |
pascal@2926 | 60 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
b1+slitaz@1836 | 61 } |
b1+slitaz@1836 | 62 |
b1+slitaz@1836 | 63 post_remove() |
b1+slitaz@1836 | 64 { |
pascal@1841 | 65 depmod -a ${EXTRAVERSION#_}-slitaz |
b1+slitaz@1836 | 66 } |