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