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