wok-next annotate nvidia-96xx/receipt @ rev 21727

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