wok-next annotate nvidia-96xx/receipt @ rev 18741
Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 25 15:23:46 2015 +0200 (2015-12-25) |
parents | 9e01bc6321ea |
children | 0c85739e5ac3 |
rev | line source |
---|---|
psychomaniak@18171 | 1 # SliTaz package receipt. |
psychomaniak@18171 | 2 |
psychomaniak@18171 | 3 PACKAGE="nvidia-96xx" |
psychomaniak@18171 | 4 VERSION="96.43.23" |
psychomaniak@18171 | 5 CATEGORY="network" |
psychomaniak@18171 | 6 MAINTAINER="psychomaniak@xakep.ru" |
psychomaniak@18171 | 7 LICENSE="other" |
psychomaniak@18171 | 8 SHORT_DESC="NVIDIA-legacy drivers (from Geforce MX200 to 7950) (non-free)" |
psychomaniak@18171 | 9 WEB_SITE="http://www.nvidia.com/" |
psychomaniak@18171 | 10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0" |
psychomaniak@18171 | 11 TARBALL="${SOURCE}.run" |
psychomaniak@18171 | 12 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" |
psychomaniak@18171 | 13 RUN_OPTS="--extract-only" |
psychomaniak@18171 | 14 TAGS="drivers graphic video" |
psychomaniak@18171 | 15 |
psychomaniak@18171 | 16 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm" |
psychomaniak@18171 | 17 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz" |
psychomaniak@18171 | 18 |
psychomaniak@18171 | 19 # Rules to configure and make the package. |
psychomaniak@18171 | 20 |
psychomaniak@18171 | 21 compile_rules() |
psychomaniak@18171 | 22 { |
psychomaniak@18171 | 23 cd $src/usr/src/nv/ |
psychomaniak@18171 | 24 # Only use .unblocked_ioctl since 2.6.36 |
psychomaniak@18171 | 25 sed -i 's|\.ioctl|// &|' nv.c |
psychomaniak@18171 | 26 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' && |
psychomaniak@18171 | 27 xz nvidia.ko |
psychomaniak@18171 | 28 } |
al@18741 | 29 |
psychomaniak@18171 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
psychomaniak@18171 | 31 genpkg_rules() |
psychomaniak@18171 | 32 { |
psychomaniak@18171 | 33 EXTRAVERSION=_${kvers} |
psychomaniak@18171 | 34 |
psychomaniak@18171 | 35 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE |
psychomaniak@18171 | 36 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video |
al@18741 | 37 mkdir -p $fs/usr/share/doc/$PACKAGE |
al@18741 | 38 |
psychomaniak@18171 | 39 # Compress and install module |
psychomaniak@18171 | 40 cp $src/usr/src/nv/nvidia.ko.xz \ |
psychomaniak@18171 | 41 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/ |
psychomaniak@18171 | 42 |
psychomaniak@18171 | 43 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
psychomaniak@18171 | 44 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
psychomaniak@18171 | 45 |
psychomaniak@18171 | 46 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE |
psychomaniak@18171 | 47 cp -a $src/usr/bin $fs/usr |
psychomaniak@18171 | 48 cp -a $src/nvidia-installer $fs/usr/bin |
psychomaniak@18171 | 49 cp -a $src/usr/lib/*.so* $fs/usr/lib/ |
psychomaniak@18171 | 50 cp -a $src/usr/lib/tls $fs/usr/lib/ |
psychomaniak@18171 | 51 cp -a $src/usr/share/pixmaps $fs/usr/share |
psychomaniak@18171 | 52 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ |
psychomaniak@18171 | 53 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 |
psychomaniak@18171 | 54 |
psychomaniak@18171 | 55 # Links |
al@18741 | 56 for i in $(find $fs -iname *.so*); do |
al@18741 | 57 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so/}) |
al@18741 | 58 ln -s $(basename $i) $(dirname $i)/$(basename ${i/so.${VERSION}/so.1/}) |
psychomaniak@18171 | 59 done |
psychomaniak@18171 | 60 } |
psychomaniak@18171 | 61 |
psychomaniak@18171 | 62 pre_install() |
psychomaniak@18171 | 63 { |
al@18741 | 64 title 'PROPRIETARY LICENSE' |
al@18741 | 65 echo 'You are installing a package with proprietary license.' |
al@18741 | 66 echo 'You must accept the license.' |
al@18741 | 67 footer |
psychomaniak@18171 | 68 } |
psychomaniak@18171 | 69 |
psychomaniak@18171 | 70 post_install() |
psychomaniak@18171 | 71 { |
al@18741 | 72 newline |
psychomaniak@18171 | 73 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
psychomaniak@18171 | 74 |
psychomaniak@18171 | 75 # correct .desktop file file |
pascal@18730 | 76 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop" |
pascal@18730 | 77 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop" |
psychomaniak@18171 | 78 |
al@18741 | 79 title 'NVIDIA LICENSE INFORMATION' |
psychomaniak@18171 | 80 echo "For installing this package, you have to accept the $PACKAGE license." |
al@18741 | 81 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
psychomaniak@18171 | 82 echo -n "Would you like to read the license (y/N) : "; read anser |
al@18741 | 83 if [ "$anser" == 'y' ]; then |
al@18741 | 84 more /usr/share/licenses/"$PACKAGE"/LICENSE |
al@18741 | 85 echo |
psychomaniak@18171 | 86 fi |
al@18741 | 87 separator |
psychomaniak@18171 | 88 echo -n "Do you accept the license (y/N) : "; read anser |
al@18741 | 89 if [ "$anser" == 'N' ]; then |
al@18741 | 90 echo "You did not accept the license, Removing the pkg." |
al@18741 | 91 tazpkg remove "$PACKAGE" |
psychomaniak@18171 | 92 fi |
psychomaniak@18171 | 93 } |
psychomaniak@18171 | 94 |
psychomaniak@18171 | 95 TAZBB_NO_INSTALL="because this is not hardware neutral" |